Commit 6dff98c2 authored by Jérome Perrin's avatar Jérome Perrin

Use new feature from r21432 to prevent copying lines without anything defined...

Use new feature from r21432 to prevent copying lines without anything defined when applying the model.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21433 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5ffaca0d
...@@ -99,9 +99,13 @@ if not paysheet.getResource():\n ...@@ -99,9 +99,13 @@ if not paysheet.getResource():\n
paysheet.setResource(getPropertyFromModel(model, \'price_currency\'))\n paysheet.setResource(getPropertyFromModel(model, \'price_currency\'))\n
\n \n
# copy model sub objects into paysheet\n # copy model sub objects into paysheet\n
portal_type_list = [\'Annotation Line\', \'Payment Condition\', \n paysheet.PaySheetTransaction_copySubObject(\n
\'Pay Sheet Model Ratio Line\']\n \'Annotation Line\',\n
paysheet.PaySheetTransaction_copySubObject(portal_type_list)\n property_list=(\'quantity\', \'source\', \'resource\'))\n
paysheet.PaySheetTransaction_copySubObject(\n
\'Pay Sheet Model Ratio Line\',\n
property_list=(\'quantity\',))\n
paysheet.PaySheetTransaction_copySubObject(\'Payment Condition\')\n
\n \n
if not batch_mode:\n if not batch_mode:\n
return context.Base_redirect(form_id,\n return context.Base_redirect(form_id,\n
...@@ -164,7 +168,6 @@ if not batch_mode:\n ...@@ -164,7 +168,6 @@ if not batch_mode:\n
<string>None</string> <string>None</string>
<string>dict</string> <string>dict</string>
<string>getPropertyFromModel</string> <string>getPropertyFromModel</string>
<string>portal_type_list</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -69,7 +69,8 @@ ...@@ -69,7 +69,8 @@
portal_type_list) in the paysheet.\n portal_type_list) in the paysheet.\n
\'\'\'\n \'\'\'\n
\n \n
sub_object_list = context.getInheritedObjectValueList(portal_type_list)\n sub_object_list = context.getInheritedObjectValueList(\n
portal_type_list, property_list=property_list)\n
\n \n
# Erase existing sub objects with same reference\n # Erase existing sub objects with same reference\n
delete_id_list = []\n delete_id_list = []\n
...@@ -113,7 +114,7 @@ for model, sub_object_id_list in sub_object_by_model.items():\n ...@@ -113,7 +114,7 @@ for model, sub_object_id_list in sub_object_by_model.items():\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>portal_type_list=[]</string> </value> <value> <string>portal_type_list=[], property_list=()</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -133,13 +134,14 @@ for model, sub_object_id_list in sub_object_by_model.items():\n ...@@ -133,13 +134,14 @@ for model, sub_object_id_list in sub_object_by_model.items():\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>portal_type_list</string> <string>portal_type_list</string>
<string>property_list</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>sub_object_list</string> <string>sub_object_list</string>
...@@ -166,6 +168,7 @@ for model, sub_object_id_list in sub_object_by_model.items():\n ...@@ -166,6 +168,7 @@ for model, sub_object_id_list in sub_object_by_model.items():\n
<value> <value>
<tuple> <tuple>
<list/> <list/>
<tuple/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
259 261
\ No newline at end of file \ 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