Commit d74b90c7 authored by Jérome Perrin's avatar Jérome Perrin

also check for isMovement in Movement_isQuantityEditable

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41291 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a910e31b
......@@ -50,9 +50,24 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""This scripts is used to know if quantity can be edited by user.\n
If items are used, quantity is set by the item quantity.\n
<value> <string>"""This script is used to know if quantity can be edited by user.\n
\n
* If this is not a movement (line containing lines or cell), user\n
cannot edit this line which is just a container, but no actual movement.\n
\n
* If this line has variation category list, then it means it\'s a line that\n
will contain cell, so it\'s already not possible to set quantity, user have\n
to create cells and set quantities on cells.\n
\n
* If items are used, quantity is set by the item quantity.\n
"""\n
\n
if not context.isMovement():\n
return False\n
\n
if context.getVariationCategoryList() and not \'Cell\' in context.getPortalType():\n
return False\n
\n
return not (context.getPortalType() in context.getPortalDeliveryMovementTypeList()\n
and (context.getResource() and context.getResourceValue().getAggregatedPortalTypeList()))\n
</string> </value>
......@@ -93,6 +108,7 @@ return not (context.getPortalType() in context.getPortalDeliveryMovementTypeList
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>False</string>
</tuple>
</value>
</item>
......
1072
\ No newline at end of file
1073
\ 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