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
paysheet.setResource(getPropertyFromModel(model, \'price_currency\'))\n
\n
# copy model sub objects into paysheet\n
portal_type_list = [\'Annotation Line\', \'Payment Condition\', \n
\'Pay Sheet Model Ratio Line\']\n
paysheet.PaySheetTransaction_copySubObject(portal_type_list)\n
paysheet.PaySheetTransaction_copySubObject(\n
\'Annotation Line\',\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
if not batch_mode:\n
return context.Base_redirect(form_id,\n
......@@ -164,7 +168,6 @@ if not batch_mode:\n
<string>None</string>
<string>dict</string>
<string>getPropertyFromModel</string>
<string>portal_type_list</string>
</tuple>
</value>
</item>
......
......@@ -69,7 +69,8 @@
portal_type_list) in the paysheet.\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
# Erase existing sub objects with same reference\n
delete_id_list = []\n
......@@ -113,7 +114,7 @@ for model, sub_object_id_list in sub_object_by_model.items():\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>portal_type_list=[]</string> </value>
<value> <string>portal_type_list=[], property_list=()</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -133,13 +134,14 @@ for model, sub_object_id_list in sub_object_by_model.items():\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>portal_type_list</string>
<string>property_list</string>
<string>_getattr_</string>
<string>context</string>
<string>sub_object_list</string>
......@@ -166,6 +168,7 @@ for model, sub_object_id_list in sub_object_by_model.items():\n
<value>
<tuple>
<list/>
<tuple/>
</tuple>
</value>
</item>
......
259
\ No newline at end of file
261
\ 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