[FIX] stock_landed_costs: How change split method default value
Steps to reproduce: - Create a default value = 'by_volume' for the field Split method on model stock.landed.cost.lines - Create a landed cost and add a line Bug: The default value was always 'equal'. opw:2161334 closes odoo/odoo#42460 X-original-commit: 34d93802f33dd845c5fce8a3838c98db18bd7484 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -292,7 +292,7 @@ class LandedCostLine(models.Model):
|
||||
if not self.product_id:
|
||||
self.quantity = 0.0
|
||||
self.name = self.product_id.name or ''
|
||||
self.split_method = 'equal'
|
||||
self.split_method = self.split_method or 'equal'
|
||||
self.price_unit = self.product_id.standard_price or 0.0
|
||||
accounts_data = self.product_id.product_tmpl_id.get_product_accounts()
|
||||
self.account_id = accounts_data['stock_input']
|
||||
|
||||
Reference in New Issue
Block a user