[Erp5-report] r10938 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Oct 25 16:17:47 CEST 2006


Author: jerome
Date: Wed Oct 25 16:17:42 2006
New Revision: 10938

URL: http://svn.erp5.org?rev=10938&view=rev
Log:
Destination tab can be used for the section in a Purchase Invoice or for the
mirror section on a Sale Invoice, so disable account filtering on that screen.


Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml?rev=10938&r1=10937&r2=10938&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml Wed Oct 25 16:17:42 2006
@@ -70,13 +70,24 @@
             <key> <string>_body</string> </key>
             <value> <string>"""Return item list of accounts that can be used as node for this accounting\n
 transaction line.\n
-The id of the line is used to filter the list. If `mirror` is set to a true\n
-value, the list will be filtered for the mirror node.\n
+The id of the line is used to filter the list, unless `omit_filter` is true.\n
+If `mirror` is set to a true value, the list will be filtered for the mirror\n
+node.\n
 """\n
 from Products.ERP5Type.Cache import CachingMethod\n
 portal = context.getPortalObject()\n
 \n
-if not mirror:\n
+if omit_filter:\n
+  category_dict = {\n
+    \'income\': \'account_type\',\n
+    \'expense\': \'account_type\',\n
+    \'payable\': \'account_type\',\n
+    \'receivable\': \'account_type\',\n
+    \'collected_vat\': \'account_type\',\n
+    \'refundable_vat\': \'account_type\',\n
+    \'bank\': \'account_type/asset\',\n
+    \'cash\': \'account_type/asset\', }\n
+elif not mirror:\n
   category_dict = {\n
     \'income\': \'account_type/income\',\n
     \'expense\': \'account_type/expense\',\n
@@ -87,7 +98,7 @@
     \'bank\': \'account_type/asset/cash\',\n
     \'cash\': \'account_type/asset/cash\', }\n
 else:\n
-   category_dict = {\n
+  category_dict = {\n
     \'income\': \'account_type/expense\',\n
     \'expense\': \'account_type/income\',\n
     \'payable\': \'account_type/asset/receivable\',\n
@@ -128,9 +139,6 @@
                               base=0,\n
                               display_method=display,\n
                               sort_method=sort,\n
-                              # we don\'t want strict membership if now category\n
-                              # has been found.\n
-                              strict_membership=0,\n
                               filter=filter_dict)\n
   return item_list\n
 \n
@@ -143,6 +151,7 @@
 return getItemList( category=category,\n
                     portal_path=context.getPortalObject().getPhysicalPath(),\n
                     mirror=mirror,\n
+                    omit_filter=omit_filter, # XXX possible optim: only one cache if omit_filter\n
                     user_name=context.REQUEST.AUTHENTICATED_USER,\n
                     simulation_state=context.getProperty(\n
                           \'simulation_state\', \'no_simulation_state\') )\n
@@ -174,7 +183,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>mirror=0</string> </value>
+            <value> <string>mirror=0, omit_filter=0</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -194,13 +203,14 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
+                        <value> <int>2</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
                             <string>mirror</string>
+                            <string>omit_filter</string>
                             <string>Products.ERP5Type.Cache</string>
                             <string>CachingMethod</string>
                             <string>_getattr_</string>
@@ -227,6 +237,7 @@
             <value>
               <tuple>
                 <int>0</int>
+                <int>0</int>
               </tuple>
             </value>
         </item>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml?rev=10938&r1=10937&r2=10938&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml Wed Oct 25 16:17:42 2006
@@ -281,7 +281,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList(mirror=1)</string> </value>
+            <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList(omit_filter=1)</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml?rev=10938&r1=10937&r2=10938&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml Wed Oct 25 16:17:42 2006
@@ -281,7 +281,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
+            <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList(omit_filter=1)</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=10938&r1=10937&r2=10938&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Wed Oct 25 16:17:42 2006
@@ -1,1 +1,1 @@
-98
+99




More information about the Erp5-report mailing list