From 6f3bbbeb4f52878bff8b56f60a40d8fcdd8e7c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 27 Feb 2021 15:23:46 +0100 Subject: [PATCH] Add method to post invoices by batch issue10054 review333811002 --- invoice.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index c58db6349f..c4ed70e4fc 100644 --- a/invoice.py +++ b/invoice.py @@ -29,13 +29,11 @@ class Invoice(metaclass=PoolMeta): return super()._journal_types(invoice_type) + ['commission'] @classmethod - @ModelView.button - @Workflow.transition('posted') - def post(cls, invoices): + def _post(cls, invoices): # Create commission only the first time the invoice is posted to_commission = [i for i in invoices if i.state not in ['posted', 'paid']] - super(Invoice, cls).post(invoices) + super()._post(invoices) cls.create_commissions(to_commission) @classmethod