Commit 5e2e16c5 authored by Jérome Perrin's avatar Jérome Perrin

only show opened accounts


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4735 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ec91ae04
...@@ -167,7 +167,7 @@ AAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </ ...@@ -167,7 +167,7 @@ AAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/local_accounting/InvoiceTransactionLine_getDestinationItemList</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/InvoiceTransactionLine_getDestinationItemList</string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
......
...@@ -76,11 +76,7 @@ category_dict = {\'income\': \'account_type/income\',\n ...@@ -76,11 +76,7 @@ category_dict = {\'income\': \'account_type/income\',\n
\'refundable_vat\': \'account_type/asset/receivable/refundable_vat\',\n \'refundable_vat\': \'account_type/asset/receivable/refundable_vat\',\n
\'bank\': \'account_type/asset/bank\',\n \'bank\': \'account_type/asset/bank\',\n
}\n }\n
\n category = category_dict.get(context.id, \'account_type\')\n
if context.id in category_dict:\n
category = category_dict[context.id]\n
else:\n
category = \'account_type\'\n
\n \n
display_dict = {}\n display_dict = {}\n
def display(x):\n def display(x):\n
...@@ -93,67 +89,81 @@ def display(x):\n ...@@ -93,67 +89,81 @@ def display(x):\n
def sort(x,y):\n def sort(x,y):\n
return cmp(display(x), display(y))\n return cmp(display(x), display(y))\n
\n \n
def getItemList(category=None, portal_path=None):\n def getItemList(category=None, portal_path=None, user_name = None, simulation_state = None):\n
cat = context.portal_categories.resolveCategory(category)\n cat = context.portal_categories.resolveCategory(category)\n
filter_dict = {}\n
# we don\'t filter in "old" transactions or report / search dialogs\n
if simulation_state not in (\'delivered\', \'cancelled\', \'no_simulation_state\') :\n
filter_dict[\'validation_state\'] = (\'draft\', \'validated\')\n
item_list = cat.getCategoryMemberItemList(portal_type=\'Account\', base=0,\n item_list = cat.getCategoryMemberItemList(portal_type=\'Account\', base=0,\n
display_method=display, sort_method=sort)\n display_method=display, sort_method=sort, filter=filter_dict)\n
return item_list\n return item_list\n
\n \n
getItemList = CachingMethod(getItemList, id=(\'getInvoiceTransactionLineItemList\', \'getItemList\'))\n getItemList = CachingMethod(getItemList, id=(\'getInvoiceTransactionLineItemList\', \'getItemList\'))\n
portal_path = context.getPortalObject().getPhysicalPath()\n portal_path = context.getPortalObject().getPhysicalPath()\n
return getItemList(category=category, portal_path=portal_path)\n \n
return getItemList( category=category, portal_path=portal_path, \n
user_name=context.REQUEST.AUTHENTICATED_USER,\n
simulation_state = context.getProperty(\'simulation_state\', \'no_simulation_state\') )\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAA0AAAARAAAAAwAA <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAAwAAAATAAAAAwAA
AHMKAQAAZAEAawAAbAEAfQEAAWgAAARkAgBkAwADPARkBABkBQADPARkBgBkBwADPARkCABkCQAD AHMpAQAAZAEAawAAbAEAfQEAAWgAAARkAgBkAwADPARkBABkBQADPARkBgBkBwADPARkCABkCQAD
PARkCgBkCwADPARkDABkDQADPARkDgBkDwADPH0CAHQDAHQEAGQQAIMCAHwCAGoGAG8cAAF0BQB8 PARkCgBkCwADPARkDABkDQADPARkDgBkDwADPH0CAHQDAHwCAGQQAIMCAHQDAHQEAGQRAIMCAGQS
AgB0AwB0BABkEACDAgCDAgB9BgBuBwABZBEAfQY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Y2F0ZWdvcnlzDAAAAGRpc3BsYXlfZGljdHMH
ZVRyYW5zYWN0aW9uTGluZV9nZXRTb3VyY2VJdGVtTGlzdCgBAAAAcygAAABJbnZvaWNlVHJhbnNh AAAAZGlzcGxheXMEAAAAc29ydHMEAAAATm9uZXMLAAAAZ2V0SXRlbUxpc3RzCwAAAHBvcnRhbF9w
Y3Rpb25MaW5lX2dldFNvdXJjZUl0ZW1MaXN0KAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQeXRob24p YXRoKAwAAABzFwAAAFByb2R1Y3RzLkVSUDVUeXBlLkNhY2hlcw0AAABDYWNoaW5nTWV0aG9kcw0A
cwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value> AABjYXRlZ29yeV9kaWN0cwkAAABfZ2V0YXR0cl9zBwAAAGNvbnRleHRzCAAAAGNhdGVnb3J5cwwA
AABkaXNwbGF5X2RpY3RzBwAAAGRpc3BsYXlzBAAAAHNvcnRzBAAAAE5vbmVzCwAAAGdldEl0ZW1M
aXN0cwsAAABwb3J0YWxfcGF0aCgAAAAAKAMAAABzBAAAAHNvcnRzDAAAAGRpc3BsYXlfZGljdHMH
AAAAZGlzcGxheXMPAAAAU2NyaXB0IChQeXRob24pcygAAABJbnZvaWNlVHJhbnNhY3Rpb25MaW5l
X2dldFNvdXJjZUl0ZW1MaXN0AQAAAHMWAAAADQJFCCECBgEMBwwDGwoYAR4CGAEVASgBAAAAcygA
AABJbnZvaWNlVHJhbnNhY3Rpb25MaW5lX2dldFNvdXJjZUl0ZW1MaXN0KAEAAABzKAAAAEludm9p
Y2VUcmFuc2FjdGlvbkxpbmVfZ2V0U291cmNlSXRlbUxpc3QoAAAAACgAAAAAcw8AAABTY3JpcHQg
KFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item> </item>
<item> <item>
<key> <string>_dav_writelocks</string> </key> <key> <string>_dav_writelocks</string> </key>
...@@ -163,7 +173,7 @@ cwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value> ...@@ -163,7 +173,7 @@ cwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/local_accounting/InvoiceTransactionLine_getSourceItemList</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/InvoiceTransactionLine_getSourceItemList</string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
...@@ -198,7 +208,6 @@ cwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value> ...@@ -198,7 +208,6 @@ cwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
<string>category_dict</string> <string>category_dict</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>_getitem_</string>
<string>category</string> <string>category</string>
<string>display_dict</string> <string>display_dict</string>
<string>display</string> <string>display</string>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment