[IMP] improved warning message
bzr revid: bde@tinyerp.com-20131203063423-ne1dwsy4q0vp53hj
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user