diff --git a/invoice.py b/invoice.py
index e647fb9129..544b68558c 100644
--- a/invoice.py
+++ b/invoice.py
@@ -8,7 +8,7 @@ from trytond.report import Report
from trytond.wizard import Wizard, StateView, StateTransition, StateAction, \
Button
from trytond.backend import TableHandler, FIELDS
-from trytond.pyson import If, Eval, Bool
+from trytond.pyson import If, Eval, Bool, Id
from trytond.tools import reduce_ids
from trytond.transaction import Transaction
from trytond.pool import Pool
@@ -204,6 +204,11 @@ class Invoice(Workflow, ModelSQL, ModelView):
'open': {
'invisible': ~Eval('state').in_(['draft', 'proforma']),
},
+ 'pay': {
+ 'invisible': Eval('state') != 'open',
+ 'readonly': ~Eval('groups', []).contains(
+ Id('account', 'group_account')),
+ },
})
def init(self, module_name):
@@ -1285,6 +1290,10 @@ class Invoice(Workflow, ModelSQL, ModelView):
self.create_move(invoice)
self.print_invoice(invoice)
+ @ModelView.button_action('account_invoice.wizard_pay')
+ def pay(self, ids):
+ pass
+
def process(self, ids):
paid = []
open_ = []
diff --git a/invoice.xml b/invoice.xml
index 3a1b94ae44..faf535519b 100644
--- a/invoice.xml
+++ b/invoice.xml
@@ -67,17 +67,12 @@ this repository contains the full copyright notices and license terms. -->
-