diff --git a/addons/product/models/product_pricelist.py b/addons/product/models/product_pricelist.py index a552836d081..9acad80871d 100644 --- a/addons/product/models/product_pricelist.py +++ b/addons/product/models/product_pricelist.py @@ -7,6 +7,7 @@ from odoo.exceptions import UserError class Pricelist(models.Model): _name = "product.pricelist" + _inherit = ['mail.thread', 'mail.activity.mixin'] _description = "Pricelist" _rec_names_search = ['name', 'currency_id'] # TODO check if should be removed _order = "sequence asc, id desc" @@ -25,16 +26,22 @@ class Pricelist(models.Model): currency_id = fields.Many2one( comodel_name='res.currency', default=_default_currency_id, - required=True) + required=True, + tracking=1, + ) company_id = fields.Many2one( - comodel_name='res.company') + comodel_name='res.company', + tracking=5, + ) country_group_ids = fields.Many2many( comodel_name='res.country.group', relation='res_country_group_pricelist_rel', column1='pricelist_id', column2='res_country_group_id', - string="Country Groups") + string="Country Groups", + tracking=10, + ) discount_policy = fields.Selection( selection=[ @@ -42,7 +49,9 @@ class Pricelist(models.Model): ('without_discount', "Show public price & discount to the customer"), ], default='with_discount', - required=True) + required=True, + tracking=15, + ) item_ids = fields.One2many( comodel_name='product.pricelist.item', diff --git a/addons/product/views/product_pricelist_views.xml b/addons/product/views/product_pricelist_views.xml index 62bdd8cfb66..50e3ee1f035 100644 --- a/addons/product/views/product_pricelist_views.xml +++ b/addons/product/views/product_pricelist_views.xml @@ -119,6 +119,11 @@ +
+ + + +
diff --git a/addons/website_sale/models/product_pricelist.py b/addons/website_sale/models/product_pricelist.py index a106808c3c5..1b3e7483c30 100644 --- a/addons/website_sale/models/product_pricelist.py +++ b/addons/website_sale/models/product_pricelist.py @@ -19,7 +19,14 @@ class ProductPricelist(models.Model): domain = [('company_id', '=', company_id)] return self.env['website'].search(domain, limit=1) - website_id = fields.Many2one('website', string="Website", ondelete='restrict', default=_default_website, domain="[('company_id', '=?', company_id)]") + website_id = fields.Many2one( + comodel_name='website', + string="Website", + ondelete='restrict', + default=_default_website, + domain="[('company_id', '=?', company_id)]", + tracking=20, + ) code = fields.Char(string='E-commerce Promotional Code', groups="base.group_user") selectable = fields.Boolean(help="Allow the end user to choose this price list")