Commit df833b21 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Only require project if ledger is automated

 This constraint is only applicable on Accounting Transaction Types if ledger is automated, for other portal types, always apply (for Upgrade Decision for example).
parent 680b4ede
......@@ -20,9 +20,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<value> <string>Only applicable on Accounting Transaction Types if ledger is automated, for other portal types, always apply.</string> </value>
</item>
<item>
<key> <string>expression</string> </key>
......@@ -32,6 +30,18 @@
<key> <string>id</string> </key>
<value> <string>source_or_destination_project_constraint_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>A project is required</string> </value>
......@@ -40,6 +50,22 @@
<key> <string>portal_type</string> </key>
<value> <string>TALES Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: (here.getPortalType() in here.getPortalAccountingTransactionTypeList() and here.getLedger() == \'automated\') or (here.getPortalType() not in here.getPortalAccountingTransactionTypeList())</string> </value>
</item>
</dictionary>
</pickle>
</record>
......
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