[FIX] procurement: notify the procurement there is no default seller for a product
bzr revid: stephane@openerp.com-20110310095241-pvoz61hgug5q1hah
This commit is contained in:
parent
fca137c2b7
commit
d9cabb1b5b
|
@ -289,9 +289,15 @@ class procurement_order(osv.osv):
|
|||
return False
|
||||
partner = procurement.product_id.seller_id #Taken Main Supplier of Product of Procurement.
|
||||
|
||||
if not partner:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('No default supplier defined for this product'), procurement.id))
|
||||
return False
|
||||
|
||||
if user.company_id and user.company_id.partner_id:
|
||||
if partner.id == user.company_id.partner_id.id:
|
||||
return False
|
||||
|
||||
address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery']
|
||||
if not address_id:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
|
|
Loading…
Reference in New Issue