diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml index ae3e389e9b7b6df022264eef4b74847e2b0bfb3e..c9857cdd7b56cc58c91ea21b9c68555cf4ea811a 100644 --- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml @@ -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> diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index 4aae4fb66bd97c0ce8d1eac210cbf8c73fa31929..2fefc4685b675df67d740ef9a4f5ed57519306bb 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -1072 \ No newline at end of file +1073 \ No newline at end of file