35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
|
diff -r 1612dc06414e account.py
|
||
|
--- a/trytond/trytond/modules/account/account.py Tue Oct 06 15:47:15 2015 +0200
|
||
|
+++ b/trytond/trytond/modules/account/account.py Tue Oct 06 15:50:07 2015 +0200
|
||
|
@@ -4,6 +4,7 @@
|
||
|
import datetime
|
||
|
import operator
|
||
|
from itertools import izip, groupby
|
||
|
+from functools import wraps
|
||
|
from sql import Column, Literal
|
||
|
from sql.aggregate import Sum
|
||
|
from sql.conditionals import Coalesce
|
||
|
@@ -30,6 +31,14 @@
|
||
|
'OpenAgedBalanceStart', 'OpenAgedBalance', 'AgedBalance']
|
||
|
|
||
|
|
||
|
+def inactive_records(func):
|
||
|
+ @wraps(func)
|
||
|
+ def wrapper(*args, **kwargs):
|
||
|
+ with Transaction().set_context(active_test=False):
|
||
|
+ return func(*args, **kwargs)
|
||
|
+ return wrapper
|
||
|
+
|
||
|
+
|
||
|
class TypeTemplate(ModelSQL, ModelView):
|
||
|
'Account Type Template'
|
||
|
__name__ = 'account.account.type.template'
|
||
|
@@ -1793,6 +1802,7 @@
|
||
|
Button('Ok', 'end', 'tryton-ok', default=True),
|
||
|
])
|
||
|
|
||
|
+ @inactive_records
|
||
|
def transition_update(self):
|
||
|
pool = Pool()
|
||
|
TaxCode = pool.get('account.tax.code')
|