Commit d63a2cff authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Use preference to define the threshold to block ticket creation

parent e9993210
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>getPrefferredSupportRequestCreationLimit</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>preferred_support_request_creation_limit_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>preference</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python:\'\'</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value> <string>Manage properties</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# HARDCODED LIMIT TO BE MOVED TO GLOBAL PREFERENCES
limit = 5
portal = context.getPortalObject()
limit = portal.portal_preferences.getPreferredSupportRequestCreationLimit(5)
kw['limit'] = limit
kw['portal_type'] = 'Support Request'
kw['simulation_state'] = ["validated","submitted"]
......
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