summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-02-28 17:05:38 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-02-28 17:05:38 +0700
commit5b5ad2f7dd3cfacde60ec57d46be45a309506784 (patch)
treee56a6939251996162fb0dbaa760bc000cdbff972 /indoteknik_custom/models
parent8bbffd2729d003284ccef10bc00f246f14f4b23e (diff)
Add related field product category
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/purchase_pricelist.py1
1 files changed, 1 insertions, 0 deletions
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)