Commit 35aeadf4 authored by Alexandre Boeglin's avatar Alexandre Boeglin

* When creating an Order Line, set its reference and int_index,

* When copypasting a Order or Packing List, set a new reference on the resulting object,
* use "parent_domain" instead of "parent" on order view listbox,
* set edit_order  on OrderLine_view,
* fix some values in Purchase Order printout

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20125 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 37f77c96
......@@ -33,6 +33,25 @@
<none/>
</value>
</item>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_roles</string> </key>
<value>
......@@ -95,7 +114,7 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
<value> <string>OrderLine_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
......@@ -114,4 +133,44 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -114,7 +114,7 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
<value> <string>Delivery_generateReference</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
......
......@@ -95,7 +95,7 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
<value> <string>OrderLine_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
......
......@@ -33,6 +33,25 @@
<none/>
</value>
</item>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_roles</string> </key>
<value>
......@@ -41,7 +60,7 @@
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>allowed_content_types</string> </key>
......@@ -95,6 +114,10 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string>Delivery_generateReference</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -110,4 +133,44 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>line = context\n
parent = context.getParentValue()\n
\n
line_pt = line.getPortalType()\n
\n
index = len(parent.contentValues(filter={"portal_type": line_pt}))\n
\n
if parent.getPortalType() == line_pt:\n
reference = "%s.%s" % (parent.getReference(), index)\n
else:\n
reference = str(index)\n
\n
line.edit(reference=reference, int_index=index)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>*args, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<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>args</string>
<string>kw</string>
<string>context</string>
<string>line</string>
<string>_getattr_</string>
<string>parent</string>
<string>line_pt</string>
<string>len</string>
<string>index</string>
<string>reference</string>
<string>str</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>OrderLine_init</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -56,6 +56,15 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list>
<string>title</string>
<string>reference</string>
</list>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.setReference(\'\')\n
\n
context.Delivery_generateReference()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<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>_getattr_</string>
<string>context</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>Order_afterClone</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.setReference(\'\')\n
\n
context.Delivery_generateReference()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<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>_getattr_</string>
<string>context</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>PackingList_afterClone</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -152,7 +152,8 @@ total_vat = 0.0\n
\n
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.searchFolder(portal_type=context.getPortalOrderMovementTypeList(), sort_on=\'int_index\'):\n
for x in obj.searchFolder(portal_type=context.getPortalOrderMovementTypeList(),\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')]):\n
sub_list.append(x)\n
sub_list.extend(getSubLineList(x))\n
return sub_list\n
......@@ -166,7 +167,7 @@ for line in getSubLineList(context):\n
\'style_name\': \'Item_20_Table_20_Title\',\n
\'left_style_name\': \'Item_20_Table_20_Title_20_Left\',\n
\'right_style_name\': \'Item_20_Table_20_Title_20_Right\',\n
\'index\': line.getIntIndex(),\n
\'index\': line.getReference() or line.getIntIndex(),\n
\'source_reference\': getSourceReference(line),\n
\'reference\': line.getResource() is not None and line.getResourceValue().getReference() or \'\',\n
\'description\': desc,\n
......@@ -181,7 +182,7 @@ for line in getSubLineList(context):\n
\'style_name\': \'Table_20_Contents\',\n
\'left_style_name\': \'Table_20_Contents_20_Left\',\n
\'right_style_name\': \'Table_20_Contents_20_Right\',\n
\'index\': line.getIntIndex(),\n
\'index\': line.getReference() or line.getIntIndex(),\n
\'source_reference\': getSourceReference(line),\n
\'reference\': line.getResource() is not None and line.getResourceValue().getReference() or \'\',\n
\'description\': desc,\n
......@@ -199,7 +200,7 @@ data_dict = {\n
\'source_section_title\': context.getSourceSectionTitle() or \'\',\n
\'source_section_address\': getOneLineAddress(\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getRegionTitle() or \'\'),\n
context.getSourceSection() and context.getSourceSectionValue().getDefaultAddressRegionTitle() or \'\'),\n
\'source_section_telfax\': getPhoneAndFax(context.getSourceSection() and context.getSourceSectionValue().getTelephoneText() or \'\',\n
context.getSourceSection() and context.getSourceSectionValue().getFaxText() or \'\'),\n
\'source_section_email\': getEmail(context.getSourceSection() and context.getSourceSectionValue().getEmailText() or \'\'),\n
......@@ -212,7 +213,7 @@ data_dict = {\n
\'destination_title\': context.getDestinationTitle() or \'\',\n
\'destination_address\': getOneLineAddress(\n
context.getDestination() and context.getDestinationValue().getDefaultAddressText() or \'\',\n
context.getDestination() and context.getDestinationValue().getRegionTitle() or \'\'),\n
context.getDestination() and context.getDestinationValue().getDefaultAddressRegionTitle() or \'\'),\n
\'destination_telfax\': getPhoneAndFax(context.getDestination() and context.getDestinationValue().getTelephoneText() or \'\',\n
context.getDestination() and context.getDestinationValue().getFaxText() or \'\'),\n
\'destination_email\': getEmail(context.getDestination() and context.getDestinationValue().getEmailText() or \'\'),\n
......@@ -220,7 +221,7 @@ data_dict = {\n
\'destination_section_title\': unicode(context.getDestinationSectionTitle() or \'\', \'utf8\'),\n
\'destination_section_address\': unicode(getOneLineAddress(\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getRegionTitle() or \'\'), \'utf8\'),\n
context.getDestinationSection() and context.getDestinationSectionValue().getDefaultAddressRegionTitle() or \'\'), \'utf8\'),\n
\'destination_section_telfax\': unicode(getPhoneAndFax(\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\',\n
context.getDestinationSection() and context.getDestinationSectionValue().getTelephoneText() or \'\'), \'utf8\'),\n
......
......@@ -14,7 +14,6 @@
<value>
<list>
<string>list_method</string>
<string>report_root_list</string>
</list>
</value>
</item>
......@@ -89,21 +88,6 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>report_root_list</string> </key>
<value>
<list>
<tuple>
<string>parent_domain</string>
<string>Object Tree</string>
</tuple>
<tuple>
<string>resource</string>
<string>Resource</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
......@@ -227,7 +227,7 @@
<value>
<list>
<tuple>
<string>parent</string>
<string>parent_domain</string>
<string>Object Tree</string>
</tuple>
<tuple>
......
202
\ No newline at end of file
198
\ 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