Commit ae4d579a authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_crm: Update TALES conditions for 'Attachments' fields in Base_viewCRMFieldLibrary

Change the conditions from getAggregate to hasAggregate and add a portal_type filter
of getPortalDocumentTypeList, since in reality these check for Attachments that are Document Types
stored in ERP5, so types like 'Internet Message Post' should not be considered.

Plus, xml changes, since there was no commit in these fields in the last 9 years
parent 7153d667
......@@ -180,6 +180,10 @@
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......@@ -283,13 +287,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
......@@ -302,19 +300,13 @@
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.hasFile() and not here.getAggregate()</string> </value>
<value> <string>python: here.hasFile() and not here.hasAggregate(portal_type=here.getPortalDocumentTypeList())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -85,6 +85,10 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
......@@ -162,32 +166,20 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:not here.hasFile() or here.getAggregate()</string> </value>
<value> <string>python:not here.hasFile() or here.hasAggregate(portal_type=here.getPortalDocumentTypeList())</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
......
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