[FIX]rename group_stock_production_lot to match correct group, remove few extra spaces to match standard.
Fix traceback on onchange: product_packaging_change and remove setting default package when creating SOL lp bug: https://launchpad.net/bugs/1269045 fixed bzr revid: csn@openerp.com-20140115130123-3ragkt93ukfrfhmq
This commit is contained in:
parent
557a052cb3
commit
d0cea6ac39
|
@ -134,6 +134,7 @@
|
|||
<field name="mes_type"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Logistical Units"/>
|
||||
<field name="packaging" groups="product.group_stock_packaging">
|
||||
<form string="Packaging" version="7.0">
|
||||
<group col="4">
|
||||
|
|
|
@ -995,7 +995,7 @@ class sale_order_line(osv.osv):
|
|||
lang = lang or context.get('lang', False)
|
||||
if not partner_id:
|
||||
raise osv.except_osv(_('No Customer Defined!'), _('Before choosing a product,\n select a customer in the sales form.'))
|
||||
warning = {}
|
||||
warning = False
|
||||
product_uom_obj = self.pool.get('product.uom')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
product_obj = self.pool.get('product.product')
|
||||
|
|
|
@ -289,14 +289,11 @@ class sale_order_line(osv.osv):
|
|||
res = self.product_id_change(cr, uid, ids, pricelist=pricelist,
|
||||
product=product, qty=qty, uom=uom, partner_id=partner_id,
|
||||
packaging=packaging, flag=False, context=context)
|
||||
warning_msgs = res.get('warning') and res['warning']['message']
|
||||
warning_msgs = res.get('warning') and res['warning'].get('message', False) or ''
|
||||
|
||||
products = product_obj.browse(cr, uid, product, context=context)
|
||||
if not products.packaging:
|
||||
packaging = result['product_packaging'] = False
|
||||
elif not packaging and products.packaging and not flag:
|
||||
packaging = products.packaging[0].id
|
||||
result['product_packaging'] = packaging
|
||||
|
||||
if packaging:
|
||||
default_uom = products.uom_id and products.uom_id.id
|
||||
|
|
|
@ -1999,7 +1999,7 @@ class stock_inventory(osv.osv):
|
|||
if stock_settings.group_stock_tracking_owner:
|
||||
res_filter.append(('owner', _('One owner only')))
|
||||
res_filter.append(('product_owner', _('One product for a specific owner')))
|
||||
if stock_settings.group_stock_production_lot:
|
||||
if stock_settings.group_stock_tracking_lot:
|
||||
res_filter.append(('lot', _('One Lot/Serial Number')))
|
||||
if stock_settings.group_stock_tracking_lot:
|
||||
res_filter.append(('pack', _('A Pack')))
|
||||
|
|
Loading…
Reference in New Issue