[MERGE] branch merged with lp:~openerp-dev/openobject-addons/uco-dev-addons1
bzr revid: mso@mso-20100524130713-j73775c0h2frmayo
This commit is contained in:
@@ -248,6 +248,21 @@ class mrp_bom(osv.osv):
|
||||
return {'value': v}
|
||||
return {}
|
||||
|
||||
def onchange_multi_level_bom(self, cr, uid, ids, multi_level_bom, context={}):
|
||||
""" Changes multi_level_bom.
|
||||
@param multi_level_bom: Changed multi_level_bom
|
||||
@return: Dictionary of changed values
|
||||
"""
|
||||
bom_ids = ids and ids[0]
|
||||
bom = self.browse(cr, uid, bom_ids)
|
||||
line_ids = bom and map(lambda x:x.id, bom.bom_lines)
|
||||
if multi_level_bom:
|
||||
self.write(cr, uid, line_ids, {'multi_level_bom': multi_level_bom})
|
||||
return {'value': {'bom_lines': line_ids}}
|
||||
else:
|
||||
self.write(cr, uid, line_ids, {'multi_level_bom': multi_level_bom})
|
||||
return {'value': {}}
|
||||
|
||||
def _bom_find(self, cr, uid, product_id, product_uom, properties=[]):
|
||||
""" Finds BoM for particular product and product uom.
|
||||
@param product_id: Selected product.
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<newline/>
|
||||
<field name="multi_level_bom" />
|
||||
<field name="multi_level_bom" on_change="onchange_multi_level_bom(multi_level_bom)"/>
|
||||
<field name="type" groups="base.group_extended"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
|
||||
@@ -470,7 +470,8 @@ class stock_picking(osv.osv):
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
if ('name' not in vals) or (vals.get('name')=='/'):
|
||||
vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking')
|
||||
seq_obj_name = 'stock.picking.' + vals['type']
|
||||
vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name)
|
||||
type_list = {
|
||||
'out':_('Packing List'),
|
||||
'in':_('Reception'),
|
||||
|
||||
@@ -762,6 +762,7 @@
|
||||
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
|
||||
<field name="date" />
|
||||
<field name="min_date"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
@@ -942,6 +943,7 @@
|
||||
<field name="invoice_state"/>
|
||||
<field name="backorder_id" readonly="1"/>
|
||||
<field name="origin" readonly="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
|
||||
Reference in New Issue
Block a user