product_usability: make seller_id a stored field, for those who want to display in tree view

Add tracking on some fields
This commit is contained in:
Alexis de Lattre
2021-02-02 09:59:26 +01:00
parent 92742dfc9d
commit 183bba3752

View File

@@ -14,25 +14,16 @@ class ProductTemplate(models.Model):
# in v10, that field was defined in procurement_suggest, but we will # in v10, that field was defined in procurement_suggest, but we will
# probably not port procurement_suggest because it is native in v14 # probably not port procurement_suggest because it is native in v14
seller_id = fields.Many2one( seller_id = fields.Many2one(
'res.partner', related='seller_ids.name', string='Main Supplier') 'res.partner', related='seller_ids.name', store=True,
string='Main Supplier')
# name = fields.Char( # in v14, I noticed that the tracking of the fields of product.template
# track_visibility='onchange') # are only shown in the form view of product.template, not in the form
# view of product.product
# type = fields.Selection( name = fields.Char(tracking=10)
# track_visibility='onchange') categ_id = fields.Many2one(tracking=20)
type = fields.Selection(tracking=30)
# categ_id = fields.Many2one( list_price = fields.Float(tracking=40)
# track_visibility='onchange') sale_ok = fields.Boolean(tracking=50)
purchase_ok = fields.Boolean(tracking=60)
# list_price = fields.Float( active = fields.Boolean(tracking=70)
# track_visibility='onchange')
# sale_ok = fields.Boolean(
# track_visibility='onchange')
# purchase_ok = fields.Boolean(
# track_visibility='onchange')
# active = fields.Boolean(
# track_visibility='onchange')