Add issue7672.diff [stock] Always fill product and template of cost price revision
#161975
This commit is contained in:
parent
473d52c242
commit
d2f8d68d8b
|
@ -0,0 +1,22 @@
|
|||
diff --git a/tryton/modules/stock/product.py b/tryton/modules/stock/product.py
|
||||
index 4ae0e95154..7e53384a3c 100644
|
||||
--- a/tryton/modules/stock/product.py
|
||||
+++ b/tryton/modules/stock/product.py
|
||||
@@ -1153,6 +1153,8 @@ class ModifyCostPrice(Wizard):
|
||||
|
||||
def get_revision(self, Revision):
|
||||
return Revision(
|
||||
+ template=None,
|
||||
+ product=None,
|
||||
company=Transaction().context.get('company'),
|
||||
date=self.start.date,
|
||||
cost_price=self.start.cost_price,
|
||||
@@ -1245,7 +1247,7 @@ class CostPriceRevision(ModelSQL, ModifyCostPriceStart):
|
||||
raise ProductCostPriceError(
|
||||
gettext('stock.msg_invalid_cost_price',
|
||||
cost_price=self.cost_price,
|
||||
- product=product.rec_name,
|
||||
+ product=product.rec_name if product else '',
|
||||
exception=exception)) from exception
|
||||
if not isinstance(amount, Decimal):
|
||||
raise ProductCostPriceError(
|
2
series
2
series
|
@ -55,3 +55,5 @@ merge_request779.diff # [account_payment] Warn when submitting, approving or pro
|
|||
issue12576.diff # [account_stock_eu] Could not find the intrastat countries for moves
|
||||
|
||||
issue7677.diff # [trytond] Do not set rec_name for unsaved record
|
||||
|
||||
issue7672.diff # [stock] Always fill product and template of cost price revision
|
||||
|
|
Loading…
Reference in New Issue