Commit a27d3d9c authored by Romain Courteaud's avatar Romain Courteaud

Set default capacity scope from allocation scope value

parent 47e340ef
...@@ -53,8 +53,18 @@ ...@@ -53,8 +53,18 @@
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
computer = context\n computer = context\n
\n \n
if allocation_scope == \'open/public\':\n
# Public computer capacity is handle by an alarm\n
capacity_scope = \'close\'\n
elif allocation_scope.startswith(\'open\'):\n
# Capacity is not handled for \'private\' computers\n
capacity_scope = \'open\'\n
else:\n
capacity_scope = \'close\'\n
\n
computer.edit(\n computer.edit(\n
allocation_scope=allocation_scope,\n allocation_scope=allocation_scope,\n
capacity_scope=capacity_scope,\n
)\n )\n
\n \n
sale_supply_line = computer.Computer_getRelatedSaleSupplyLine()\n sale_supply_line = computer.Computer_getRelatedSaleSupplyLine()\n
......
458 459
\ No newline at end of file \ 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