[IMP] improved warning message

bzr revid: bde@tinyerp.com-20131203063423-ne1dwsy4q0vp53hj
This commit is contained in:
Bharat R. Devnani (OpenERP)
2013-12-03 12:04:23 +05:30
parent baa430d237
commit c88dbc8b01
+1 -1
View File
@@ -596,7 +596,7 @@ class purchase_order(osv.osv):
.signal_button_cancel(cr, uid, map(attrgetter('id'), purchase.picking_ids))
for inv in purchase.invoice_ids:
if inv and inv.state not in ('cancel','draft'):
raise osv.except_osv(
raise osv.except_osv(_('Unable to cancel this purchase order.'),
_('You must first cancel all invoices related to this purchase order.'))
self.pool.get('account.invoice') \
.signal_invoice_cancel(cr, uid, map(attrgetter('id'), purchase.invoice_ids))