diff --git a/beesdoo_product_usability/models/beesdoo_product.py b/beesdoo_product_usability/models/beesdoo_product.py index 4c651a3..868482a 100644 --- a/beesdoo_product_usability/models/beesdoo_product.py +++ b/beesdoo_product_usability/models/beesdoo_product.py @@ -5,12 +5,12 @@ class BeesdooProduct(models.Model): _inherit = "product.template" main_supplierinfo = fields.Many2one( - "product.supplierinfo", + comodel_name="product.supplierinfo", string="Main Supplier Information", compute="_compute_main_supplierinfo", ) main_price = fields.Float( - string="Price", compute="_compute_main_supplierinfo" + string="Supplier Price", compute="_compute_main_supplierinfo" ) main_minimum_qty = fields.Float( string="Minimum Quantity", compute="_compute_main_supplierinfo" diff --git a/beesdoo_shift/models/cooperative_status.py b/beesdoo_shift/models/cooperative_status.py index 45ec675..3a241c8 100644 --- a/beesdoo_shift/models/cooperative_status.py +++ b/beesdoo_shift/models/cooperative_status.py @@ -88,7 +88,7 @@ class CooperativeStatus(models.Model): string="Working mode", ) exempt_reason_id = fields.Many2one( - "cooperative.exempt.reason", "Exempt Reason" + comodel_name="cooperative.exempt.reason", string="Exempt Reason" ) status = fields.Selection( selection=_get_status, @@ -115,7 +115,8 @@ class CooperativeStatus(models.Model): next_countdown_date = fields.Date(compute="_compute_next_countdown_date") temporary_exempt_reason_id = fields.Many2one( - "cooperative.exempt.reason", "Exempt Reason" + comodel_name="cooperative.exempt.reason", + string="Temporary Exempt Reason", ) temporary_exempt_start_date = fields.Date() temporary_exempt_end_date = fields.Date() diff --git a/beesdoo_shift/models/res_partner.py b/beesdoo_shift/models/res_partner.py index c499dec..1faadc3 100644 --- a/beesdoo_shift/models/res_partner.py +++ b/beesdoo_shift/models/res_partner.py @@ -19,7 +19,10 @@ class ResPartner(models.Model): store=True, ) cooperative_status_ids = fields.One2many( - "cooperative.status", "cooperator_id", readonly=True + string="Cooperative Statuses", + comodel_name="cooperative.status", + inverse_name="cooperator_id", + readonly=True, ) super = fields.Boolean( related="cooperative_status_ids.super", diff --git a/beesdoo_website_shift/models/res_config.py b/beesdoo_website_shift/models/res_config.py index 26cdba9..a33a779 100644 --- a/beesdoo_website_shift/models/res_config.py +++ b/beesdoo_website_shift/models/res_config.py @@ -14,9 +14,7 @@ class WebsiteShiftConfigSettings(models.TransientModel): highlight_rule_pc = fields.Integer( related="website_id.highlight_rule_pc", readonly=False ) - hide_rule = fields.Integer( - related="website_id.highlight_rule_pc", readonly=False - ) + hide_rule = fields.Integer(related="website_id.hide_rule", readonly=False) irregular_enable_sign_up = fields.Boolean( related="website_id.irregular_enable_sign_up", readonly=False ) diff --git a/beesdoo_website_shift/models/website.py b/beesdoo_website_shift/models/website.py index 73f083d..96853b0 100644 --- a/beesdoo_website_shift/models/website.py +++ b/beesdoo_website_shift/models/website.py @@ -12,14 +12,16 @@ class Website(models.Model): default=0, help="Maximum shift that will be shown" ) highlight_rule_pc = fields.Integer( + string="Percentage threshold highlight rule", default=30, - help="Treshold (in %) of available space in a shift that trigger the " + help="Threshold (in %) of available space in a shift that trigger the " "highlight of the shift", ) hide_rule = fields.Integer( + string="Hide Rule", default=20, - help="Treshold ((available space)/(max space)) in percentage of " - "available space under wich the shift is hidden", + help="Threshold ((available space)/(max space)) in percentage of " + "available space under which the shift is hidden", ) irregular_enable_sign_up = fields.Boolean( default=True, help="Enable shift sign up for irregular worker"