Commit e4f4dc0e authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Cédric Le Ninivin

erp5_accounting: make section editable in listbox and has same possible value...

erp5_accounting: make section editable in listbox and has same possible value as Transaction's section
parent 5cb5d6c5
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
<list> <list>
<string>my_source_debit</string> <string>my_source_debit</string>
<string>my_source_title</string> <string>my_source_title</string>
<string>my_source_section_title</string>
<string>my_source_function</string> <string>my_source_function</string>
<string>my_source_funding</string> <string>my_source_funding</string>
<string>my_source_section</string>
<string>my_source_project_title</string> <string>my_source_project_title</string>
<string>my_source_payment_request_title</string> <string>my_source_payment_request_title</string>
<string>my_source_payment</string> <string>my_source_payment</string>
......
...@@ -9,15 +9,12 @@ ...@@ -9,15 +9,12 @@
<item> <item>
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list/>
<string>editable</string>
<string>title</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_source_section_title</string> </value> <value> <string>my_source_section</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -73,24 +70,48 @@ ...@@ -73,24 +70,48 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable_permission</string> </key>
<value> <int>0</int> </value> <value>
<list/>
</value>
</item>
<item>
<key> <string>editable_role</string> </key>
<value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_source_section_title</string> </value> <value> <string>my_source_section</string> </value>
</item> </item>
<item> <item>
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>AccountingTransaction_viewFieldLibrary</string> </value> <value> <string>AccountingTransaction_viewFieldLibrary</string> </value>
</item> </item>
<item>
<key> <string>not_viewable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>read_only</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>viewable_permission</string> </key>
<value> <string>Section</string> </value> <value>
<list/>
</value>
</item>
<item>
<key> <string>viewable_role</string> </key>
<value>
<list/>
</value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -88,8 +88,8 @@ ...@@ -88,8 +88,8 @@
<list> <list>
<string>my_destination_debit</string> <string>my_destination_debit</string>
<string>my_destination_title</string> <string>my_destination_title</string>
<string>my_destination_section_title</string>
<string>my_destination_function</string> <string>my_destination_function</string>
<string>my_destination_section</string>
<string>my_destination_funding</string> <string>my_destination_funding</string>
<string>my_destination_project_title</string> <string>my_destination_project_title</string>
<string>my_destination_payment_request_title</string> <string>my_destination_payment_request_title</string>
......
...@@ -9,15 +9,12 @@ ...@@ -9,15 +9,12 @@
<item> <item>
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list/>
<string>editable</string>
<string>title</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_destination_section_title</string> </value> <value> <string>my_destination_section</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -73,24 +70,48 @@ ...@@ -73,24 +70,48 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable_permission</string> </key>
<value> <int>0</int> </value> <value>
<list/>
</value>
</item>
<item>
<key> <string>editable_role</string> </key>
<value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_destination_section_title</string> </value> <value> <string>my_destination_section</string> </value>
</item> </item>
<item> <item>
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>AccountingTransaction_viewFieldLibrary</string> </value> <value> <string>AccountingTransaction_viewFieldLibrary</string> </value>
</item> </item>
<item>
<key> <string>not_viewable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>read_only</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>viewable_permission</string> </key>
<value> <string>Section</string> </value> <value>
<list/>
</value>
</item>
<item>
<key> <string>viewable_role</string> </key>
<value>
<list/>
</value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -45,8 +45,11 @@ column_item_list = [('translated_id', 'ID')] ...@@ -45,8 +45,11 @@ column_item_list = [('translated_id', 'ID')]
a = column_item_list.append a = column_item_list.append
if source: if source:
a(('source', 'Account')) a(('source', 'Account'))
a(('source_section', 'Section'))
else: else:
a(('destination', 'Account')) a(('destination', 'Account'))
if not context.AccountingTransaction_isSourceView():
a(('destination_section', 'Section'))
if context.AccountingTransactionLine_getFunctionItemList(source=source): if context.AccountingTransactionLine_getFunctionItemList(source=source):
if source: if source:
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
<string>listbox_source_function</string> <string>listbox_source_function</string>
<string>listbox_source_funding</string> <string>listbox_source_funding</string>
<string>listbox_aggregate_title_list</string> <string>listbox_aggregate_title_list</string>
<string>listbox_source_section</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_source_section</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>
</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>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>size</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>field_id</string> </key>
<value> <string>my_view_mode_source_section</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Source Section</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_getPreferredSectionItemList(portal_type=\'Organisation\', validation_state=\'validated\', base_category=\'source_section\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
<string>listbox_destination_payment</string> <string>listbox_destination_payment</string>
<string>listbox_destination_asset_credit</string> <string>listbox_destination_asset_credit</string>
<string>listbox_destination_asset_debit</string> <string>listbox_destination_asset_debit</string>
<string>listbox_destination_section</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -92,6 +92,10 @@ ...@@ -92,6 +92,10 @@
<string>destination_payment</string> <string>destination_payment</string>
<string>Bank Account</string> <string>Bank Account</string>
</tuple> </tuple>
<tuple>
<string>destination_section</string>
<string>Section</string>
</tuple>
<tuple> <tuple>
<string>source_section_title</string> <string>source_section_title</string>
<string>Third Party</string> <string>Third Party</string>
...@@ -131,6 +135,10 @@ ...@@ -131,6 +135,10 @@
<string>destination_credit</string> <string>destination_credit</string>
<string>Credit</string> <string>Credit</string>
</tuple> </tuple>
<tuple>
<string>destination_section</string>
<string>Section</string>
</tuple>
<tuple> <tuple>
<string>destination_asset_debit</string> <string>destination_asset_debit</string>
<string>Converted Debit</string> <string>Converted Debit</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_destination_section</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>
</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>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>size</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>field_id</string> </key>
<value> <string>my_view_mode_source_section</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Destination Section</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_getPreferredSectionItemList(portal_type=\'Organisation\', validation_state=\'validated\', base_category=\'source_section\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
<string>listbox_source_function</string> <string>listbox_source_function</string>
<string>listbox_source_funding</string> <string>listbox_source_funding</string>
<string>listbox_aggregate_title_list</string> <string>listbox_aggregate_title_list</string>
<string>listbox_source_section</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_source_section</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>
</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>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>size</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>field_id</string> </key>
<value> <string>my_view_mode_source_section</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Source Section</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_getPreferredSectionItemList(portal_type=\'Organisation\', validation_state=\'validated\', base_category=\'source_section\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
<string>listbox_destination_function</string> <string>listbox_destination_function</string>
<string>listbox_destination_funding</string> <string>listbox_destination_funding</string>
<string>listbox_aggregate_title_list</string> <string>listbox_aggregate_title_list</string>
<string>listbox_destination_section</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_destination_section</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>
</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>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>size</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>field_id</string> </key>
<value> <string>my_view_mode_source_section</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Destination Section</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_getPreferredSectionItemList(portal_type=\'Organisation\', validation_state=\'validated\', base_category=\'source_section\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
<string>listbox_source_function</string> <string>listbox_source_function</string>
<string>listbox_source_funding</string> <string>listbox_source_funding</string>
<string>listbox_aggregate_title_list</string> <string>listbox_aggregate_title_list</string>
<string>listbox_source_section</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_source_section</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>
</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>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>size</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>field_id</string> </key>
<value> <string>my_view_mode_source_section</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Source Section</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_getPreferredSectionItemList(portal_type=\'Organisation\', validation_state=\'validated\', base_category=\'source_section\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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