changeset a328fca34a4b in modules/account_invoice:default
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=a328fca34a4b
description:
Convert Invoice.update_taxes into dualmethod
issue5334
review294221003
diffstat:
CHANGELOG | 1 +
invoice.py | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r 7383144676cd -r a328fca34a4b CHANGELOG
--- a/CHANGELOG Mon Jul 13 20:57:00 2020 +0200
+++ b/CHANGELOG Wed Jul 29 22:51:13 2020 +0200
@@ -1,3 +1,4 @@
+* Convert Invoice.update_taxes into dualmethod
* Rename invoice state from cancel to cancelled
Version 5.6.0 - 2020-05-04
diff -r 7383144676cd -r a328fca34a4b invoice.py
--- a/invoice.py Mon Jul 13 20:57:00 2020 +0200
+++ b/invoice.py Wed Jul 29 22:51:13 2020 +0200
@@ -11,7 +11,7 @@
from trytond.i18n import gettext
from trytond.model import Workflow, ModelView, ModelSQL, fields, \
- sequence_ordered, Unique, DeactivableMixin
+ sequence_ordered, Unique, DeactivableMixin, dualmethod
from trytond.model.exceptions import AccessError
from trytond.report import Report
from trytond.wizard import Wizard, StateView, StateTransition, StateAction, \
@@ -853,7 +853,7 @@
tax['invoice'] = self.id
return taxes
- @classmethod
+ @dualmethod
def update_taxes(cls, invoices, exception=False):
Tax = Pool().get('account.invoice.tax')
to_create = []
@@ -934,7 +934,7 @@
if self.move:
return self.move
- self.update_taxes([self], exception=True)
+ self.update_taxes(exception=True)
move_lines = []
for line in self.lines:
move_lines += line.get_move_lines()