[MERGE] fix partial picking wizard
bzr revid: fp@tinyerp.com-20120920072522-skrdqufbgjfcfqcn
This commit is contained in:
commit
daed0694a5
|
@ -38,7 +38,6 @@ class stock_partial_picking_line(osv.TransientModel):
|
|||
res[tracklot.id] = tracking
|
||||
return res
|
||||
|
||||
|
||||
_name = "stock.partial.picking.line"
|
||||
_rec_name = 'product_id'
|
||||
_columns = {
|
||||
|
@ -56,6 +55,14 @@ class stock_partial_picking_line(osv.TransientModel):
|
|||
'tracking': fields.function(_tracking, string='Tracking', type='boolean'),
|
||||
}
|
||||
|
||||
def onchange_product_id(self, cr, uid, ids, product_id, context=None):
|
||||
uom_id = False
|
||||
if product_id:
|
||||
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
|
||||
uom_id = product.uom_id.id
|
||||
return {'value': {'product_uom': uom_id}}
|
||||
|
||||
|
||||
class stock_partial_picking(osv.osv_memory):
|
||||
_name = "stock.partial.picking"
|
||||
_description = "Partial Picking Processing Wizard"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<separator string="Transfer Products" name="product_separator"/>
|
||||
<field name="move_ids" context="{'hide_tracking': hide_tracking}">
|
||||
<tree editable="bottom" string="Product Moves">
|
||||
<field name="product_id" />
|
||||
<field name="product_id" on_change="onchange_product_id(product_id)"/>
|
||||
<field name="quantity" />
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="tracking" invisible="1"/>
|
||||
|
|
Loading…
Reference in New Issue