Browse Source

Sep 8 [FIX] : Bug Fixed 'pos_access_right_hr'

pull/277/head
AjmalCybro 2 years ago
parent
commit
c9d2ba84bb
  1. 40
      pos_access_right_hr/models/hr_employee.py
  2. 5
      pos_access_right_hr/models/pos_session.py

40
pos_access_right_hr/models/hr_employee.py

@ -22,33 +22,31 @@
from odoo import fields, models from odoo import fields, models
class HrEmployee(models.Model): class HrEmployeeBase(models.AbstractModel):
""" """The inherited class HrEmployee to add new fields to 'hr.employee' """
The inherited class HrEmployee to add new fields to hr.employee _inherit = "hr.employee.base"
"""
_inherit = 'hr.employee'
disable_payment = fields.Boolean( disable_payment = fields.Boolean(
string="POS-Disable Payment", string="POS-Disable Payment",
help="Disable the payment button on the POS") help="Disable the payment button on the POS")
disable_customer = fields.Boolean( disable_customer = fields.Boolean(
string="POS-Disable Customer", string="POS-Disable Customer",
help="Disable the customer selection button on the POS") help="Disable the customer selection button on the POS")
disable_plus_minus = fields.Boolean( disable_plus_minus = fields.Boolean(
string="POS-Disable Plus-Minus", string="POS-Disable Plus-Minus",
help="Disable the +/- button on the POS") help="Disable the +/- button on the POS")
disable_numpad = fields.Boolean( disable_numpad = fields.Boolean(
string="POS-Disable Numpad", string="POS-Disable Numpad",
help="Disable the number pad on the POS") help="Disable the number pad on the POS")
disable_qty = fields.Boolean( disable_qty = fields.Boolean(
string="POS-Disable Qty", string="POS-Disable Qty",
help="Disable the Qty button on the POS") help="Disable the Qty button on the POS")
disable_discount = fields.Boolean( disable_discount = fields.Boolean(
string="POS-Disable Discount", string="POS-Disable Discount",
help="Disable the %Disc button on the POS") help="Disable the %Disc button on the POS")
disable_price = fields.Boolean( disable_price = fields.Boolean(
string="POS-Disable price", string="POS-Disable price",
help="Disable the %Price button on the POS") help="Disable the %Price button on the POS")
disable_remove_button = fields.Boolean( disable_remove_button = fields.Boolean(
string="POS-Disable Remove Button", string="POS-Disable Remove Button",
help="Disable the back button on the POS") help="Disable the back button on the POS")

5
pos_access_right_hr/models/pos_session.py

@ -35,6 +35,7 @@ class PosSession(models.Model):
""" """
result = super()._loader_params_hr_employee() result = super()._loader_params_hr_employee()
result['search_params']['fields'].extend( result['search_params']['fields'].extend(
['disable_payment', 'disable_customer', 'disable_plus_minus', 'disable_numpad', 'disable_qty', 'disable_discount', 'disable_price', ['disable_payment', 'disable_customer', 'disable_plus_minus',
'disable_remove_button']) 'disable_numpad', 'disable_qty', 'disable_discount',
'disable_price', 'disable_remove_button'])
return result return result

Loading…
Cancel
Save