31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
diff --git a/trytond/trytond/modules/product_price_list_dates/product.py b/trytond/trytond/modules/product_price_list_dates/product.py
|
|
index 003742f..e66b4bf 100644
|
|
--- a/trytond/trytond/modules/product_price_list_dates/product.py
|
|
+++ b/trytond/trytond/modules/product_price_list_dates/product.py
|
|
@@ -3,6 +3,7 @@
|
|
from trytond.model import ModelView, fields
|
|
from trytond.pool import PoolMeta, Pool
|
|
from trytond.pyson import Eval, If
|
|
+from trytond.transaction import Transaction
|
|
|
|
|
|
class PriceList(metaclass=PoolMeta):
|
|
@@ -21,6 +22,17 @@ class PriceList(metaclass=PoolMeta):
|
|
def open_lines(cls, price_lists):
|
|
pass
|
|
|
|
+ def compute(self, party, product, unit_price, quantity, uom,
|
|
+ pattern=None):
|
|
+ context = Transaction().context
|
|
+ if pattern is None:
|
|
+ pattern = {}
|
|
+ pattern = pattern.copy()
|
|
+ if not pattern.get('date') and context.get('date'):
|
|
+ pattern['date'] = context['date']
|
|
+ return super(PriceList, self).compute(party, product, unit_price,
|
|
+ quantity, uom, pattern)
|
|
+
|
|
|
|
class PriceListLine(metaclass=PoolMeta):
|
|
__name__ = 'product.price_list.line'
|