Commit 1b7d733b authored by Jérome Perrin's avatar Jérome Perrin

Name fields after brain attribute instead of using script, and other small...

Name fields after brain attribute instead of using script, and other small cleanups on fields and forms.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36078 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 521efb8a
......@@ -118,30 +118,22 @@ if function:\n
params[\'function_uid\'] = traverse(function).getUid()\n
params[\'function\'] = function\n
if mirror_section:\n
params[\'mirror_section_uid\'] = traverse(mirror_section).getUid() \n
params[\'mirror_section_uid\'] = traverse(mirror_section).getUid()\n
if parent_portal_type:\n
params[\'parent_portal_type\'] = parent_portal_type\n
\n
\n
selection_columns = (\n
(\'Movement_getSpecificReference\', \'Transaction Reference\'),\n
(\'date\', \'Date\'),\n
(\'Movement_getExplanationTitle\', \'Accounting Transaction Title\'), )\n
if len(section_uid) > 1:\n
selection_columns = [\n
(\'Movement_getSpecificReference\', \'Transaction Reference\'),\n
(\'date\', \'Date\'),\n
(\'Movement_getExplanationTitle\', \'Accounting Transaction Title\'),\n
(\'section_title\', \'Section\'),\n
(\'Movement_getMirrorSectionTitle\', \'Third Party\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n
(\'running_total_price\', \'Net\'),]\n
else:\n
selection_columns = [\n
(\'Movement_getSpecificReference\', \'Transaction Reference\'),\n
(\'date\', \'Date\'),\n
(\'Movement_getExplanationTitle\', \'Accounting Transaction Title\'),\n
(\'Movement_getMirrorSectionTitle\', \'Third Party\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n
(\'running_total_price\', \'Net\'),]\n
selection_columns += ( (\'section_title\', \'Section\'), )\n
selection_columns += (\n
(\'Movement_getMirrorSectionTitle\', \'Third Party\'),\n
(\'debit_price\', \'Debit\'),\n
(\'credit_price\', \'Credit\'),\n
(\'running_total_price\', \'Net\'),)\n
\n
report_section_list = []\n
if from_date and detailed_from_date_summary:\n
......@@ -245,8 +237,9 @@ return report_section_list\n
<string>dict</string>
<string>params</string>
<string>_write_</string>
<string>len</string>
<string>selection_columns</string>
<string>len</string>
<string>_inplacevar_</string>
<string>report_section_list</string>
</tuple>
</value>
......
......@@ -103,6 +103,9 @@ function = request.get(\'function\')\n
if function:\n
params[\'function_uid\'] = portal.portal_categories.restrictedTraverse(function).getUid()\n
\n
analytic_columns = ()\n
group_analytics = False # XXX \'group\' in the sense of grouping\n
\n
account_columns = (\n
(\'Movement_getSpecificReference\', \'Reference\'),\n
(\'Movement_getExplanationTitle\', \'Title\'),\n
......@@ -110,13 +113,12 @@ account_columns = (\n
(\'Movement_getExplanationTranslatedPortalType\', \'Type\'),\n
(\'Movement_getExplanationReference\', \'Invoice Number\'),\n
(\'Movement_getMirrorSectionTitle\', \'Third Party\'),)\n
\n
if len(simulation_state) > 1:\n
account_columns += (\n
(\'getTranslatedSimulationStateTitle\', \'State\'),)\n
account_columns += (\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n
(\'debit_price\', \'Debit\'),\n
(\'credit_price\', \'Credit\'),\n
(\'running_total_price\', \'Net\'), )\n
\n
# utility functions\n
......@@ -217,9 +219,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
selection_name=\'account_preference_selection\',\n
selection_params=selection_params,\n
selection_columns=account_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[(\'stock.date\',\n
\'ascending\')]))\n
listbox_display_mode=\'FlatListMode\',))\n
\n
# non zero balance at begining of period\n
for inventory in portal.portal_simulation.getInventoryList(\n
......@@ -252,9 +252,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
selection_name=\'account_preference_selection\',\n
selection_params=selection_params,\n
selection_columns=account_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[(\'stock.date\',\n
\'ascending\')]))\n
listbox_display_mode=\'FlatListMode\',))\n
\n
\n
# profit & loss -> same, but from date limited to the current period\n
......@@ -284,9 +282,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
selection_name=\'account_preference_selection\',\n
selection_params=selection_params,\n
selection_columns=account_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[(\'stock.date\',\n
\'ascending\')]))\n
listbox_display_mode=\'FlatListMode\',))\n
\n
# group by mirror_section\n
# movements in the period\n
......@@ -317,9 +313,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
selection_name=\'account_preference_selection\',\n
selection_params=selection_params,\n
selection_columns=account_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[(\'stock.date\',\n
\'ascending\')]))\n
listbox_display_mode=\'FlatListMode\',))\n
\n
# non zero balance at begining of period\n
for inventory in portal.portal_simulation.getInventoryList(\n
......@@ -353,9 +347,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
selection_name=\'account_preference_selection\',\n
selection_params=selection_params,\n
selection_columns=account_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[(\'stock.date\',\n
\'ascending\')]))\n
listbox_display_mode=\'FlatListMode\',))\n
\n
\n
# group by payment\n
......@@ -387,9 +379,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
selection_name=\'account_preference_selection\',\n
selection_params=selection_params,\n
selection_columns=account_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[(\'stock.date\',\n
\'ascending\')]))\n
listbox_display_mode=\'FlatListMode\',))\n
\n
# non zero balance at begining of period\n
for inventory in portal.portal_simulation.getInventoryList(\n
......@@ -421,10 +411,8 @@ for inventory in portal.portal_simulation.getInventoryList(\n
form_id=\'Account_viewAccountingTransactionList\',\n
selection_name=\'account_preference_selection\',\n
selection_params=selection_params,\n
selection_columns=account_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[(\'stock.date\',\n
\'ascending\')]))\n
selection_columns=account_columns, ))\n
\n
report_section_list.sort(key=ReportSection.getTitle)\n
\n
......@@ -507,6 +495,8 @@ return report_section_list\n
<string>params</string>
<string>project</string>
<string>function</string>
<string>analytic_columns</string>
<string>group_analytics</string>
<string>account_columns</string>
<string>len</string>
<string>_inplacevar_</string>
......
......@@ -71,11 +71,11 @@ if node_category:\n
# calculated differently. As a result, the summary doesn\'t take from_date\n
# into account for income accounts.\n
return [Object(\n
debit=getInventoryAssetPrice(omit_output=1,\n
debit_price=getInventoryAssetPrice(omit_output=1,\n
node_category=node_category,\n
precision=precision,\n
**inventory_kw),\n
credit=-getInventoryAssetPrice(omit_input=1,\n
credit_price=-getInventoryAssetPrice(omit_input=1,\n
node_category=node_category,\n
precision=precision,\n
**inventory_kw) or 0 ) ]\n
......@@ -106,7 +106,7 @@ credit -= getInventoryAssetPrice(omit_input=1,\n
precision=precision,\n
**inventory_kw) or 0\n
\n
return [Object(debit=debit, credit=credit)]\n
return [Object(debit_price=debit, credit_price=credit)]\n
</string> </value>
</item>
<item>
......
......@@ -103,8 +103,8 @@ entity_columns = [\n
(\'Movement_getExplanationTitle\', \'Title\'),\n
(\'Movement_getSpecificReference\', \'Reference\'),\n
(\'getTranslatedSimulationStateTitle\', \'State\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n
(\'debit_price\', \'Debit\'),\n
(\'credit_price\', \'Credit\'),\n
(\'running_total_price\', \'Balance\'),\n
]\n
\n
......
......@@ -73,8 +73,8 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_credit</string>
<string>listbox_debit</string>
<string>listbox_credit_price</string>
<string>listbox_debit_price</string>
</list>
</value>
</item>
......
......@@ -330,16 +330,20 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>Debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>Credit</string>
</tuple>
</list>
......@@ -367,6 +371,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -386,11 +396,11 @@
<value>
<list>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>Debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>Credit</string>
</tuple>
</list>
......@@ -414,6 +424,10 @@
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>10</int> </value>
......@@ -454,6 +468,10 @@
<key> <string>report_tree</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
......@@ -498,6 +516,12 @@
<key> <string>title</string> </key>
<value> <string>General Ledger Summary</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......@@ -513,11 +537,8 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_credit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -19,7 +19,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_credit</string> </value>
<value> <string>listbox_debit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -75,6 +75,8 @@ if \'parent_portal_type\' in params:\n
\n
total_debit = 0\n
total_credit = 0\n
total_debit_price = 0\n
total_credit_price = 0\n
\n
line_list = []\n
for brain in portal.Base_zGetNotGroupedMovementList(\n
......@@ -118,10 +120,15 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
mirror_section_title = transaction.getSourceSectionTitle()\n
\n
\n
debit = max(brain.total_price, 0)\n
debit = max(brain.total_quantity, 0)\n
total_debit += debit\n
credit = max(-brain.total_price, 0)\n
credit = max(-brain.total_quantity, 0)\n
total_credit += credit\n
\n
debit_price = max(brain.total_price, 0)\n
total_debit_price += debit_price\n
credit_price = max(-brain.total_price, 0)\n
total_credit_price += credit_price\n
\n
brain_date = brain.date\n
if mvt.getStartDate():\n
......@@ -135,6 +142,8 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
Movement_getMirrorSectionTitle=mirror_section_title,\n
debit=debit,\n
credit=credit,\n
debit_price=debit_price,\n
credit_price=credit_price,\n
Movement_getExplanationTitle=\n
mvt.hasTitle() and mvt.getTitle() or transaction.getTitle()))\n
\n
......@@ -142,6 +151,12 @@ context.REQUEST.set(\n
\'Account_statNotGroupedAccountingTransactionList.total_debit\', total_debit)\n
context.REQUEST.set(\n
\'Account_statNotGroupedAccountingTransactionList.total_credit\', total_credit)\n
context.REQUEST.set(\n
\'Account_statNotGroupedAccountingTransactionList.total_debit_price\',\n
total_debit_price)\n
context.REQUEST.set(\n
\'Account_statNotGroupedAccountingTransactionList.total_credit_price\',\n
total_credit_price)\n
return line_list\n
</string> </value>
</item>
......@@ -208,6 +223,8 @@ return line_list\n
<string>portal_type_list</string>
<string>total_debit</string>
<string>total_credit</string>
<string>total_debit_price</string>
<string>total_credit_price</string>
<string>line_list</string>
<string>_getiter_</string>
<string>brain</string>
......@@ -219,6 +236,8 @@ return line_list\n
<string>debit</string>
<string>_inplacevar_</string>
<string>credit</string>
<string>debit_price</string>
<string>credit_price</string>
<string>brain_date</string>
</tuple>
</value>
......
......@@ -57,6 +57,10 @@
request = container.REQUEST\n
\n
return [Object(\n
debit_price=request.get(\n
\'Account_statNotGroupedAccountingTransactionList.total_debit_price\'),\n
credit_price=request.get(\n
\'Account_statNotGroupedAccountingTransactionList.total_credit_price\'),\n
debit=request.get(\n
\'Account_statNotGroupedAccountingTransactionList.total_debit\'),\n
credit=request.get(\n
......
......@@ -40,6 +40,16 @@
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
......@@ -89,6 +99,8 @@
<string>listbox_total_price</string>
<string>listbox_running_total_price</string>
<string>listbox_date</string>
<string>listbox_credit_price</string>
<string>listbox_debit_price</string>
</list>
</value>
</item>
......@@ -150,6 +162,10 @@
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -13,7 +13,6 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
</list>
</value>
......@@ -56,12 +55,6 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -81,10 +74,6 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
......@@ -107,20 +96,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Movement_getCreditPrice(brain=cell)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_credit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -13,7 +13,6 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
</list>
</value>
......@@ -57,10 +56,8 @@
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -81,10 +78,6 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
......@@ -107,20 +100,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Movement_getDebitPrice(brain=cell)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_debit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -375,11 +375,11 @@
<string>State</string>
</tuple>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>Debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>Credit</string>
</tuple>
<tuple>
......@@ -415,6 +415,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -438,11 +444,11 @@
<string>date</string>
</tuple>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>credit</string>
</tuple>
<tuple>
......@@ -490,6 +496,10 @@
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>25</int> </value>
......@@ -521,28 +531,7 @@
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Accounting Transaction</string>
<string>Accounting Transaction</string>
</tuple>
<tuple>
<string>Purchase Invoice Transaction</string>
<string>Purchase Invoice Transaction</string>
</tuple>
<tuple>
<string>Sale Invoice Transaction</string>
<string>Sale Invoice Transaction</string>
</tuple>
<tuple>
<string>Balance Transaction</string>
<string>Balance Transaction</string>
</tuple>
<tuple>
<string>Pay Sheet Transaction</string>
<string>Pay Sheet Transaction</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -559,6 +548,10 @@
<key> <string>report_tree</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
......@@ -619,6 +612,12 @@
<key> <string>title</string> </key>
<value> <string>Transactions Related to This Account</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......
......@@ -76,26 +76,18 @@ precision = context.account_module.getQuantityPrecisionFromResource(currency)\n
# we set the precision in request, for formatting on editable fields\n
request.set(\'precision\', precision)\n
\n
if len(portal_type) > 1:\n
selection_columns = [\n
(\'specific_reference\', \'Transaction Reference\'),\n
(\'date\', \'Date\'),\n
(\'title\', \'Accounting Transaction Title\'),\n
(\'portal_type\', \'Journal Type\'),\n
(\'node_title\', \'Account\'),\n
(\'mirror_section_title\', \'Third Party\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\')]\n
else:\n
selection_columns = [\n
selection_columns = (\n
(\'specific_reference\', \'Transaction Reference\'),\n
(\'date\', \'Date\'),\n
(\'title\', \'Accounting Transaction Title\'),\n
(\'title\', \'Accounting Transaction Title\'),)\n
if len(portal_type) > 1:\n
selection_columns += (\n
(\'portal_type\', \'Journal Type\'), )\n
selection_columns += (\n
(\'node_title\', \'Account\'),\n
(\'mirror_section_title\', \'Third Party\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\')]\n
\n
(\'credit\', \'Credit\'))\n
\n
return [ReportSection(\n
path=context.getPhysicalPath(),\n
......@@ -168,8 +160,9 @@ return [ReportSection(\n
<string>gap_root</string>
<string>currency</string>
<string>precision</string>
<string>len</string>
<string>selection_columns</string>
<string>len</string>
<string>_inplacevar_</string>
<string>dict</string>
</tuple>
</value>
......
......@@ -86,8 +86,8 @@
<value>
<list>
<string>listbox_delivery_reference</string>
<string>listbox_debit</string>
<string>listbox_credit</string>
<string>listbox_debit_price</string>
<string>listbox_credit_price</string>
<string>listbox_delivery_portal_type</string>
<string>listbox_node_title</string>
<string>listbox_date</string>
......
......@@ -134,11 +134,11 @@
<string>Grouping</string>
</tuple>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>Debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>Credit</string>
</tuple>
<tuple>
......@@ -181,11 +181,11 @@
<string>Date</string>
</tuple>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>Debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>Credit</string>
</tuple>
</list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>precision</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_credit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>listbox_source_credit</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountingTransaction_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: max( - cell.total_price, 0) or 0</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/precision | python: 2</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -13,14 +13,14 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
<string>precision</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_debit</string> </value>
<value> <string>listbox_credit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -56,12 +56,6 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -70,6 +64,12 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
......@@ -81,10 +81,6 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
......@@ -97,6 +93,10 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -118,7 +118,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Movement_getDebitPrice(brain=cell)</string> </value>
<value> <string>request/precision | python: 2</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>default</string>
<string>precision</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_debit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>listbox_source_debit</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountingTransaction_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Debit</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: max(cell.total_price, 0)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/precision | python: 2</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -13,14 +13,14 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
<string>precision</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_credit</string> </value>
<value> <string>listbox_debit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -57,10 +57,8 @@
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -70,6 +68,12 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
......@@ -81,10 +85,6 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
......@@ -97,6 +97,10 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -118,7 +122,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Movement_getCreditPrice(brain=cell)</string> </value>
<value> <string>request/precision | python: 2</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -169,7 +169,8 @@ Here, a group of movement means:\n
mirror_section.relative_url as mirror_section_relative_url,\n
mirror_section.title as mirror_section_title,\n
stock.date as date,\n
IFNULL(stock.total_price, 0) as total_price\n
IFNULL(stock.total_price, 0) as total_price,\n
IFNULL(stock.quantity, 0) as total_quantity\n
\n
FROM catalog, stock LEFT JOIN catalog AS mirror_section on \n
( stock.mirror_section_uid = mirror_section.uid )\n
......@@ -198,7 +199,8 @@ Here, a group of movement means:\n
mirror_section.relative_url as mirror_section_relative_url,\n
mirror_section.title as mirror_section_title,\n
stock.date as date,\n
IFNULL(stock.total_price, 0) as total_price\n
IFNULL(stock.total_price, 0) as total_price,\n
IFNULL(stock.quantity, 0) as total_quantity\n
\n
FROM catalog AS catalog_2, stock AS stock_2, \n
catalog AS catalog, stock AS stock LEFT JOIN catalog AS mirror_section\n
......@@ -231,7 +233,8 @@ Here, a group of movement means:\n
HAVING max(stock_2.date) > <dtml-sqlvar "at_date" type="datetime">\n
)\n
\n
ORDER BY mirror_section_title, date
ORDER BY mirror_section_title, date\n
]]></string> </value>
</item>
......@@ -287,7 +290,8 @@ Here, a group of movement means:\n
mirror_section.relative_url as mirror_section_relative_url,\n
mirror_section.title as mirror_section_title,\n
stock.date as date,\n
IFNULL(stock.total_price, 0) as total_price\n
IFNULL(stock.total_price, 0) as total_price,\n
IFNULL(stock.quantity, 0) as total_quantity\n
\n
FROM catalog, stock LEFT JOIN catalog AS mirror_section on \n
( stock.mirror_section_uid = mirror_section.uid )\n
......@@ -316,7 +320,8 @@ Here, a group of movement means:\n
mirror_section.relative_url as mirror_section_relative_url,\n
mirror_section.title as mirror_section_title,\n
stock.date as date,\n
IFNULL(stock.total_price, 0) as total_price\n
IFNULL(stock.total_price, 0) as total_price,\n
IFNULL(stock.quantity, 0) as total_quantity\n
\n
FROM catalog AS catalog_2, stock AS stock_2, \n
catalog AS catalog, stock AS stock LEFT JOIN catalog AS mirror_section\n
......@@ -349,7 +354,8 @@ Here, a group of movement means:\n
HAVING max(stock_2.date) > <dtml-sqlvar "at_date" type="datetime">\n
)\n
\n
ORDER BY mirror_section_title, date
ORDER BY mirror_section_title, date\n
]]></string> </value>
</item>
......
......@@ -84,9 +84,9 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_credit</string>
<string>listbox_credit_price</string>
<string>listbox_date</string>
<string>listbox_debit</string>
<string>listbox_debit_price</string>
<string>listbox_running_total_price</string>
<string>listbox_total_price</string>
</list>
......
......@@ -13,20 +13,20 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>columns</string>
<string>sort_columns</string>
<string>sort</string>
<string>list_method</string>
<string>stat_method</string>
<string>selection_name</string>
<string>portal_types</string>
<string>default_params</string>
<string>domain_root_list</string>
<string>domain_tree</string>
<string>editable_columns</string>
<string>list_method</string>
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>sort_columns</string>
<string>stat_columns</string>
<string>stat_method</string>
<string>title</string>
<string>url_columns</string>
<string>domain_tree</string>
<string>domain_root_list</string>
</list>
</value>
</item>
......@@ -152,11 +152,11 @@
<string>State</string>
</tuple>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>Debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>Credit</string>
</tuple>
<tuple>
......@@ -200,11 +200,11 @@
<value>
<list>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>credit</string>
</tuple>
<tuple>
......@@ -255,32 +255,7 @@
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Accounting Transaction</string>
<string>Accounting Transaction</string>
</tuple>
<tuple>
<string>Purchase Invoice Transaction</string>
<string>Purchase Invoice Transaction</string>
</tuple>
<tuple>
<string>Sale Invoice Transaction</string>
<string>Sale Invoice Transaction</string>
</tuple>
<tuple>
<string>Balance Transaction</string>
<string>Balance Transaction</string>
</tuple>
<tuple>
<string>Payement Transaction</string>
<string>Payement Transaction</string>
</tuple>
<tuple>
<string>Pay Sheet Transaction</string>
<string>Pay Sheet Transaction</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -322,11 +297,11 @@
<value>
<list>
<tuple>
<string>debit</string>
<string>debit_price</string>
<string>Entity_statDebit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit_price</string>
<string>Entity_statCredit</string>
</tuple>
<tuple>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_credit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -19,7 +19,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_debit</string> </value>
<value> <string>listbox_debit_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -208,7 +208,7 @@ return portal.portal_simulation.getMovementHistoryList(\n
selection_domain=context.portal_selections.getSelectionDomainDictFor(selection_name),\n
selection_domain_join_column=\'section_uid\',\n
sort_on=sort_on,\n
ignore_group_by=True,\n
ignore_group_by=True,\n
src__=src__,\n
**params)\n
......
1245
\ No newline at end of file
1255
\ No newline at end of file
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