Skip to content
Snippets Groups Projects
Commit 84ec7277 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] stock_landed_costs: fix account for non-anglosaxon accounting companies


This reverts commit c382e8c8.

closes odoo/odoo#60406

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent c92f0585
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ class AccountMove(models.Model):
'cost_lines': [(0, 0, {
'product_id': l.product_id.id,
'name': l.product_id.name,
'account_id': l.product_id.product_tmpl_id.get_product_accounts()['stock_input'].id if self.company_id.anglo_saxon_accounting else l.account_id.id,
'account_id': l.product_id.product_tmpl_id.get_product_accounts()['stock_input'].id,
'price_unit': l.currency_id._convert(l.price_subtotal, l.company_currency_id, l.company_id, l.move_id.date),
'split_method': 'equal',
}) for l in landed_costs_lines],
......
......@@ -459,9 +459,9 @@ class TestStockValuationLCFIFOVB(TestStockValuationLC):
self.assertEqual(lc.cost_lines.price_unit, 50)
self.assertEqual(lc.cost_lines.product_id, self.productlc1)
expense_aml = self._get_expense_move_lines()[-1]
self.assertEqual(expense_aml.debit, 0)
self.assertEqual(expense_aml.credit, 50)
input_aml = self._get_stock_input_move_lines()[-1]
self.assertEqual(input_aml.debit, 0)
self.assertEqual(input_aml.credit, 50)
valuation_aml = self._get_stock_valuation_move_lines()[-1]
self.assertEqual(valuation_aml.debit, 50)
self.assertEqual(valuation_aml.credit, 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment