Restore instance context when getting price list used
The price_list_used is set on property so it is executed under the transaction context but we expect to have the price list from the company set in the instance context. issue10664 review369491002
This commit is contained in:
+4
-1
@@ -589,7 +589,10 @@ class Product(
|
||||
|
||||
@property
|
||||
def list_price_used(self):
|
||||
return self.template.get_multivalue('list_price')
|
||||
transaction = Transaction()
|
||||
with transaction.reset_context(), \
|
||||
transaction.set_context(self._context):
|
||||
return self.template.get_multivalue('list_price')
|
||||
|
||||
@classmethod
|
||||
def sync_code(cls, products):
|
||||
|
||||
Reference in New Issue
Block a user