changeset a840440bd231 in modules/account_stock_continental:6.0
details:
https://hg.tryton.org/modules/account_stock_continental?cmd=changeset&node=a840440bd231
description:
Use unit_price_company
issue10586
review369311002
(grafted from c7da1bc65008a5830bd68cdd68f82ef4a2dd8605)
diffstat:
stock.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diffs (24 lines):
diff -r 1d16452e0d68 -r a840440bd231 stock.py
--- a/stock.py Mon May 03 15:47:38 2021 +0200
+++ b/stock.py Wed Jul 28 00:32:29 2021 +0200
@@ -17,18 +17,15 @@
pool = Pool()
Uom = pool.get('product.uom')
AccountMoveLine = pool.get('account.move.line')
- Currency = pool.get('currency.currency')
assert type_.startswith('in_') or type_.startswith('out_'), \
'wrong type'
move_line = AccountMoveLine()
if ((
type_.endswith('supplier')
- or type_ == 'in_production')
+ or type_ in {'in_production', 'in_warehouse'})
and self.product.cost_price_method != 'fixed'):
- with Transaction().set_context(date=self.effective_date):
- unit_price = Currency.compute(self.currency, self.unit_price,
- self.company.currency, round=False)
+ unit_price = self.unit_price_company
else:
unit_price = Uom.compute_price(self.product.default_uom,
self.cost_price, self.uom)