[FIX] stock_landed_costs: use the correct split method landed cost
Steps to follow to reproduce the bug: - Install Inventory and Purchase - In the inventory settings, Enable the "Landed Costs" option - Go to Purchase > create a Service type product - In the Purchase tab > Enable "is landed cost" option and choose "by quantity" in the default split method - Go to Orders > Requests for quotation > Create a new RFQ > add Any product and confirm the order - Validate receipt of the product - Create a bill > add the Service you created at the beginning - Create Landed Costs Problem: we do not use the split method landed cost of the product, we automatically set it to "equal" opw-2465753 closes odoo/odoo#70247 X-original-commit: 5da8c593353edcae4540bec696e259031f2d60f5 Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com> Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ class AccountMove(models.Model):
|
||||
'name': l.product_id.name,
|
||||
'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',
|
||||
'split_method': l.product_id.split_method_landed_cost or 'equal',
|
||||
}) for l in landed_costs_lines],
|
||||
})
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("stock_landed_costs.action_stock_landed_cost")
|
||||
|
||||
Reference in New Issue
Block a user