[FIX] flake8 PEP8 of module account_cancel_invoice_check_payment_order

This commit is contained in:
Nicolas Bessi
2014-07-10 16:24:08 +02:00
parent 872e03ad18
commit 7ebbc2e5ea
3 changed files with 15 additions and 17 deletions

View File

@@ -18,5 +18,3 @@
#
##############################################################################
from . import account_invoice
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@@ -18,19 +18,18 @@
#
##############################################################################
{
"name" : "Cancel invoice, check on payment order",
"version" : "1.0",
"depends" : ["account",
"account_payment",
"account_cancel"
],
"author" : "Camptocamp",
"name": "Cancel invoice, check on payment order",
"version": "1.0",
"depends": ["account",
"account_payment",
"account_cancel"],
"author": "Camptocamp",
"description": """
Prevents to cancel an invoice which has already been imported in a
payment order.
""",
'website': 'http://www.camptocamp.com',
'data' : [],
'data': [],
'installable': True,
'active': False,
}

View File

@@ -45,10 +45,11 @@ class account_invoice(orm.Model):
payment_orders = cr.dictfetchone()
if payment_orders:
raise osv.except_osv(
_('Error !'),
_("Invoice already imported in the payment "
"order (%s) at %s on line %s" %
(payment_orders['payment_name'],
payment_orders['payment_date'],
payment_orders['name'])))
return super(account_invoice,self).action_cancel(cr, uid, ids, *args)
_('Error !'),
_("Invoice already imported in the payment "
"order (%s) at %s on line %s" %
(payment_orders['payment_name'],
payment_orders['payment_date'],
payment_orders['name']))
)
return super(account_invoice, self).action_cancel(cr, uid, ids, *args)