product_price_list_dates: add date in pattern to match price list
#050574
This commit is contained in:
parent
08fa33301f
commit
009c3c149f
|
@ -0,0 +1,30 @@
|
||||||
|
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'
|
1
series
1
series
|
@ -57,3 +57,4 @@ statement_of_account.diff # [account] Cumulate balance of previous fiscal years
|
||||||
statement_of_account_2.diff # [account] Use from_date and to_date from context in _debit_credit_context() (pending core)
|
statement_of_account_2.diff # [account] Use from_date and to_date from context in _debit_credit_context() (pending core)
|
||||||
|
|
||||||
issue11306.diff # [analytic_invocie] Add compatibility between the analytic_invocie module and the account_invoice_defer module (only 6.0)
|
issue11306.diff # [analytic_invocie] Add compatibility between the analytic_invocie module and the account_invoice_defer module (only 6.0)
|
||||||
|
issue11359.diff # [product_price_list_dates] add date in pattern to match price list
|
||||||
|
|
Loading…
Reference in New Issue