Commit 9adc790a authored by Arnaud Fontaine's avatar Arnaud Fontaine

Merge remote-tracking branch 'origin/master' into zope4py2

parents bc9023c8 628ab4b4
...@@ -36,6 +36,9 @@ from erp5.component.interface.IRule import IRule ...@@ -36,6 +36,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Payment Rule generates payment simulation movement from invoice Payment Rule generates payment simulation movement from invoice
...@@ -49,11 +52,6 @@ class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -49,11 +52,6 @@ class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -9,21 +9,9 @@ What is expected with this script: ...@@ -9,21 +9,9 @@ What is expected with this script:
- In reality we probably also want that amount on vat line match invoice vat - In reality we probably also want that amount on vat line match invoice vat
amount, but we have ignored this. amount, but we have ignored this.
""" """
precision = context.getQuantityPrecisionFromResource(context.getResource())
resource = context.getResourceValue()
line = None
total_quantity = 0.0
line_list = context.getMovementList( line_list = context.getMovementList(
portal_type=context.getPortalAccountingMovementTypeList()) portal_type=context.getPortalAccountingMovementTypeList())
for line in line_list:
line_quantity = round(line.getQuantity(), precision)
line.setQuantity(line_quantity)
total_quantity += line_quantity
# If no "line" found (eg no SIT line), then do nothing. This is in the case where a SIT # If no "line" found (eg no SIT line), then do nothing. This is in the case where a SIT
# has only Invoice Line and no SIT Line. Otherwise account_type_dict will be empty => # has only Invoice Line and no SIT Line. Otherwise account_type_dict will be empty =>
# asset_line = None => the assert below will fail because getTotalPrice() will returns the # asset_line = None => the assert below will fail because getTotalPrice() will returns the
...@@ -31,28 +19,26 @@ for line in line_list: ...@@ -31,28 +19,26 @@ for line in line_list:
if not line_list: if not line_list:
return return
abs_total_quantity = abs(round(total_quantity, precision))
# The total quantity should be zero with a little error, if simulation has been
# completely applied, because the debit and the credit must be balanced. However,
# this is not the case, if the delivery is divergent, as the builder does not
# adopt prevision automatically, when a conflict happens between the simulation
# and user-entered values.
if abs_total_quantity > 2 * resource.getBaseUnitQuantity():
return
total_price = round(context.getTotalPrice(), precision)
account_type_dict = {} account_type_dict = {}
source_exchange_ratio = None
destination_exchange_ratio = None
for line in line_list: for line in line_list:
if not destination_exchange_ratio and line.getDestinationTotalAssetPrice():
destination_exchange_ratio = line.getDestinationTotalAssetPrice() / line.getQuantity()
if not source_exchange_ratio and line.getSourceTotalAssetPrice():
source_exchange_ratio = line.getSourceTotalAssetPrice() / line.getQuantity()
for account in (line.getSourceValue(portal_type='Account'), for account in (line.getSourceValue(portal_type='Account'),
line.getDestinationValue(portal_type='Account'),): line.getDestinationValue(portal_type='Account'),):
account_type_dict.setdefault(line, set()).add( account_type_dict.setdefault(line, set()).add(
account is not None and account.getAccountTypeValue() or None) account is not None and account.getAccountTypeValue() or None)
# find asset line which will be used later
account_type = context.getPortalObject().portal_categories.account_type account_type = context.getPortalObject().portal_categories.account_type
receivable_type = account_type.asset.receivable receivable_type = account_type.asset.receivable
payable_type = account_type.liability.payable payable_type = account_type.liability.payable
line_to_adjust = None
asset_line = None asset_line = None
for line, account_type_list in account_type_dict.iteritems(): for line, account_type_list in account_type_dict.iteritems():
...@@ -62,20 +48,39 @@ for line, account_type_list in account_type_dict.iteritems(): ...@@ -62,20 +48,39 @@ for line, account_type_list in account_type_dict.iteritems():
asset_line = line asset_line = line
break break
if not asset_line: def roundLine(resource, get_method, set_method, exchange_ratio):
precision = context.getQuantityPrecisionFromResource(resource)
total_quantity = 0.0
for line in line_list:
line_quantity = round(getattr(line, get_method)(), precision)
getattr(line, set_method)(line_quantity)
total_quantity += line_quantity
abs_total_quantity = abs(round(total_quantity, precision))
# The total quantity should be zero with a little error, if simulation has been
# completely applied, because the debit and the credit must be balanced. However,
# this is not the case, if the delivery is divergent, as the builder does not
# adopt prevision automatically, when a conflict happens between the simulation
# and user-entered values.
if abs_total_quantity > 2 * context.restrictedTraverse(resource).getBaseUnitQuantity():
return
total_price = round(context.getTotalPrice() * exchange_ratio, precision)
if not asset_line:
assert total_price == 0.0 and total_quantity == 0.0, \ assert total_price == 0.0 and total_quantity == 0.0, \
'receivable or payable line not found.' 'receivable or payable line not found.'
return return
# If we have a difference between total credit and total debit, one line is # If we have a difference between total credit and total debit, one line is
# chosen to add or remove this difference. The payable or receivable is chosen # chosen to add or remove this difference. The payable or receivable is chosen
# only if this line is not matching with invoice total price, because total price # only if this line is not matching with invoice total price, because total price
# comes from all invoice lines (quantity * price) and it is what should be payed. # comes from all invoice lines (quantity * price) and it is what should be payed.
# And payable or receivable line is the record in the accounting of what has # And payable or receivable line is the record in the accounting of what has
# to be payed. Then, we must not touch it when it already matches. # to be payed. Then, we must not touch it when it already matches.
# If is not a payable or receivable, vat or other line (ie. income) is used. # If is not a payable or receivable, vat or other line (ie. income) is used.
if abs_total_quantity != 0: line_to_adjust = None
if round(abs(asset_line.getQuantity()), precision) != round(abs(context.getTotalPrice()), precision): if abs_total_quantity != 0:
if round(abs(getattr(asset_line, get_method)()), precision) != round(abs(context.getTotalPrice()) * exchange_ratio, precision):
# adjust payable or receivable # adjust payable or receivable
for line in line_list: for line in line_list:
if receivable_type in account_type_dict[line] or \ if receivable_type in account_type_dict[line] or \
...@@ -97,6 +102,20 @@ if abs_total_quantity != 0: ...@@ -97,6 +102,20 @@ if abs_total_quantity != 0:
line_to_adjust = line line_to_adjust = line
break break
if line_to_adjust is not None: if line_to_adjust is not None:
line_to_adjust.setQuantity( getattr(line_to_adjust, set_method)(
round(line_to_adjust.getQuantity() - total_quantity, precision)) round(getattr(line_to_adjust, get_method)() - total_quantity, precision))
resource = context.getResource()
# Round Debit/credit
roundLine(resource, 'getQuantity', 'setQuantity', 1)
# Round source asset price
if source_exchange_ratio:
source_section_price_currency = context.getSourceSectionValue().getPriceCurrency()
roundLine(source_section_price_currency, 'getSourceTotalAssetPrice', 'setSourceTotalAssetPrice', source_exchange_ratio)
# Round destination asset price
if destination_exchange_ratio:
destination_section_price_currency = context.getDestinationSectionValue().getPriceCurrency()
roundLine(destination_section_price_currency, 'getDestinationTotalAssetPrice', 'setDestinationTotalAssetPrice', destination_exchange_ratio)
return ('jquery/plugin/lightbox/lightbox-0.5.css', return ('jquery/plugin/lightbox/lightbox-0.5.css',
'jquery/plugin/jqzoom/jqzoom.css', 'jquery/plugin/jqzoom/jqzoom.css',
'zocial.min.css',
'advanced_ecommerce_web.css') 'advanced_ecommerce_web.css')
...@@ -31,8 +31,9 @@ ...@@ -31,8 +31,9 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import PropertySheet, Permissions, interfaces from Products.ERP5Type import PropertySheet, Permissions, interfaces
from Products.ERP5Type.Core.Predicate import Predicate from Products.ERP5Type.Core.Predicate import Predicate
from zope.interface import implements from zope.interface import implementer
@implementer( interfaces.IPredicate,)
class Archive(Predicate): class Archive(Predicate):
""" """
A Catalog Archive object A Catalog Archive object
...@@ -47,9 +48,6 @@ class Archive(Predicate): ...@@ -47,9 +48,6 @@ class Archive(Predicate):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
implements( interfaces.IPredicate, )
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -37,6 +37,7 @@ import re ...@@ -37,6 +37,7 @@ import re
_marker = object() _marker = object()
@zope.interface.implementer(ICoordinate,)
class Coordinate(Base): class Coordinate(Base):
""" """
Coordinates is a mix-in class which is used to store elementary Coordinates is a mix-in class which is used to store elementary
...@@ -81,9 +82,6 @@ class Coordinate(Base): ...@@ -81,9 +82,6 @@ class Coordinate(Base):
portal_type = 'Coordinate' portal_type = 'Coordinate'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
# Declarative interface
zope.interface.implements(ICoordinate, )
# Declarative security (replaces __ac_permissions__) # Declarative security (replaces __ac_permissions__)
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces ...@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
@zope.interface.implementer(interfaces.INode)
class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin): class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin):
"""Login """Login
""" """
...@@ -40,8 +41,6 @@ class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin): ...@@ -40,8 +41,6 @@ class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin):
portal_type = 'Login' portal_type = 'Login'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.interface.IMovementGroup import IMovementGroup from erp5.component.interface.IMovementGroup import IMovementGroup
import zope.interface import zope.interface
@zope.interface.implementer( IMovementGroup,)
class MovementGroup(XMLObject): class MovementGroup(XMLObject):
""" """
The purpose of MovementGroup is to define how movements The purpose of MovementGroup is to define how movements
...@@ -59,8 +60,6 @@ class MovementGroup(XMLObject): ...@@ -59,8 +60,6 @@ class MovementGroup(XMLObject):
meta_type = 'ERP5 Movement Group' meta_type = 'ERP5 Movement Group'
portal_type = 'Movement Group' portal_type = 'Movement Group'
zope.interface.implements( IMovementGroup, )
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo ...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Node import Node from Products.ERP5.Document.Node import Node
@zope.interface.implementer(interfaces.INode)
class Organisation(Node): class Organisation(Node):
""" """
An Organisation object holds the information about An Organisation object holds the information about
...@@ -52,8 +53,6 @@ class Organisation(Node): ...@@ -52,8 +53,6 @@ class Organisation(Node):
portal_type = 'Organisation' portal_type = 'Organisation'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -60,6 +60,7 @@ class UserExistsError( ...@@ -60,6 +60,7 @@ class UserExistsError(
super(UserExistsError, self).__init__('user id %s already exists' % (user_id, )) super(UserExistsError, self).__init__('user id %s already exists' % (user_id, ))
@zope.interface.implementer(interfaces.INode)
class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMixin): class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMixin):
""" """
An Person object holds the information about An Person object holds the information about
...@@ -81,8 +82,6 @@ class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMi ...@@ -81,8 +82,6 @@ class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMi
portal_type = 'Person' portal_type = 'Person'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -32,6 +32,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.ERP5Type \ from Products.ERP5Type.ERP5Type \
import ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT import ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT
@zope.interface.implementer(interfaces.ILocalRoleGenerator)
class RoleDefinition(XMLObject): class RoleDefinition(XMLObject):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Role Definition' meta_type = 'ERP5 Role Definition'
...@@ -42,8 +43,6 @@ class RoleDefinition(XMLObject): ...@@ -42,8 +43,6 @@ class RoleDefinition(XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(interfaces.ILocalRoleGenerator)
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -39,6 +39,7 @@ from Products.ERP5Type.Globals import PersistentMapping ...@@ -39,6 +39,7 @@ from Products.ERP5Type.Globals import PersistentMapping
from Products.CMFCore.utils import _checkPermission from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.exceptions import AccessControl_Unauthorized from Products.CMFCore.exceptions import AccessControl_Unauthorized
@zope.interface.implementer(IEncryptedPassword,)
class EncryptedPasswordMixin(object): class EncryptedPasswordMixin(object):
"""Encrypted Password Mixin """Encrypted Password Mixin
""" """
...@@ -46,9 +47,6 @@ class EncryptedPasswordMixin(object): ...@@ -46,9 +47,6 @@ class EncryptedPasswordMixin(object):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IEncryptedPassword,)
security.declareProtected(Permissions.SetOwnPassword, 'checkPassword') security.declareProtected(Permissions.SetOwnPassword, 'checkPassword')
def checkPassword(self, value) : def checkPassword(self, value) :
""" """
......
...@@ -35,6 +35,7 @@ from AccessControl.AuthEncoding import pw_validate ...@@ -35,6 +35,7 @@ from AccessControl.AuthEncoding import pw_validate
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
@zope.interface.implementer(ILoginAccountProvider)
class LoginAccountProviderMixin: class LoginAccountProviderMixin:
""" """
This class provides a generic implementation of ILoginAccountProvider. This class provides a generic implementation of ILoginAccountProvider.
...@@ -43,9 +44,6 @@ class LoginAccountProviderMixin: ...@@ -43,9 +44,6 @@ class LoginAccountProviderMixin:
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
# Declarative interfaces
zope.interface.implements(ILoginAccountProvider)
security.declareProtected(Permissions.SetOwnPassword, 'notifyLoginFailure') security.declareProtected(Permissions.SetOwnPassword, 'notifyLoginFailure')
def notifyLoginFailure(self, **kw): def notifyLoginFailure(self, **kw):
""" """
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from erp5.component.document.Document import DocumentConversionServerProxy, ConversionError, enc, dec from erp5.component.document.Document import DocumentConversionServerProxy, ConversionError, enc, dec
@implementer(ITransform)
class DocumentConversionServerTransform: class DocumentConversionServerTransform:
""" """
Transformer using Conversion Server Transformer using Conversion Server
""" """
implements(ITransform)
# Name of the Transform as registered in portal_transforms # Name of the Transform as registered in portal_transforms
__name__ = None __name__ = None
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CertificateLogin_isLoginBlocked</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CertificateLogin_isPasswordExpired</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
function successHandler(data) { function successHandler(data) {
generateHistorySelectElement(); generateHistorySelectElement();
transition_message = $('#transition_message'); transition_message = $('.transition_message');
transition_message.css('opacity', 0.0); transition_message.css('opacity', 0.0);
transition_message.html(data); transition_message.html(data);
transition_message.animate({opacity: 1.0}, transition_message.animate({opacity: 1.0},
......
...@@ -39,6 +39,9 @@ from erp5.component.interface.IRule import IRule ...@@ -39,6 +39,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin): class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin):
""" """ """ """
# CMF Type Definition # CMF Type Definition
...@@ -49,11 +52,6 @@ class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin) ...@@ -49,11 +52,6 @@ class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin)
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Accounting Account. """ """ Setup an Accounting Account. """
...@@ -48,9 +49,6 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Accounting Period. """ """ Setup an Accounting Period. """
...@@ -47,9 +48,6 @@ class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Purchase Trade Conditions. """ """ Setup Purchase Trade Conditions. """
...@@ -48,9 +49,6 @@ class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLO ...@@ -48,9 +49,6 @@ class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLO
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Sale Trade Conditions. """ """ Setup Sale Trade Conditions. """
...@@ -48,9 +49,6 @@ class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObjec ...@@ -48,9 +49,6 @@ class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObjec
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem ...@@ -35,6 +35,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
from DateTime import DateTime from DateTime import DateTime
@zope.interface.implementer(IConfiguratorItem)
class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Alarm """ """ Setup an Alarm """
...@@ -48,9 +49,6 @@ class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup bank account. """ """ Setup bank account. """
...@@ -49,9 +50,6 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject): class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Rules. """ """ Setup Rules. """
...@@ -48,9 +49,6 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Set up catalog keyword keys.""" """Set up catalog keyword keys."""
...@@ -48,9 +49,6 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -40,6 +40,7 @@ class UnrestrictedStringIO(StringIO): ...@@ -40,6 +40,7 @@ class UnrestrictedStringIO(StringIO):
__allow_access_to_unprotected_subobjects__ = 1 __allow_access_to_unprotected_subobjects__ = 1
@zope.interface.implementer(IConfiguratorItem)
class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Import a categories spreadsheet. """Import a categories spreadsheet.
""" """
...@@ -54,9 +55,6 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -54,9 +55,6 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""This class is meta build step for customization of ERP5 site.""" """This class is meta build step for customization of ERP5 site."""
...@@ -47,9 +48,6 @@ class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup currency. """ """ Setup currency. """
...@@ -48,9 +49,6 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -33,6 +33,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -33,6 +33,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Create a new bt5 for customer configuration. """ Create a new bt5 for customer configuration.
...@@ -49,9 +50,6 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject): class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" This class install a Organisation.""" """ This class install a Organisation."""
...@@ -49,9 +50,6 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Set permission matrix on module.""" """ Set permission matrix on module."""
...@@ -47,9 +48,6 @@ class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -37,6 +37,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -37,6 +37,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin): class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
""" Setup user. """ """ Setup user. """
...@@ -50,9 +51,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin): ...@@ -50,9 +51,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Configure Portal Type.""" """Configure Portal Type."""
...@@ -47,9 +48,6 @@ class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Import a portal type roles spreadsheet. """Import a portal type roles spreadsheet.
""" """
...@@ -48,9 +49,6 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec ...@@ -48,9 +49,6 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup preference. """ """ Setup preference. """
...@@ -47,9 +48,6 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Purchase Trade Conditions. """ """ Setup Purchase Trade Conditions. """
...@@ -48,9 +49,6 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem ...@@ -36,6 +36,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
from zLOG import LOG, INFO from zLOG import LOG, INFO
@zope.interface.implementer(IConfiguratorItem)
class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject): class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup role per module basis. """ """ Setup role per module basis. """
...@@ -49,9 +50,6 @@ class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject): class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Rules. """ """ Setup Rules. """
...@@ -47,9 +48,6 @@ class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Sale Trade Conditions. """ """ Setup Sale Trade Conditions. """
...@@ -48,9 +49,6 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.SkinConfiguratorItemMixin import \ ...@@ -35,6 +35,7 @@ from erp5.component.mixin.SkinConfiguratorItemMixin import \
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin, class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin,
XMLObject): XMLObject):
""" Setup the ERP5Type_getSecurityCategoryMapping Python Script which """ Setup the ERP5Type_getSecurityCategoryMapping Python Script which
...@@ -50,9 +51,6 @@ class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin, ...@@ -50,9 +51,6 @@ class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin,
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject): class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Create default service documents.""" """Create default service documents."""
...@@ -49,9 +50,6 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Set up site properties.""" """Set up site properties."""
...@@ -47,9 +48,6 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Solvers. """ """ Setup Solvers. """
...@@ -47,9 +48,6 @@ class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from Products.ERP5Type.Cache import CachingMethod ...@@ -36,6 +36,7 @@ from Products.ERP5Type.Cache import CachingMethod
from zLOG import LOG, INFO from zLOG import LOG, INFO
@zope.interface.implementer(IConfiguratorItem)
class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" This class will install standard ERP5 template from a repository to """ This class will install standard ERP5 template from a repository to
fake site. """ fake site. """
...@@ -50,9 +51,6 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -50,9 +51,6 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup System preference. """ """ Setup System preference. """
...@@ -47,9 +48,6 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -53,9 +53,9 @@ if 1: # BBB ...@@ -53,9 +53,9 @@ if 1: # BBB
from zope.i18n.interfaces import ITranslationDomain, \ from zope.i18n.interfaces import ITranslationDomain, \
IFallbackTranslationDomainFactory IFallbackTranslationDomainFactory
@zope.interface.implementer(ITranslationDomain)
@zope.interface.provider(IFallbackTranslationDomainFactory)
class DummyTranslationDomainFallback(object): class DummyTranslationDomainFallback(object):
zope.interface.implements(ITranslationDomain)
zope.interface.classProvides(IFallbackTranslationDomainFactory)
def __init__(self, domain): def __init__(self, domain):
self.domain = domain self.domain = domain
......
...@@ -40,6 +40,7 @@ from zLOG import LOG, INFO, PROBLEM ...@@ -40,6 +40,7 @@ from zLOG import LOG, INFO, PROBLEM
import errno import errno
from StringIO import StringIO from StringIO import StringIO
@zope.interface.implementer(IWatermarkable)
class PDFDocument(Image): class PDFDocument(Image):
""" """
PDFDocument is a subclass of Image which is able to PDFDocument is a subclass of Image which is able to
...@@ -68,8 +69,6 @@ class PDFDocument(Image): ...@@ -68,8 +69,6 @@ class PDFDocument(Image):
, PropertySheet.Periodicity , PropertySheet.Periodicity
) )
zope.interface.implements(IWatermarkable)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getWatermarkedData') 'getWatermarkedData')
def getWatermarkedData(self, watermark_data, repeat_watermark=True, def getWatermarkedData(self, watermark_data, repeat_watermark=True,
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocToDocx: class DocToDocx:
"""Transforms doc to docx by using Cloudooo""" """Transforms doc to docx by using Cloudooo"""
implements(itransform)
__name__ = 'doc_to_docx' __name__ = 'doc_to_docx'
inputs = ('application/msword',) inputs = ('application/msword',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocToHtml: class DocToHtml:
"""Transforms doc to html by using Cloudooo""" """Transforms doc to html by using Cloudooo"""
implements(itransform)
__name__ = 'doc_to_html' __name__ = 'doc_to_html'
inputs = ('application/msword',) inputs = ('application/msword',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocxToDocy: class DocxToDocy:
"""Transforms docx to docy by using Cloudooo""" """Transforms docx to docy by using Cloudooo"""
implements(itransform)
__name__ = 'docx_to_docy' __name__ = 'docx_to_docy'
inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',) inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',)
output = 'application/x-asc-text' output = 'application/x-asc-text'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocxToOdt: class DocxToOdt:
"""Transforms docx to odt by using Cloudooo""" """Transforms docx to odt by using Cloudooo"""
implements(itransform)
__name__ = 'docx_to_odt' __name__ = 'docx_to_odt'
inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',) inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',)
output = 'application/vnd.oasis.opendocument.text' output = 'application/vnd.oasis.opendocument.text'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocyToDocx: class DocyToDocx:
"""Transforms docy to docx by using Cloudooo""" """Transforms docy to docx by using Cloudooo"""
implements(itransform)
__name__ = 'docy_to_docx' __name__ = 'docy_to_docx'
inputs = ('application/x-asc-text',) inputs = ('application/x-asc-text',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToHtml: class OdpToHtml:
"""Transforms odp to html by using Cloudooo""" """Transforms odp to html by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_html' __name__ = 'odp_to_html'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToPdf: class OdpToPdf:
"""Transforms odp to pdf by using Cloudooo""" """Transforms odp to pdf by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_pdf' __name__ = 'odp_to_pdf'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/pdf' output = 'application/pdf'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToPptx: class OdpToPptx:
"""Transforms odp to pptx by using Cloudooo""" """Transforms odp to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_pptx' __name__ = 'odp_to_pptx'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToSxi: class OdpToSxi:
"""Transforms odp to sxi by using Cloudooo""" """Transforms odp to sxi by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_sxi' __name__ = 'odp_to_sxi'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/vnd.sun.xml.impress' output = 'application/vnd.sun.xml.impress'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToHtml: class OdsToHtml:
"""Transforms ods to html by using Cloudooo""" """Transforms ods to html by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_html' __name__ = 'ods_to_html'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',) inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToPdf: class OdsToPdf:
"""Transforms ods to pdf by using Cloudooo""" """Transforms ods to pdf by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_pdf' __name__ = 'ods_to_pdf'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',) inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'application/pdf' output = 'application/pdf'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToXlsx: class OdsToXlsx:
"""Transforms ods to xlsx by using Cloudooo""" """Transforms ods to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_xlsx' __name__ = 'ods_to_xlsx'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',) inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdtToDocx: class OdtToDocx:
"""Transforms odt to docx by using Cloudooo""" """Transforms odt to docx by using Cloudooo"""
implements(itransform)
__name__ = 'odt_to_docx' __name__ = 'odt_to_docx'
inputs = ('application/vnd.oasis.opendocument.text',) inputs = ('application/vnd.oasis.opendocument.text',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdtToHtml: class OdtToHtml:
"""Transforms odt to html by using Cloudooo""" """Transforms odt to html by using Cloudooo"""
implements(itransform)
__name__ = 'odt_to_html' __name__ = 'odt_to_html'
inputs = ('application/vnd.oasis.opendocument.text',) inputs = ('application/vnd.oasis.opendocument.text',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PdfToBmp: class PdfToBmp:
"""Transforms pdf to bmp by using Cloudooo""" """Transforms pdf to bmp by using Cloudooo"""
implements(itransform)
__name__ = 'pdf_to_bmp' __name__ = 'pdf_to_bmp'
inputs = ('application/pdf',) inputs = ('application/pdf',)
output = 'image/x-ms-bmp' # image/bmp output = 'image/x-ms-bmp' # image/bmp
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptToPptx: class PptToPptx:
"""Transforms ppt to pptx by using Cloudooo""" """Transforms ppt to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'ppt_to_pptx' __name__ = 'ppt_to_pptx'
inputs = ('application/vnd.ms-powerpoint', inputs = ('application/vnd.ms-powerpoint',
'application/powerpoint', 'application/powerpoint',
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptxToOdp: class PptxToOdp:
"""Transforms pptx to odp by using Cloudooo""" """Transforms pptx to odp by using Cloudooo"""
implements(itransform)
__name__ = 'pptx_to_odp' __name__ = 'pptx_to_odp'
inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',) inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',)
output = 'application/vnd.oasis.opendocument.presentation' output = 'application/vnd.oasis.opendocument.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptxToPpty: class PptxToPpty:
"""Transforms pptx to ppty by using Cloudooo""" """Transforms pptx to ppty by using Cloudooo"""
implements(itransform)
__name__ = 'pptx_to_ppty' __name__ = 'pptx_to_ppty'
inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',) inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',)
output = 'application/x-asc-presentation' output = 'application/x-asc-presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptyToPptx: class PptyToPptx:
"""Transforms ppty to pptx by using Cloudooo""" """Transforms ppty to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'ppty_to_pptx' __name__ = 'ppty_to_pptx'
inputs = ('application/x-asc-presentation',) inputs = ('application/x-asc-presentation',)
output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class SxiToHtml: class SxiToHtml:
"""Transforms sxi to html by using Cloudooo""" """Transforms sxi to html by using Cloudooo"""
implements(itransform)
__name__ = 'sxi_to_html' __name__ = 'sxi_to_html'
inputs = ('application/vnd.sun.xml.impress',) inputs = ('application/vnd.sun.xml.impress',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class SxiToOdp: class SxiToOdp:
"""Transforms sxi to odp by using Cloudooo""" """Transforms sxi to odp by using Cloudooo"""
implements(itransform)
__name__ = 'sxi_to_odp' __name__ = 'sxi_to_odp'
inputs = ('application/vnd.sun.xml.impress',) inputs = ('application/vnd.sun.xml.impress',)
output = 'application/vnd.oasis.opendocument.presentation' output = 'application/vnd.oasis.opendocument.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsToOds: class XlsToOds:
"""Transforms xls to ods by using Cloudooo""" """Transforms xls to ods by using Cloudooo"""
implements(itransform)
__name__ = 'xls_to_ods' __name__ = 'xls_to_ods'
inputs = ('application/vnd.ms-excel',) inputs = ('application/vnd.ms-excel',)
output = 'application/vnd.oasis.opendocument.spreadsheet' output = 'application/vnd.oasis.opendocument.spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsToXlsx: class XlsToXlsx:
"""Transforms xls to xlsx by using Cloudooo""" """Transforms xls to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'xls_to_xlsx' __name__ = 'xls_to_xlsx'
inputs = ('application/vnd.ms-excel',) inputs = ('application/vnd.ms-excel',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsxToOds: class XlsxToOds:
"""Transforms xlsx to ods by using Cloudooo""" """Transforms xlsx to ods by using Cloudooo"""
implements(itransform)
__name__ = 'xlsx_to_ods' __name__ = 'xlsx_to_ods'
inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',) inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',)
output = 'application/vnd.oasis.opendocument.spreadsheet' output = 'application/vnd.oasis.opendocument.spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsxToXlsy: class XlsxToXlsy:
"""Transforms xlsx to xlsy by using Cloudooo""" """Transforms xlsx to xlsy by using Cloudooo"""
implements(itransform)
__name__ = 'xlsx_to_xlsy' __name__ = 'xlsx_to_xlsy'
inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',) inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',)
output = 'application/x-asc-spreadsheet' output = 'application/x-asc-spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsyToXlsx: class XlsyToXlsx:
"""Transforms xlsy to xlsx by using Cloudooo""" """Transforms xlsy to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'xlsy_to_xlsx' __name__ = 'xlsy_to_xlsx'
inputs = ('application/x-asc-spreadsheet',) inputs = ('application/x-asc-spreadsheet',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces ...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.document.Delivery import Delivery from erp5.component.document.Delivery import Delivery
@zope.interface.implementer( interfaces.IVariated,)
class Immobilisation(Delivery, XMLObject): class Immobilisation(Delivery, XMLObject):
""" """
An Immobilisation object holds the information about An Immobilisation object holds the information about
...@@ -51,9 +52,6 @@ class Immobilisation(Delivery, XMLObject): ...@@ -51,9 +52,6 @@ class Immobilisation(Delivery, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements( interfaces.IVariated, )
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule ...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Invoicing Rule expand simulation created by a order or delivery rule. Invoicing Rule expand simulation created by a order or delivery rule.
...@@ -49,11 +52,6 @@ class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -49,11 +52,6 @@ class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule ...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class InvoiceTransactionSimulationRule(RuleMixin, class InvoiceTransactionSimulationRule(RuleMixin,
MovementCollectionUpdaterMixin, PredicateMatrix): MovementCollectionUpdaterMixin, PredicateMatrix):
""" """
...@@ -54,11 +57,6 @@ class InvoiceTransactionSimulationRule(RuleMixin, ...@@ -54,11 +57,6 @@ class InvoiceTransactionSimulationRule(RuleMixin,
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
...@@ -124,12 +122,16 @@ class InvoiceTransactionRuleMovementGenerator(MovementGeneratorMixin): ...@@ -124,12 +122,16 @@ class InvoiceTransactionRuleMovementGenerator(MovementGeneratorMixin):
.getParentValue().getParentValue() .getParentValue().getParentValue()
kw = {'delivery': None, 'resource': resource, 'price': 1} kw = {'delivery': None, 'resource': resource, 'price': 1}
return kw
if resource is not None: def getGeneratedMovementList(self, movement_list=None, rounding=False):
#set asset_price on movement when resource is different from price movement_list = super(InvoiceTransactionRuleMovementGenerator, self).getGeneratedMovementList(movement_list=movement_list, rounding=rounding)
#currency of the source/destination section portal = self._applied_rule.getPortalObject()
for arrow in 'destination', 'source': for arrow in 'destination', 'source':
section = input_movement.getDefaultAcquiredValue(arrow + '_section') for movement in movement_list:
resource = movement.getResource()
if resource is not None:
section = movement.getDefaultAcquiredValue(arrow + '_section')
if section is not None: if section is not None:
try: try:
currency_url = section.getPriceCurrency() currency_url = section.getPriceCurrency()
...@@ -138,15 +140,17 @@ class InvoiceTransactionRuleMovementGenerator(MovementGeneratorMixin): ...@@ -138,15 +140,17 @@ class InvoiceTransactionRuleMovementGenerator(MovementGeneratorMixin):
if currency_url not in (None, resource): if currency_url not in (None, resource):
currency = portal.unrestrictedTraverse(currency_url) currency = portal.unrestrictedTraverse(currency_url)
exchange_ratio = currency.getPrice( exchange_ratio = currency.getPrice(
context=input_movement.asContext( context=movement.asContext(
categories=('price_currency/' + currency_url, categories=('price_currency/' + currency_url,
'resource/' + resource))) 'resource/' + resource)))
if exchange_ratio is not None: if exchange_ratio is not None:
kw[arrow + '_total_asset_price'] = round( if arrow == 'destination':
exchange_ratio * input_movement.getQuantity(), sign = 1
currency.getQuantityPrecision()) else:
sign = -1
movement.setProperty(arrow + '_total_asset_price', movement.getQuantity() * exchange_ratio * sign)
return kw return movement_list
def _getInputMovementList(self, movement_list=None, rounding=False): def _getInputMovementList(self, movement_list=None, rounding=False):
simulation_movement = self._applied_rule.getParentValue() simulation_movement = self._applied_rule.getParentValue()
......
...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule ...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Rule for Trade Model Rule for Trade Model
...@@ -50,11 +53,6 @@ class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -50,11 +53,6 @@ class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -35,4 +35,5 @@ kw['grand_grand_grand_parent_simulation_state'] = ['started'] ...@@ -35,4 +35,5 @@ kw['grand_grand_grand_parent_simulation_state'] = ['started']
movement_list += list(context.portal_catalog(**kw)) movement_list += list(context.portal_catalog(**kw))
return movement_list # Simulation movement's state maybe not yet updated, make sure it's the right one
return [x for x in movement_list if x.getParentValue().getParentValue().getSimulationState() == 'started']
...@@ -35,13 +35,12 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -35,13 +35,12 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.interface.IJSONConvertable import IJSONConvertable from erp5.component.interface.IJSONConvertable import IJSONConvertable
@zope.interface.implementer(
IJSONConvertable,)
class JSONType(XMLObject): class JSONType(XMLObject):
""" """
Represents a portal type with JSON Schema Represents a portal type with JSON Schema
""" """
zope.interface.implements(
IJSONConvertable,
)
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -9,12 +9,7 @@ def _getFacebookClientIdAndSecretKey(portal, reference="default"): ...@@ -9,12 +9,7 @@ def _getFacebookClientIdAndSecretKey(portal, reference="default"):
Internal function. Internal function.
""" """
result_list = portal.portal_catalog.unrestrictedSearchResults( result_list = unrestrictedSearchFacebookConnector(portal, reference=reference)
portal_type="Facebook Connector",
reference=reference,
validation_state="validated",
limit=2,
)
assert result_list, "Facebook Connector not found" assert result_list, "Facebook Connector not found"
if len(result_list) == 2: if len(result_list) == 2:
raise ValueError("Impossible to select one Facebook Connector") raise ValueError("Impossible to select one Facebook Connector")
...@@ -38,10 +33,10 @@ def getAccessTokenFromCode(self, code, redirect_uri): ...@@ -38,10 +33,10 @@ def getAccessTokenFromCode(self, code, redirect_uri):
code=code, redirect_uri=redirect_uri, code=code, redirect_uri=redirect_uri,
app_id=client_id, app_secret=secret_key) app_id=client_id, app_secret=secret_key)
def unrestrictedSearchFacebookConnector(self): def unrestrictedSearchFacebookConnector(self, reference="default"):
return self.getPortalObject().portal_catalog.unrestrictedSearchResults( return self.getPortalObject().portal_catalog.unrestrictedSearchResults(
portal_type="Facebook Connector", portal_type="Facebook Connector",
reference="default", reference=reference,
validation_state="validated", validation_state="validated",
limit=2) limit=2)
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>FacebookLogin_isLoginBlocked</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>FacebookLogin_isPasswordExpired</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>anonymous_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>facebook_login_button.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>36</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>191</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -13,12 +13,7 @@ def _getGoogleClientIdAndSecretKey(portal, reference="default"): ...@@ -13,12 +13,7 @@ def _getGoogleClientIdAndSecretKey(portal, reference="default"):
Internal function. Internal function.
""" """
result_list = portal.portal_catalog.unrestrictedSearchResults( result_list = unrestrictedSearchGoogleConnector(portal, reference=reference)
portal_type="Google Connector",
reference=reference,
validation_state="validated",
limit=2,
)
assert result_list, "Google Connector not found" assert result_list, "Google Connector not found"
if len(result_list) == 2: if len(result_list) == 2:
raise ValueError("Impossible to select one Google Connector") raise ValueError("Impossible to select one Google Connector")
...@@ -51,10 +46,10 @@ def getAccessTokenFromCode(self, code, redirect_uri): ...@@ -51,10 +46,10 @@ def getAccessTokenFromCode(self, code, redirect_uri):
credential_data = json.loads(credential.to_json()) credential_data = json.loads(credential.to_json())
return credential_data return credential_data
def unrestrictedSearchGoogleConnector(self): def unrestrictedSearchGoogleConnector(self, reference="default"):
return self.getPortalObject().portal_catalog.unrestrictedSearchResults( return self.getPortalObject().portal_catalog.unrestrictedSearchResults(
portal_type="Google Connector", portal_type="Google Connector",
reference="default", reference=reference,
validation_state="validated", validation_state="validated",
limit=2) limit=2)
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>GoogleLogin_isLoginBlocked</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>GoogleLogin_isPasswordExpired</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>anonymous_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>google_login_button.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>138</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>191</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -39,6 +39,7 @@ from Products.ERP5.mixin.periodicity import PeriodicityMixin ...@@ -39,6 +39,7 @@ from Products.ERP5.mixin.periodicity import PeriodicityMixin
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from erp5.component.interface.IMovementGenerator import IMovementGenerator from erp5.component.interface.IMovementGenerator import IMovementGenerator
@zope.interface.implementer(IMovementGenerator,)
class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin,
SimulableMixin, PeriodicityMixin): SimulableMixin, PeriodicityMixin):
""" """
...@@ -67,10 +68,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, ...@@ -67,10 +68,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin,
, PropertySheet.Periodicity , PropertySheet.Periodicity
) )
# Declarative interfaces
zope.interface.implements(IMovementGenerator,
)
def _createRootAppliedRule(self): def _createRootAppliedRule(self):
# only try to expand if we are not in draft state # only try to expand if we are not in draft state
if self.getValidationState() in ('draft', ): # XXX-JPS harcoded if self.getValidationState() in ('draft', ): # XXX-JPS harcoded
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>anonymous_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>openid_login_button.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>37</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>191</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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