From c9d2ba84bb81b5d7124f8026d81f3d4fd9c78628 Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Fri, 8 Sep 2023 17:38:57 +0530 Subject: [PATCH] Sep 8 [FIX] : Bug Fixed 'pos_access_right_hr' --- pos_access_right_hr/models/hr_employee.py | 40 +++++++++++------------ pos_access_right_hr/models/pos_session.py | 5 +-- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/pos_access_right_hr/models/hr_employee.py b/pos_access_right_hr/models/hr_employee.py index 816089cb0..612d1d2e5 100644 --- a/pos_access_right_hr/models/hr_employee.py +++ b/pos_access_right_hr/models/hr_employee.py @@ -22,33 +22,31 @@ from odoo import fields, models -class HrEmployee(models.Model): - """ - The inherited class HrEmployee to add new fields to hr.employee - """ - _inherit = 'hr.employee' +class HrEmployeeBase(models.AbstractModel): + """The inherited class HrEmployee to add new fields to 'hr.employee' """ + _inherit = "hr.employee.base" disable_payment = fields.Boolean( - string="POS-Disable Payment", - help="Disable the payment button on the POS") + string="POS-Disable Payment", + help="Disable the payment button on the POS") disable_customer = fields.Boolean( - string="POS-Disable Customer", - help="Disable the customer selection button on the POS") + string="POS-Disable Customer", + help="Disable the customer selection button on the POS") disable_plus_minus = fields.Boolean( - string="POS-Disable Plus-Minus", - help="Disable the +/- button on the POS") + string="POS-Disable Plus-Minus", + help="Disable the +/- button on the POS") disable_numpad = fields.Boolean( - string="POS-Disable Numpad", - help="Disable the number pad on the POS") + string="POS-Disable Numpad", + help="Disable the number pad on the POS") disable_qty = fields.Boolean( - string="POS-Disable Qty", - help="Disable the Qty button on the POS") + string="POS-Disable Qty", + help="Disable the Qty button on the POS") disable_discount = fields.Boolean( - string="POS-Disable Discount", - help="Disable the %Disc button on the POS") + string="POS-Disable Discount", + help="Disable the %Disc button on the POS") disable_price = fields.Boolean( - string="POS-Disable price", - help="Disable the %Price button on the POS") + string="POS-Disable price", + help="Disable the %Price button on the POS") disable_remove_button = fields.Boolean( - string="POS-Disable Remove Button", - help="Disable the back button on the POS") + string="POS-Disable Remove Button", + help="Disable the back button on the POS") diff --git a/pos_access_right_hr/models/pos_session.py b/pos_access_right_hr/models/pos_session.py index 8ff3b430c..77881ecac 100644 --- a/pos_access_right_hr/models/pos_session.py +++ b/pos_access_right_hr/models/pos_session.py @@ -35,6 +35,7 @@ class PosSession(models.Model): """ result = super()._loader_params_hr_employee() result['search_params']['fields'].extend( - ['disable_payment', 'disable_customer', 'disable_plus_minus', 'disable_numpad', 'disable_qty', 'disable_discount', 'disable_price', - 'disable_remove_button']) + ['disable_payment', 'disable_customer', 'disable_plus_minus', + 'disable_numpad', 'disable_qty', 'disable_discount', + 'disable_price', 'disable_remove_button']) return result