mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] flake8 PEP8 of module account_cancel_invoice_check_payment_order
This commit is contained in:
@@ -18,5 +18,3 @@
|
||||
#
|
||||
##############################################################################
|
||||
from . import account_invoice
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user