changeset 08242d36b1f7 in modules/commission:default
details:
https://hg.tryton.org/modules/commission?cmd=changeset;node=08242d36b1f7
description:
Add method to post invoices by batch
issue10054
review333811002
diffstat:
invoice.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diffs (19 lines):
diff -r e37df15bc8e6 -r 08242d36b1f7 invoice.py
--- a/invoice.py Tue Feb 09 00:32:17 2021 +0100
+++ b/invoice.py Sat Feb 27 15:23:46 2021 +0100
@@ -29,13 +29,11 @@
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