diff --git a/account.py b/account.py index e7b61fda85..dc120f3a89 100644 --- a/account.py +++ b/account.py @@ -761,7 +761,7 @@ class Account(ModelSQL, ModelView): res[account_id] += deferral.debit - deferral.credit else: with Transaction().set_context(fiscalyear=fiscalyear.id, - date=None, periods=None): + date=None): res2 = self.get_balance(ids, name) for account_id in ids: res[account_id] += res2[account_id] @@ -861,7 +861,7 @@ class Account(ModelSQL, ModelView): res[name][account_id] += deferral[name] else: with Transaction().set_context(fiscalyear=fiscalyear.id, - date=None, dates=None): + date=None): res2 = self.get_credit_debit(ids, names) for account_id in ids: for name in names: @@ -1467,7 +1467,7 @@ class TrialBalance(Report): start_accounts = account_obj.browse(account_ids) with Transaction().set_context( - fiscalyear=None, + fiscalyear=data['fiscalyear'], periods=end_period_ids, posted=data['posted']): in_accounts = account_obj.browse(account_ids) diff --git a/fiscalyear.py b/fiscalyear.py index 1a7cd71994..fc506b91a7 100644 --- a/fiscalyear.py +++ b/fiscalyear.py @@ -170,13 +170,14 @@ class FiscalYear(ModelSQL, ModelView): 'type': 'standard', }) period_start_date = period_end_date + relativedelta(days=1) + return True @ModelView.button def create_period_3(self, ids): ''' Create periods for the fiscal years with 3 months interval ''' - self.create_period(ids, interval=3) + return self.create_period(ids, interval=3) def find(self, company_id, date=None, exception=True): ''' diff --git a/fiscalyear.xml b/fiscalyear.xml index e5bf1018ec..86ae17c570 100644 --- a/fiscalyear.xml +++ b/fiscalyear.xml @@ -28,9 +28,11 @@ this repository contains the full copyright notices and license terms. -->