From e0a4dccf7f4e4f47dfd7760a52b50ba205df2bbc Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Tue, 6 Oct 2015 15:50:46 +0200 Subject: [PATCH] Add patch for issue4491 --- issue7961002_40001.diff | 34 ++++++++++++++++++++++++++++++++++ series | 1 + 2 files changed, 35 insertions(+) create mode 100644 issue7961002_40001.diff diff --git a/issue7961002_40001.diff b/issue7961002_40001.diff new file mode 100644 index 0000000..f1dd5fd --- /dev/null +++ b/issue7961002_40001.diff @@ -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') diff --git a/series b/series index 4d1e924..46c5f58 100644 --- a/series +++ b/series @@ -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