diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 6bee36dfed5..83407aec4bc 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -548,7 +548,10 @@ class AccountInvoice(models.Model): """ self.ensure_one() self.sent = True - return self.env.ref('account.account_invoices').report_action(self) + if self.user_has_groups('account.group_account_invoice'): + return self.env.ref('account.account_invoices').report_action(self) + else: + return self.env.ref('account.account_invoices_without_payment').report_action(self) @api.multi def action_invoice_sent(self): diff --git a/addons/account/views/account_report.xml b/addons/account/views/account_report.xml index 2ba116e884a..8918d2763e7 100644 --- a/addons/account/views/account_report.xml +++ b/addons/account/views/account_report.xml @@ -11,6 +11,7 @@ file="account.report_invoice_with_payments" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" print_report_name="(object._get_printed_report_name())" + groups="account.group_account_invoice" />