parent
3217ab6c80
commit
2719646907
|
@ -496,12 +496,15 @@ class product_product(osv.osv):
|
|||
args=[]
|
||||
if not context:
|
||||
context={}
|
||||
ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context)
|
||||
if not len(ids):
|
||||
ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context)
|
||||
if not len(ids):
|
||||
ids = self.search(cr, user, [('default_code',operator,name)]+ args, limit=limit, context=context)
|
||||
ids += self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
if name:
|
||||
ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context)
|
||||
if not len(ids):
|
||||
ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context)
|
||||
if not len(ids):
|
||||
ids = self.search(cr, user, [('default_code',operator,name)]+ args, limit=limit, context=context)
|
||||
ids += self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
else:
|
||||
ids = self.search(cr, user, args, limit=limit, context=context)
|
||||
result = self.name_get(cr, user, ids, context)
|
||||
return result
|
||||
|
||||
|
|
|
@ -893,10 +893,10 @@ class sale_order_line(osv.osv):
|
|||
ean = pack.ean
|
||||
qty_pack = pack.qty
|
||||
type_ul = pack.ul
|
||||
warn_msg = "You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: " % (qty)
|
||||
warn_msg = warn_msg + "\n\nEAN: " + str(ean) + " Quantity: " + str(qty_pack) + " Type of ul: " + str(type_ul.name)
|
||||
warn_msg = _("You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: ") % (qty)
|
||||
warn_msg = warn_msg + "\n\n"+_("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
|
||||
warning={
|
||||
'title':'Packing Information !',
|
||||
'title':_('Packing Information !'),
|
||||
'message': warn_msg
|
||||
}
|
||||
result['product_uom_qty'] = qty
|
||||
|
|
|
@ -428,7 +428,7 @@ class stock_picking(osv.osv):
|
|||
('confirmed','Confirmed'),
|
||||
('assigned','Available'),
|
||||
('done','Done'),
|
||||
('cancel','Cancel'),
|
||||
('cancel','Canceled'),
|
||||
], 'Status', readonly=True, select=True),
|
||||
'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date",
|
||||
method=True,store=True, type='datetime', string='Planned Date', select=1),
|
||||
|
|
Loading…
Reference in New Issue