mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
34 lines
1 KiB
Diff
34 lines
1 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')
|