From 49badb30939f5e90da817d14f25dcb9865b1cddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 18 Nov 2010 14:12:40 +0000 Subject: [PATCH] restore the ability to use a from date in preference from Transaction tab git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40373 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_accounting/Node_getAccountingTransactionList.xml | 7 +++++++ bt5/erp5_accounting/bt/revision | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml index 3139193787..55bc0c6ef9 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml @@ -63,6 +63,12 @@ if params.get(\'precision\', None) is not None:\n # listbox editable float fields uses request/precision to format the value.\n request.set(\'precision\', params[\'precision\'])\n \n +if not request.get(\'is_accounting_report\'):\n + # if we are in the UI, we use from date from preferences, but in a report we\n + # don\'t use any information from preferences, as they are passed by the\n + # report dialog\n + from_date = portal.portal_preferences.getPreferredAccountingTransactionFromDate()\n +\n # this script can be used for Node, Section or Payment\n if kw.get(\'node_uid\'):\n params[\'node_uid\'] = kw[\'node_uid\']\n @@ -130,6 +136,7 @@ if params.get(\'node_uid\'):\n is_pl_account = node.isMemberOf(\'account_type/expense\')\\\n or node.isMemberOf(\'account_type/income\')\n \n +\n if is_pl_account and not from_date:\n from_date = params.get(\'period_start_date\')\n \n diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index ca12c174d8..347c6fecb0 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1404 \ No newline at end of file +1405 \ No newline at end of file -- 2.30.9