Commit 1ce20883 authored by Jérome Perrin's avatar Jérome Perrin

add outcome path portal type and default outcome path on campaign

parent 1ac806f1
<allowed_content_type_list>
<portal_type id="Campaign">
<item>Event Path</item>
<item>Outcome Path</item>
</portal_type>
<portal_type id="Campaign Module">
<item>Campaign</item>
......
<hidden_content_type_list>
<portal_type id="Campaign">
<item>Event Path</item>
<item>Outcome Path</item>
</portal_type>
<portal_type id="Event Module">
<item>Acknowledgement</item>
......
<property_sheet_list>
<portal_type id="Campaign">
<item>DefaultEventPath</item>
<item>DefaultOutcomePath</item>
</portal_type>
<portal_type id="Event Path">
<item>EventPath</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>document.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Ticket</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addTicket</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>path</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Outcome Path</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Path</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DefaultOutcomePath</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Acquired Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>acquisition_depends</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>acquisition_sync_value</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mode</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_accessor_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_depends</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>alt_accessor_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/content</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_acquired_property_id</string> </key>
<value>
<tuple>
<string>title</string>
<string>resource</string>
<string>resource_title</string>
<string>resource_value</string>
<string>resource_reference</string>
<string>quantity</string>
<string>quantity_unit</string>
<string>price_currency</string>
<string>price</string>
<string>total_price</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_portal_type</string> </key>
<value> <string>python: (\'Outcome Path\',)</string> </value>
</item>
<item>
<key> <string>content_translation_acquired_property_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The default outcome path</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>outcome_path_property</string> </value>
</item>
<item>
<key> <string>mode</string> </key>
<value> <string>w</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Acquired Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value> <string>default_outcome_path</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
649
\ No newline at end of file
650
\ No newline at end of file
Campaign Module | Campaign
Campaign | Event Path
Campaign | Outcome Path
Event Module | Acknowledgement
Event Module | Fax Message
Event Module | Letter
......
Campaign | Event Path
Campaign | Outcome Path
Event Module | Acknowledgement
\ No newline at end of file
......@@ -9,6 +9,7 @@ Mail Message
Meeting
Meeting Module
Note
Outcome Path
Phone Call
Sale Opportunity
Sale Opportunity Module
......
Campaign | DefaultEventPath
Campaign | DefaultOutcomePath
Event Path | EventPath
Support Request | Codification
\ No newline at end of file
DefaultEventPath
EventPath
DefaultOutcomePath
EventConstraint
MailMessageConstraint
\ No newline at end of file
......@@ -524,6 +524,29 @@ class TestCRM(BaseTestCRM):
resource_value_list = map(lambda x: x.getResourceValue(), event_list)
self.assertEquals([service], resource_value_list)
def test_OutcomePath(self):
service = self.portal.service_module.newContent(portal_type='Service')
currency = self.portal.currency_module.newContent(portal_type='Currency')
campaign = self.portal.campaign_module.newContent(portal_type="Campaign")
campaign.setDefaultOutcomePathQuantity(3)
campaign.setDefaultOutcomePathQuantityUnit('unit/piece')
campaign.setDefaultOutcomePathResourceValue(service)
campaign.setDefaultOutcomePathPrice(4)
campaign.setDefaultOutcomePathPriceCurrency(currency.getRelativeUrl())
self.assertEquals(3*4, campaign.getDefaultOutcomePathTotalPrice())
self.assertEquals(3, campaign.getDefaultOutcomePathQuantity())
self.assertEquals('unit/piece', campaign.getDefaultOutcomePathQuantityUnit())
self.assertEquals(service.getRelativeUrl(),
campaign.getDefaultOutcomePathResource())
self.assertEquals(4, campaign.getDefaultOutcomePathPrice())
self.assertEquals(currency.getRelativeUrl(),
campaign.getDefaultOutcomePathPriceCurrency())
outcome_path = campaign._getOb('default_outcome_path')
self.assertEquals('Outcome Path', outcome_path.getPortalType())
class TestCRMMailIngestion(BaseTestCRM):
"""Test Mail Ingestion for standalone CRM.
......
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