Commit 75608ac2 authored by Aurel's avatar Aurel

CRM forms improvement

- move "keep in draft state" field
- fix list of nodes displayed on event creation dialog
- display warning for mail message only
parent 16320567
......@@ -82,6 +82,7 @@
<value>
<list>
<string>your_text_content</string>
<string>your_keep_draft</string>
</list>
</value>
</item>
......@@ -101,7 +102,6 @@
<string>your_direction</string>
<string>your_source</string>
<string>your_destination</string>
<string>your_keep_draft</string>
</list>
</value>
</item>
......
......@@ -126,7 +126,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Ticket_getArrowItemList()</string> </value>
<value> <string>python: here.Ticket_getArrowItemList()+ [(here.getTitle(), here.getRelativeUrl())]</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -126,7 +126,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Ticket_getArrowItemList()</string> </value>
<value> <string>python: here.Ticket_getArrowItemList() + [(here.getTitle(), here.getRelativeUrl())]</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -82,7 +82,7 @@ ticket = module.newContent(\n
title=follow_up_ticket_title,\n
start_date=event.getStartDate(),\n
destination_decision_list=event.getSourceList(),\n
destination_section=event.getSourceSection() or event.getSource(),\n
# destination_section=event.getSourceSection() or event.getSource(),\n
source_trade_set=operator_list,\n
source_value=source_value,\n
source_section=source_section,\n
......
......@@ -148,7 +148,9 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>external_validator</string> </key>
......@@ -304,4 +306,17 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPortalType() == "Mail Message"</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -54,18 +54,21 @@
arrow = portal.portal_property_sheets.get("Arrow")\n
\n
value_list = [(\'\', \'\'),]\n
value_list_append = value_list.append\n
\n
# add current user\n
user = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
if user is not None:\n
value_list.append((user.getTitle(), user.getRelativeUrl()))\n
\n
for property in arrow.contentValues():\n
value = context.getProperty("%s_value" %property.getReference(), None)\n
if value is not None and value.getPortalType() in portal.getPortalNodeTypeList():\n
value_list.append((value.getTitle(), value.getRelativeUrl()))\n
value_list_append((user.getTitle(), user.getRelativeUrl()))\n
\n
for property_value in arrow.contentValues():\n
value = context.getProperty("%s_value" %property_value.getReference(), None)\n
if value and value.getPortalType() in portal.getPortalNodeTypeList():\n
value = (value.getTitle(), value.getRelativeUrl())\n
if value not in value_list:\n
value_list_append(value)\n
\n
value_list.sort(key=lambda x: x[0])\n
\n
return value_list\n
</string> </value>
......
......@@ -76,6 +76,7 @@
<value>
<list>
<string>your_text_content</string>
<string>your_keep_draft</string>
</list>
</value>
</item>
......@@ -95,7 +96,6 @@
<string>your_direction</string>
<string>your_source</string>
<string>your_destination</string>
<string>your_keep_draft</string>
</list>
</value>
</item>
......
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