[REVERT] reverted revision 4589, for fix 700928 which should have never landed on trunk

bzr revid: qdp-launchpad@openerp.com-20110407114014-sntdecl9j0is8jzf
This commit is contained in:
Quentin (OpenERP) 2011-04-07 13:40:14 +02:00
parent 479e7d1bac
commit b3eec82607
2 changed files with 3 additions and 5 deletions

View File

@ -2633,7 +2633,6 @@ class stock_inventory_line(osv.osv):
'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),
'prod_lot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"),
'state': fields.related('inventory_id','state',type='char',string='State',readonly=True),
'tracking': fields.boolean('Track Lots'),
}
def on_change_product_id(self, cr, uid, ids, location_id, product, uom=False, to_date=False):
@ -2649,7 +2648,7 @@ class stock_inventory_line(osv.osv):
prod = self.pool.get('product.product').browse(cr, uid, [product], {'uom': uom})[0]
uom = prod.uom_id.id
amount = self.pool.get('stock.location')._product_get(cr, uid, location_id, [product], {'uom': uom, 'to_date': to_date})[product]
result = {'product_qty': amount, 'product_uom': uom, 'tracking':prod.track_production}
result = {'product_qty': amount, 'product_uom': uom}
return {'value': result}
stock_inventory_line()

View File

@ -120,8 +120,7 @@
<field context="location=location_id,uom=product_uom,to_date=parent.date" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)" domain="[('type','&lt;&gt;','service')]"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="tracking" invisible="1"/>
<field name="prod_lot_id" groups="base.group_extended" attrs="{'required':[('tracking','=',True)]}"/>
<field name="prod_lot_id" groups="base.group_extended"/>
<button name="%(stock.action_view_stock_inventory_line_split)d"
string="Split inventory lines" groups="base.group_extended"
type="action" icon="terp-stock_effects-object-colorize" states="draft,confirm"/>
@ -134,7 +133,7 @@
<field name="product_qty"/>
<field name="product_uom"/>
<group colspan="2" col="4">
<field name="prod_lot_id" groups="base.group_extended" attrs="{'required':[('tracking','=',True)]}"/>
<field name="prod_lot_id" groups="base.group_extended"/>
<button name="%(stock.action_view_stock_inventory_line_split)d"
string="Split inventory lines" groups="base.group_extended"
type="action" icon="terp-stock_effects-object-colorize"/>