[FIX] 373203

bzr revid: fp@tinyerp.com-20090706193959-yp0m9rjamx5bt9lt
This commit is contained in:
Fabien Pinckaers 2009-07-06 21:39:59 +02:00
parent 3217ab6c80
commit 2719646907
3 changed files with 13 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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),