From dab71a4216763077fcda7ec109436d6b4ab5df13 Mon Sep 17 00:00:00 2001 From: Jared Esparza Date: Wed, 4 May 2022 11:45:37 +0200 Subject: [PATCH] Add company to context --- product.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/product.py b/product.py index 8c7b8cd..87efecf 100644 --- a/product.py +++ b/product.py @@ -41,7 +41,10 @@ class ProductSpecialPrice(ModelSQL, CompanyValueMixin): "Product Special Price" __name__ = 'product.special_price' template = fields.Many2One( - 'product.template', "Template", ondelete='CASCADE', select=True) + 'product.template', "Template", ondelete='CASCADE', select=True, + context={ + 'company': Eval('company'), + }, depends=['company']) special_price = fields.Numeric("Special Price", digits=price_digits) @classmethod