Skip to content

Commit

Permalink
product_supplierinfo_group: do not break native view, keep field edit…
Browse files Browse the repository at this point in the history
…able, some other module can use it
  • Loading branch information
sebastienbeau committed Mar 28, 2024
1 parent 668cbab commit 225b769
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions product_supplierinfo_group/models/product_supplierinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,25 @@ class ProductSupplierinfo(models.Model):
required=True,
ondelete="cascade",
)
company_id = fields.Many2one(related="group_id.company_id", store=True)
product_tmpl_id = fields.Many2one(related="group_id.product_tmpl_id", store=True)
name = fields.Many2one(related="group_id.partner_id", store=True, required=False)
product_id = fields.Many2one(related="group_id.product_id", store=True)
product_name = fields.Char(related="group_id.product_name", store=True)
product_code = fields.Char(related="group_id.product_code", store=True)
sequence = fields.Integer(related="group_id.sequence", store=True)
company_id = fields.Many2one(
related="group_id.company_id", store=True, readonly=False
)
product_tmpl_id = fields.Many2one(
related="group_id.product_tmpl_id", store=True, readonly=False
)
name = fields.Many2one(
related="group_id.partner_id", store=True, required=False, readonly=False
)
product_id = fields.Many2one(
related="group_id.product_id", store=True, readonly=False
)
product_name = fields.Char(
related="group_id.product_name", store=True, readonly=False
)
product_code = fields.Char(
related="group_id.product_code", store=True, readonly=False
)
sequence = fields.Integer(related="group_id.sequence", store=True, readonly=False)

_sql_constraints = [
(
Expand Down

0 comments on commit 225b769

Please sign in to comment.