[FIX] stock_account: use correct rounding for anglosaxon accounting's price difference line generation
These data are expressed in invoice currency, they must be rounded accordingly.
This commit is contained in:
@@ -186,13 +186,13 @@ class AccountInvoice(models.Model):
|
||||
if child.type_tax_use != 'none':
|
||||
tax_ids.append((4, child.id, None))
|
||||
price_before = line.get('price', 0.0)
|
||||
line.update({'price': company_currency.round(valuation_price_unit * line['quantity'])})
|
||||
line.update({'price': inv.currency_id.round(valuation_price_unit * line['quantity'])})
|
||||
diff_res.append({
|
||||
'type': 'src',
|
||||
'name': i_line.name[:64],
|
||||
'price_unit': company_currency.round(price_unit - valuation_price_unit),
|
||||
'price_unit': inv.currency_id.round(price_unit - valuation_price_unit),
|
||||
'quantity': line['quantity'],
|
||||
'price': company_currency.round(price_before - line.get('price', 0.0)),
|
||||
'price': inv.currency_id.round(price_before - line.get('price', 0.0)),
|
||||
'account_id': acc,
|
||||
'product_id': line['product_id'],
|
||||
'uom_id': line['uom_id'],
|
||||
|
||||
Reference in New Issue
Block a user