[MERGE] stock, sale, sale_stock: several usability problem fixed.
lp bug: https://launchpad.net/bugs/1269045 fixed bzr revid: qdp-launchpad@openerp.com-20140120160303-v5hmfmb6roeg56v6
This commit is contained in:
commit
3f8ec15bbe
|
@ -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', '') 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
|
||||
|
|
Loading…
Reference in New Issue