[Erp5-report] r41291 jerome - in /erp5/trunk/bt5/erp5_trade: SkinTemplateItem/portal_skins/...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 9 18:16:56 CET 2010


Author: jerome
Date: Thu Dec  9 18:16:56 2010
New Revision: 41291

URL: http://svn.erp5.org?rev=41291&view=rev
Log:
also check for isMovement in Movement_isQuantityEditable

Modified:
    erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml
    erp5/trunk/bt5/erp5_trade/bt/revision

Modified: erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml?rev=41291&r1=41290&r2=41291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isQuantityEditable.xml [utf8] Thu Dec  9 18:16:56 2010
@@ -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 c
                           <tuple>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>False</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_trade/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/bt/revision?rev=41291&r1=41290&r2=41291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_trade/bt/revision [utf8] Thu Dec  9 18:16:56 2010
@@ -1 +1 @@
-1072
\ No newline at end of file
+1073
\ No newline at end of file



More information about the Erp5-report mailing list