From 8c9aa6d0b036a4beee960939f393316bdcd1a4a7 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 23 Dec 2014 09:53:14 +0100 Subject: [PATCH] Aged balance report: the only sensible filter is by end period The filters by date or by start period are meaningless for an aged partner balance. Hide the choice of filters and let only the 'end period' available. --- .../i18n/account_financial_report_webkit.pot | 5 +++++ account_financial_report_webkit/i18n/de.po | 5 +++++ account_financial_report_webkit/i18n/en_US.po | 5 +++++ account_financial_report_webkit/i18n/es.po | 5 +++++ account_financial_report_webkit/i18n/fr.po | 5 +++++ account_financial_report_webkit/i18n/it.po | 5 +++++ account_financial_report_webkit/i18n/nl.po | 5 +++++ .../wizard/aged_partner_balance_wizard.py | 13 ++++++++++++- .../wizard/aged_partner_balance_wizard.xml | 11 +++++++---- 9 files changed, 54 insertions(+), 5 deletions(-) diff --git a/account_financial_report_webkit/i18n/account_financial_report_webkit.pot b/account_financial_report_webkit/i18n/account_financial_report_webkit.pot index 861c314e..92a3eab1 100644 --- a/account_financial_report_webkit/i18n/account_financial_report_webkit.pot +++ b/account_financial_report_webkit/i18n/account_financial_report_webkit.pot @@ -1516,3 +1516,8 @@ msgstr "" msgid "{'required': [('filter', '=', 'filter_opening')]}" msgstr "" +#. module: account_financial_report_webkit +#: view:account.aged.trial.balance.webkit:account_financial_report_webkit.account_aged_trial_balance_webkit +msgid "At the end of" +msgstr "" + diff --git a/account_financial_report_webkit/i18n/de.po b/account_financial_report_webkit/i18n/de.po index 8f5173d3..531d513e 100644 --- a/account_financial_report_webkit/i18n/de.po +++ b/account_financial_report_webkit/i18n/de.po @@ -1320,3 +1320,8 @@ msgstr "" #: field:trial.balance.webkit,comp2_filter:0 msgid "Compare By" msgstr "" + +#. module: account_financial_report_webkit +#: view:account.aged.trial.balance.webkit:account_financial_report_webkit.account_aged_trial_balance_webkit +msgid "At the end of" +msgstr "" diff --git a/account_financial_report_webkit/i18n/en_US.po b/account_financial_report_webkit/i18n/en_US.po index 5db4722d..43886309 100644 --- a/account_financial_report_webkit/i18n/en_US.po +++ b/account_financial_report_webkit/i18n/en_US.po @@ -1320,3 +1320,8 @@ msgstr "" #: field:trial.balance.webkit,comp2_filter:0 msgid "Compare By" msgstr "" + +#. module: account_financial_report_webkit +#: view:account.aged.trial.balance.webkit:account_financial_report_webkit.account_aged_trial_balance_webkit +msgid "At the end of" +msgstr "" diff --git a/account_financial_report_webkit/i18n/es.po b/account_financial_report_webkit/i18n/es.po index 9b5d7314..159f85c7 100644 --- a/account_financial_report_webkit/i18n/es.po +++ b/account_financial_report_webkit/i18n/es.po @@ -1367,3 +1367,8 @@ msgstr "¡Valor haber o debe erróneo en el asiento contable!" #: field:trial.balance.webkit,comp2_filter:0 msgid "Compare By" msgstr "Comparar por" + +#. module: account_financial_report_webkit +#: view:account.aged.trial.balance.webkit:account_financial_report_webkit.account_aged_trial_balance_webkit +msgid "At the end of" +msgstr "" diff --git a/account_financial_report_webkit/i18n/fr.po b/account_financial_report_webkit/i18n/fr.po index 9956dd43..02cf5c0e 100644 --- a/account_financial_report_webkit/i18n/fr.po +++ b/account_financial_report_webkit/i18n/fr.po @@ -1580,3 +1580,8 @@ msgstr "" #: view:trial.balance.webkit:account_financial_report_webkit.account_trial_balance_view_webkit msgid "{'required': [('filter', '=', 'filter_opening')]}" msgstr "" + +#. module: account_financial_report_webkit +#: view:account.aged.trial.balance.webkit:account_financial_report_webkit.account_aged_trial_balance_webkit +msgid "At the end of" +msgstr "À fin de" diff --git a/account_financial_report_webkit/i18n/it.po b/account_financial_report_webkit/i18n/it.po index 09d7de92..57b33322 100644 --- a/account_financial_report_webkit/i18n/it.po +++ b/account_financial_report_webkit/i18n/it.po @@ -1366,3 +1366,8 @@ msgstr "Valore di credito o debito errato nella registrazione contabile!" #: field:trial.balance.webkit,comp2_filter:0 msgid "Compare By" msgstr "Confronta per" + +#. module: account_financial_report_webkit +#: view:account.aged.trial.balance.webkit:account_financial_report_webkit.account_aged_trial_balance_webkit +msgid "At the end of" +msgstr "" diff --git a/account_financial_report_webkit/i18n/nl.po b/account_financial_report_webkit/i18n/nl.po index f458ed75..ff293ac8 100644 --- a/account_financial_report_webkit/i18n/nl.po +++ b/account_financial_report_webkit/i18n/nl.po @@ -1320,3 +1320,8 @@ msgstr "" #: field:trial.balance.webkit,comp2_filter:0 msgid "Compare By" msgstr "" + +#. module: account_financial_report_webkit +#: view:account.aged.trial.balance.webkit:account_financial_report_webkit.account_aged_trial_balance_webkit +msgid "At the end of" +msgstr "" diff --git a/account_financial_report_webkit/wizard/aged_partner_balance_wizard.py b/account_financial_report_webkit/wizard/aged_partner_balance_wizard.py index a3126489..1a3ddca2 100644 --- a/account_financial_report_webkit/wizard/aged_partner_balance_wizard.py +++ b/account_financial_report_webkit/wizard/aged_partner_balance_wizard.py @@ -18,7 +18,7 @@ # along with this program. If not, see . # ############################################################################## -from openerp.osv import orm +from openerp.osv import orm, fields class AccountAgedTrialBalance(orm.TransientModel): @@ -31,6 +31,17 @@ class AccountAgedTrialBalance(orm.TransientModel): _name = "account.aged.trial.balance.webkit" _description = "Aged partner balanced" + _columns = { + 'filter': fields.selection( + [('filter_period', 'Periods')], + "Filter by", + required=True), + } + + _defaults = { + 'filter': 'filter_period', + } + def _print_report(self, cr, uid, ids, data, context=None): # we update form with display account value data = self.pre_print_report(cr, uid, ids, data, context=context) diff --git a/account_financial_report_webkit/wizard/aged_partner_balance_wizard.xml b/account_financial_report_webkit/wizard/aged_partner_balance_wizard.xml index 2d0d7273..7d19e28c 100644 --- a/account_financial_report_webkit/wizard/aged_partner_balance_wizard.xml +++ b/account_financial_report_webkit/wizard/aged_partner_balance_wizard.xml @@ -42,14 +42,17 @@ onchange_fiscalyear(fiscalyear_id, period_to, date_to, until_date) - - onchange_date_to(fiscalyear_id, period_to, date_to, until_date) + + True + + + True onchange_period_to(fiscalyear_id, period_to, date_to, until_date) - - [('fiscalyear_id', '=', fiscalyear_id), ('special', '=', False)] + + At the end of [('fiscalyear_id', '=', fiscalyear_id), ('special', '=', False)]