[IMP] stock: Put button in inventory lines list view in invenntory form.
bzr revid: uco@tinyerp.co.in-20100315131640-t611ptbeuit7ps01
This commit is contained in:
parent
c7bdad1756
commit
5fa7b9e570
|
@ -1714,11 +1714,9 @@ class stock_inventory_line(osv.osv):
|
|||
'product_qty': fields.float('Quantity'),
|
||||
'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
|
||||
'prod_lot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"),
|
||||
# 'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('cancel','Cancelled')), 'State', readonly=True),
|
||||
'state': fields.related('inventory_id','state',type='char',string='State',readonly=True),
|
||||
}
|
||||
# _defaults = {
|
||||
# 'state': lambda *a: 'draft',
|
||||
# }
|
||||
|
||||
def on_change_product_id(self, cr, uid, ids, location_id, product, uom=False):
|
||||
if not product:
|
||||
return {}
|
||||
|
|
|
@ -91,7 +91,8 @@
|
|||
<field name="product_uom"/>
|
||||
<field name="prod_lot_id"/>
|
||||
<field colspan="4" domain="[('usage','=','internal')]" name="location_id" select="1"/>
|
||||
<button name="%(stock.action_view_stock_inventory_line_split)d"
|
||||
<field name="state" invisible="1"/>
|
||||
<button name="%(stock.action_view_stock_inventory_line_split)d"
|
||||
string="Split inventory lines"
|
||||
type="action" icon="gtk-justify-fill" states="draft"/>
|
||||
</tree>
|
||||
|
|
Loading…
Reference in New Issue