[IMP] Do not show button if no quants and prefer same view as for stock moves

bzr revid: jco@openerp.com-20140127094735-j16y0xjgw10p5erx
This commit is contained in:
Josse Colpaert 2014-01-27 10:47:35 +01:00
parent 4d416e69a8
commit 28cc62ffb4
2 changed files with 2 additions and 1 deletions

View File

@ -1186,6 +1186,7 @@ class stock_production_lot(osv.osv):
'name': 'Traceability',
'view_mode': 'tree,form',
'view_type': 'form',
'context': {'tree_view_ref': 'stock.view_move_tree'},
'res_model': 'stock.move',
'type': 'ir.actions.act_window',
}

View File

@ -191,7 +191,7 @@
<field name="arch" type="xml">
<form string="Serial Number" version="7.0">
<div class="oe_button_box oe_right">
<button name="action_traceability" string="Traceability" type="object"/>
<button name="action_traceability" string="Traceability" type="object" attrs="{'invisible': [('quant_ids','=',[])]}"/>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>