[IMP] When landed costs are installed, it should automatically generate accounting entries

This commit is contained in:
Josse Colpaert 2014-09-01 16:46:09 +02:00
parent f6650f0da7
commit 6890b7f88d
2 changed files with 7 additions and 1 deletions

View File

@ -38,4 +38,10 @@ class stock_config_settings(osv.osv_memory):
help="""Install the module that allows to affect landed costs on pickings, and split them onto the different products."""),
}
def onchange_landed_costs(self, cr, uid, ids, module_landed_costs, context=None):
if module_landed_costs:
return {'value': {'group_stock_inventory_valuation': True}}
return {}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -19,7 +19,7 @@
<label for="module_stock_invoice_directly"/>
</div>
<div>
<field name="module_stock_landed_costs" class="oe_inline"/>
<field name="module_stock_landed_costs" on_change="onchange_landed_costs(module_stock_landed_costs)" class="oe_inline"/>
<label for="module_stock_landed_costs"/>
</div>
</div>