[FIX] Manual policy wizard should not be launched against customer refund

This commit is contained in:
Nicolas Bessi
2014-04-28 15:41:36 +02:00
parent 0dd11594bd
commit 41a1a4eff8

View File

@@ -60,7 +60,7 @@ class credit_control_policy_changer(orm.TransientModel):
return False
# raise ValueError('No active_ids passed in context')
for invoice in inv_model.browse(cr, uid, active_ids, context=context):
if invoice.type in ('in_invoice', 'in_refund'):
if invoice.type in ('in_invoice', 'in_refund', 'out_refund'):
raise orm.except_orm(_('User error'),
_('Please use wizard on cutomer invoices'))