Add patch for issue4491

This commit is contained in:
Sergi Almacellas Abellana 2015-10-06 15:50:46 +02:00
parent 79111c4fbf
commit e0a4dccf7f
2 changed files with 35 additions and 0 deletions

34
issue7961002_40001.diff Normal file
View file

@ -0,0 +1,34 @@
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')

1
series
View file

@ -70,5 +70,6 @@ issue4986.diff
issue16661002_1.diff
issue19491002_1.diff
issue20451002_1.diff
issue7961002_40001.diff
#account_chart_speedup.diff
#fix_rounding_in_sync_inventory_to_outgoing.patch