Apply dualmethod decorator to post method of account move

Since efdb98eb55e5 the original method is a dualmethod.

Closes #12682
This commit is contained in:
Cédric Krier
2023-10-28 10:56:33 +02:00
parent 87013b68f9
commit 71771568e3
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.i18n import gettext
from trytond.model import ModelView
from trytond.model import ModelView, dualmethod
from trytond.modules.account.exceptions import PostError
from trytond.pool import Pool, PoolMeta
@@ -22,7 +22,7 @@ class Move(metaclass=PoolMeta):
def _get_origin(cls):
return super(Move, cls)._get_origin() + ['account.statement']
@classmethod
@dualmethod
@ModelView.button
def post(cls, moves):
pool = Pool()
+2 -2
View File
@@ -6,7 +6,7 @@ from itertools import groupby
from sql import Literal, Null
from trytond.i18n import gettext
from trytond.model import ModelSQL, ModelView, Workflow, fields
from trytond.model import ModelSQL, ModelView, Workflow, dualmethod, fields
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval
from trytond.tools import sortable_values
@@ -192,7 +192,7 @@ class TaxLine(metaclass=PoolMeta):
class Move(metaclass=PoolMeta):
__name__ = 'account.move'
@classmethod
@dualmethod
@ModelView.button
def post(cls, moves):
pool = Pool()
+2 -2
View File
@@ -6,7 +6,7 @@ from itertools import groupby
from sql import Literal
from trytond.model import Check, Index, ModelSQL, ModelView, fields
from trytond.model import Check, Index, ModelSQL, ModelView, dualmethod, fields
from trytond.modules.currency.fields import Monetary
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval, PYSONEncoder
@@ -140,7 +140,7 @@ class Line(ModelSQL, ModelView):
class Move(metaclass=PoolMeta):
__name__ = 'account.move'
@classmethod
@dualmethod
@ModelView.button
def post(cls, moves):
pool = Pool()