From 7fdd3251f5ad3026aac0277cb57f439018102d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 18 Nov 2010 10:27:52 +0000 Subject: [PATCH] group can be None, so this sometimes fail in AttributeError git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40353 20353a03-c40f-0410-a6d1-a30d3c3de9de --- ...Module_getAccountingLineReportLineList.xml | 79 ++++++++++++++++++- bt5/erp5_accounting/bt/revision | 2 +- 2 files changed, 78 insertions(+), 3 deletions(-) diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml index ea2753ef7d..4c6e0d55fa 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml @@ -66,7 +66,7 @@ def isSource(accounting_transaction):\n source_section = accounting_transaction.getSourceSectionValue()\n if source_section is None:\n return False\n - group = source_section.getGroup(base=True)\n + group = source_section.getGroup(base=True) or \'\'\n if section_category_strict:\n return group == section_category\n return group.startswith(section_category)\n @@ -77,7 +77,7 @@ def isDestination(accounting_transaction):\n destination_section = accounting_transaction.getDestinationSectionValue()\n if destination_section is None:\n return False\n - group = destination_section.getGroup(base=True)\n + group = destination_section.getGroup(base=True) or \'\' \n if section_category_strict:\n return group == section_category\n return group.startswith(section_category)\n @@ -272,6 +272,81 @@ return line_list\n <tuple/> </value> </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>kw</string> + <string>Products.PythonScripts.standard</string> + <string>Object</string> + <string>line_list</string> + <string>_getattr_</string> + <string>context</string> + <string>request</string> + <string>portal</string> + <string>portal_selections</string> + <string>selection_name</string> + <string>selection_params</string> + <string>section_category</string> + <string>section_category_strict</string> + <string>isSource</string> + <string>isDestination</string> + <string>currency</string> + <string>checked_uid_list</string> + <string>getObject</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>uid</string> + <string>delivery_list</string> + <string>params</string> + <string>None</string> + <string>_write_</string> + <string>dict</string> + <string>account_reference_cache</string> + <string>getAccountReference</string> + <string>getTitle</string> + <string>bank_account_title_cache</string> + <string>getBankAccountTitle</string> + <string>accounting_currency_reference_cache</string> + <string>getAccountingCurrencyReference</string> + <string>portal_type</string> + <string>delivery</string> + <string>is_source</string> + <string>is_destination</string> + <string>movement</string> + <string>node</string> + <string>node_title</string> + <string>node_account_type_title</string> + <string>node_financial_section_title</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> <item> <key> <string>id</string> </key> <value> <string>AccountingTransactionModule_getAccountingLineReportLineList</string> </value> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 62713742b7..6f5d72eacc 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1390 \ No newline at end of file +1391 \ No newline at end of file -- 2.30.9