From 5b5ad2f7dd3cfacde60ec57d46be45a309506784 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 28 Feb 2024 17:05:38 +0700 Subject: Add related field product category --- indoteknik_custom/models/purchase_pricelist.py | 1 + 1 file changed, 1 insertion(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_pricelist.py b/indoteknik_custom/models/purchase_pricelist.py index d9c9a51d..e7a04927 100755 --- a/indoteknik_custom/models/purchase_pricelist.py +++ b/indoteknik_custom/models/purchase_pricelist.py @@ -9,6 +9,7 @@ class PurchasePricelist(models.Model): name = fields.Char(string='Name', compute="_compute_name") product_id = fields.Many2one('product.product', string="Product", required=True) + product_categ_ids = fields.Many2many('product.public.category', related="product_id.public_categ_ids") vendor_id = fields.Many2one('res.partner', string="Vendor", required=True) product_price = fields.Float(string='Human Price', required=True) system_price = fields.Float(string='System Price', readonly=True) -- cgit v1.2.3