From 76eeeb0f99a9ba33bc9d13ef6c0da5dcfe4bc077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 1 Jun 2009 11:01:07 +0000 Subject: [PATCH] simplify this script git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27294 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_trade/Movement_isQuantityEditable.xml | 10 +++++----- bt5/erp5_trade/bt/revision | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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 f2b5629137..4f5ffcdf86 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 @@ -53,10 +53,11 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>if context.getPortalType() in [\'Purchase Packing List Line\',\'Inventory Line\'] and (context.getResource() and context.getResourceValue().getAggregatedPortalTypeList()) or (context.getAggregate()) or (context.getResource() is None and context.getPortalItemTypeList()):\n - return 0\n -else:\n - return 1\n + <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 +"""\n +return not (context.getPortalType() in context.getPortalDeliveryMovementTypeList()\n + and (context.getResource() and context.getResourceValue().getAggregatedPortalTypeList()))\n </string> </value> </item> <item> @@ -95,7 +96,6 @@ else:\n <tuple> <string>_getattr_</string> <string>context</string> - <string>None</string> </tuple> </value> </item> diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index 6b190af018..b7f636c12f 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -664 +665 \ No newline at end of file -- 2.30.9