Commit 06ab3cb3 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: erp5_crm: Migrate Acknowledgement and Ticket Documents from filesystem.

parent 77e17dcd
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Ticket import Ticket from erp5.component.document.Ticket import Ticket
from erp5.component.mixin.EncryptedPasswordMixin import EncryptedPasswordMixin from erp5.component.mixin.EncryptedPasswordMixin import EncryptedPasswordMixin
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Ticket import Ticket from erp5.component.document.Ticket import Ticket
from erp5.component.mixin.EncryptedPasswordMixin import EncryptedPasswordMixin from erp5.component.mixin.EncryptedPasswordMixin import EncryptedPasswordMixin
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>Acknowledgement</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.Acknowledgement</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.Acknowledgement</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -29,31 +29,30 @@ ...@@ -29,31 +29,30 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Ticket import Ticket from erp5.component.document.Ticket import Ticket
class SaleOpportunity(Ticket): class SaleOpportunity(Ticket):
""" """
LEGACY LEGACY
This class is superceded by the Ticket class. Legacy This class is superceded by the Ticket class. Legacy
sale opportunity data should still be usable. sale opportunity data should still be usable.
""" """
meta_type = 'ERP5 Sale Opportunity'
portal_type = 'Sale Opportunity'
add_permission = Permissions.AddPortalContent
meta_type = 'ERP5 Sale Opportunity' # Declarative security
portal_type = 'Sale Opportunity' security = ClassSecurityInfo()
add_permission = Permissions.AddPortalContent security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative security # Declarative properties
security = ClassSecurityInfo() property_sheets = ( PropertySheet.Base
security.declareObjectProtected(Permissions.AccessContentsInformation) , PropertySheet.XMLObject
, PropertySheet.CategoryCore
# Declarative properties , PropertySheet.DublinCore
property_sheets = ( PropertySheet.Base , PropertySheet.Amount
, PropertySheet.XMLObject , PropertySheet.Arrow
, PropertySheet.CategoryCore , PropertySheet.Price
, PropertySheet.DublinCore , PropertySheet.Movement
, PropertySheet.Amount )
, PropertySheet.Arrow \ No newline at end of file
, PropertySheet.Price
, PropertySheet.Movement
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SaleOpportunity</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.SaleOpportunity</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.SaleOpportunity</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -33,50 +33,49 @@ from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter ...@@ -33,50 +33,49 @@ from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.Project import Project from Products.ERP5.Document.Project import Project
class Ticket(Project): class Ticket(Project):
""" """
A Ticket allows to track a sales process involving A Ticket allows to track a sales process involving
multilple Person and Organisations. It is a placeholder for multilple Person and Organisations. It is a placeholder for
documents, events, etc. documents, events, etc.
Tickets behave both a movements and as projects:
- as movements because they relate to an amount Tickets behave both a movements and as projects:
of resource exchanged between multiple parties
- as a project because it acts as a reporting - as movements because they relate to an amount
node for other movements (ex. accounting, of resource exchanged between multiple parties
task reports)
Ticket are a good example of documents which may require - as a project because it acts as a reporting
synchronisation process accross multiple sites and node for other movements (ex. accounting,
for which acquisition properties such as source_title task reports)
may be useful to provide a simple way to synchronise
data with relations.
"""
meta_type = 'ERP5 Ticket' Ticket are a good example of documents which may require
portal_type = 'Ticket' synchronisation process accross multiple sites and
add_permission = Permissions.AddPortalContent for which acquisition properties such as source_title
isDelivery = ConstantGetter('isDelivery', value=True) may be useful to provide a simple way to synchronise
data with relations.
"""
meta_type = 'ERP5 Ticket'
portal_type = 'Ticket'
add_permission = Permissions.AddPortalContent
isDelivery = ConstantGetter('isDelivery', value=True)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
, PropertySheet.CategoryCore , PropertySheet.CategoryCore
, PropertySheet.DublinCore , PropertySheet.DublinCore
, PropertySheet.Arrow , PropertySheet.Arrow
, PropertySheet.Price , PropertySheet.Price
, PropertySheet.Movement , PropertySheet.Movement
, PropertySheet.Amount , PropertySheet.Amount
, PropertySheet.Ticket , PropertySheet.Ticket
) )
security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable') security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable')
def isAccountable(self): def isAccountable(self):
"""Tickets are accountable. """Tickets are accountable.
""" """
return 1 return 1
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>Ticket</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.Ticket</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.Ticket</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
document.erp5.Acknowledgement
document.erp5.SaleOpportunity
document.erp5.Ticket
\ No newline at end of file
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Ticket import Ticket from erp5.component.document.Ticket import Ticket
class Bug(Ticket): class Bug(Ticket):
"""Bug means a bug report, a feature request or an issue. """Bug means a bug report, a feature request or an issue.
......
...@@ -31,7 +31,6 @@ from Products.ERP5Type.Globals import InitializeClass, DTMLFile ...@@ -31,7 +31,6 @@ from Products.ERP5Type.Globals import InitializeClass, DTMLFile
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir from Products.ERP5 import _dtmldir
from Products.ERP5.Document.Acknowledgement import Acknowledgement
from zLOG import LOG from zLOG import LOG
from DateTime import DateTime from DateTime import DateTime
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery
......
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