Browse Source

[REF] prevent "same label" warning

pull/142/head
robin.keunen 5 years ago
parent
commit
13c27ce396
  1. 4
      beesdoo_product_usability/models/beesdoo_product.py
  2. 5
      beesdoo_shift/models/cooperative_status.py
  3. 5
      beesdoo_shift/models/res_partner.py
  4. 4
      beesdoo_website_shift/models/res_config.py
  5. 8
      beesdoo_website_shift/models/website.py

4
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"

5
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()

5
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",

4
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
)

8
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"

Loading…
Cancel
Save