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

ERP5PropertySheetLegacy is now deprecated

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43523 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d06c6e79
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Account:
"""
Account properties and categories
"""
_properties = (
{ 'id' : 'credit_account',
'storage_id' : 'is_credit_account',
'description' : 'Set to true if this account have a normal balance of'\
' debit.',
'type' : 'boolean',
'mode' : 'w' ,
'default' : 0 },
)
_categories = ( 'account_type', 'gap', 'financial_section', )
_constraints = (
{ 'id': 'account_type_category_existence',
'description': 'Account Type must be set',
'message_category_not_set': 'Account Type must be set',
'type': 'CategoryExistence',
'account_type' : 1,
'condition' : 'python: object.getValidationState() not'
' in ("invalidated", "deleted")'
},
{ 'id': 'gap_category_existence',
'description': 'GAP must be set',
'type': 'CategoryExistence',
'message_category_not_set': 'GAP must be set',
'gap' : 1,
'condition' : 'python: object.getValidationState() not'
' in ("invalidated", "deleted")'
},
)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AccountingPreference:
"""
User Preferences for erp5_accounting.
Contains all preferences (see portal_preferences) relative to accounting.
"""
_properties = (
# user preferences
{ 'id' : 'preferred_accounting_transaction_from_date',
'description' : 'The minimal date (inclusive) for transactions',
'type' : 'date',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_accounting_transaction_at_date',
'description' : 'The maximal date (inclusive) for transactions',
'type' : 'date',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_accounting_transaction_simulation_state',
'description' : 'The simulation state for transactions',
'type' : 'tokens',
'preference' : 1,
'default' : [],
'mode' : 'w'},
{ 'id' : 'preferred_accounting_transaction_section_category',
'description' : 'The section category for transactions; '\
'usually something like group/nexedi.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_accounting_section_category_strict',
'description' : 'Do we use strict section category membership by'
' default.',
'type' : 'boolean',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_accounting_transaction_source_section',
'description' : 'The preferred section organisation.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_accounting_transaction_currency',
'description' : 'The preferred currency.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_accounting_transaction_gap',
'description' : 'The preferred gap.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_account_number_method',
'description' : 'The method used to display the account number.',
'type' : 'string',
'preference' : 1,
'mode' : 'w' },
# Those preferences are used to configure behaviour for the site
{ 'id' : 'preferred_grouping_with_different_quantities',
'description' : 'Allow grouping lines with different quantities',
'type' : 'boolean',
'preference' : 1,
'write_permission': 'Manage properties',
'mode' : 'w'},
{ 'id' : 'preferred_accounting_transaction_line_function_base_category',
'description' : 'Base category to use to specify analytics by function'
' on accounting lines',
'type' : 'string',
'preference' : 1,
'write_permission': 'Manage properties',
'mode' : 'w'},
{ 'id' : 'preferred_accounting_transaction_line_funding_base_category',
'description' : 'Base category to use to specify analytics by funding'
' on accounting lines',
'type' : 'string',
'preference' : 1,
'write_permission': 'Manage properties',
'mode' : 'w'},
{ 'id' :
'preferred_accounting_transaction_line_analytic_base_category',
'description' : 'Base categories to use to specify analytics on '
'accounting lines. Those categories will be used '
'by direct category membership',
'type' : 'tokens',
'preference' : 1,
'write_permission': 'Manage properties',
'mode' : 'w'},
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AccountingRuleCellLine:
"""Properties for Accounting Rule Cell Lines
"""
_properties = (
{ 'id': 'generate_prevision_script_id',
'description': 'ID of a script used to generate prevision',
'type': 'string',
'mode': 'w',
},
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AccountingTransactionBalanceConstraint:
"""
Define an Accounting Transaction Balance Constraint for ZODB
Property Sheets
"""
_properties = (
{ 'id': 'message_transaction_not_balanced_for_source',
'type': 'string',
'description' : 'Error message when transaction is not balanced '\
'for source',
'default': 'Transaction is not balanced for ${section_title}' },
{ 'id': 'message_transaction_not_balanced_for_destination',
'type': 'string',
'description' : 'Error message when transaction is not balanced '\
'for destination',
'default': 'Transaction is not balanced for ${section_title}' },
)
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AccountingTransactionConstraint:
"""Constraints for Accounting Transactions
"""
_constraints = (
{ 'id': 'section_existence',
'description': 'Both sections must be defined for invoices',
'message_category_not_set':
'Both sections must be defined for invoices',
'type': 'CategoryExistence',
'destination_section' : 1,
'source_section' : 1,
'portal_type': ('Person', 'Organisation'),
'condition' : 'python: object.getPortalType() in'
' portal.getPortalInvoiceTypeList()',
},
{ 'id': 'date_existence',
'description': 'Date must be defined',
'message_no_such_property': 'Date must be defined',
'condition' : 'python: object.getSimulationState() not'
' in ("cancelled", "deleted")'
' and object.portal_type!="Purchase Invoice Transaction"',
'type': 'PropertyExistence',
'start_date' : None,
},
{ 'id': 'date_existence_purchase',
'description': 'Date must be defined',
'message_no_such_property': 'Date must be defined',
'condition' : 'python: object.getSimulationState() not'
' in ("cancelled", "deleted")'
' and object.portal_type=="Purchase Invoice Transaction"',
'type': 'PropertyExistence',
'stop_date' : None,
},
{ 'id': 'currency_existence',
'description': 'Currency must be defined',
'message_category_not_set':
'Currency must be defined',
'portal_type': ('Currency',),
'condition' : 'python: object.getSimulationState() not'
' in ("cancelled", "deleted")',
'type': 'CategoryExistence',
'resource' : 1,
},
{ 'id': 'debit_credit_balance',
'description': 'Total Debit must equal Total Credit',
'condition' : 'python: object.getSimulationState() not'
' in ("cancelled", "deleted")',
'type': 'AccountingTransactionBalance',
},
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SA and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class AccountingTransactionLineConstraint:
"""Constraints for Accounting Transaction Lines
"""
_constraints = (
# We need an account if we have a quantity for this side
{ 'id': 'source_existence',
'description': 'Accounting Transaction Lines must use an account',
'condition' : 'python: object.getSourceInventoriatedTotalAssetPrice()'\
' and object.hasSourceSectionAccounting()'\
' and not object.getDestination(portal_type="Account")',
'type': 'CategoryExistence',
'source' : 1,
'portal_type': ('Account',),
'message_category_not_set': 'Account must be defined on lines',
},
{ 'id': 'destination_existence',
'description': 'Accounting Transaction Lines must use an account',
'condition' :
'python: object.getDestinationInventoriatedTotalAssetPrice()'\
' and object.hasDestinationSectionAccounting()'\
' and not object.getSource(portal_type="Account")',
'type': 'CategoryExistence',
'destination' : 1,
'portal_type': ('Account',),
'message_category_not_set': 'Account must be defined on lines',
},
# We need a mirror section for recievable / payable accounts
{ 'id': 'destination_section_existence',
'condition' :
'python: object.getSourceValue(portal_type="Account") is not None'\
' and object.getSourceValue(portal_type="Account").getAccountTypeId()'\
' in ("receivable", "payable")',
'type': 'CategoryAcquiredExistence',
'destination_section' : 1,
'portal_type': ('Person', 'Organisation'),
'message_category_not_set': 'Third party must be defined for '\
'payable or receivable accounts'
},
{ 'id': 'source_section_existence',
'condition' :
'python: object.getDestinationValue(portal_type="Account") is not None'\
' and object.getDestinationValue(portal_type="Account").getAccountTypeId()'\
' in ("receivable", "payable")',
'type': 'CategoryAcquiredExistence',
'source_section' : 1,
'portal_type': ('Person', 'Organisation'),
'message_category_not_set': 'Third party must be defined for '\
'payable or receivable accounts'
},
# We need a payment for bank accounts
{ 'id': 'source_payment_existence',
'condition' : 'python: object.hasSourceSectionAccounting() and'\
' object.getSourceValue(portal_type="Account") is not None'\
' and object.getSourceValue(portal_type="Account").getAccountType()'\
' == "asset/cash/bank"',
'type': 'CategoryAcquiredExistence',
'source_payment' : 1,
'portal_type': Expression('portal/getPortalPaymentNodeTypeList'),
'message_category_not_set': 'Bank account must be defined for '\
'bank type accounts'
},
{ 'id': 'destination_payment_existence',
'condition' : 'python: object.hasDestinationSectionAccounting()'\
' and object.getDestinationValue(portal_type="Account") is not None'\
' and object.getDestinationValue(portal_type="Account").getAccountType()'\
' == "asset/cash/bank"',
'type': 'CategoryAcquiredExistence',
'destination_payment' : 1,
'portal_type': Expression('portal/getPortalPaymentNodeTypeList'),
'message_category_not_set': 'Bank account must be defined for '\
'bank type accounts'
},
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AcquiredProperty:
"""
Define an Acquired Property for ZODB Property Sheets
"""
_properties = (
{ 'id': 'acquisition_base_category',
'type': 'lines',
'description' : 'The base categories to browse',
'default': None },
{ 'id': 'acquisition_object_id',
'type': 'lines',
'description' : 'The default contained object id to look up',
'default': None },
# TALES expression
{ 'id': 'acquisition_portal_type',
'type': 'string',
'description' : 'The portal types to browse',
'default': None },
{ 'id': 'acquisition_accessor_id',
'type': 'string',
'description' : 'Property to get from source',
'default': None },
{ 'id': 'alt_accessor_id',
'type': 'lines',
'description' : 'Alternative accessor ids',
'default': None },
{ 'id': 'acquisition_copy_value',
'type': 'boolean',
'description' : 'Determines if acquired value should be copied',
'default': False },
{ 'id': 'acquisition_mask_value',
'type': 'boolean',
'description' : 'Determines if the local value have priority',
'default': False },
# TALES expression
{ 'id': 'content_portal_type',
'type': 'string',
'description' : 'Portal type of the object to create',
'default': None },
{ 'id': 'content_acquired_property_id',
'type': 'lines',
'description' : 'Properties to be synchronized with the current object',
'default': None },
{ 'id': 'content_translation_acquired_property_id',
'type': 'lines',
'description' : 'Properties to be translated',
'default': None },
)
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Julien Muchembled <jm@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ActionInformation:
"""
Properties of an ERP5 Action Information
"""
_properties = (
{ 'id': 'reference',
'type': 'string',
'mode': 'w',
},
{ 'id': 'condition',
'type': 'object',
'description': 'TALES Expression to define the applicability of the' \
' action',
'mode': 'w',
},
{ 'id': 'action_permission',
'type': 'lines',
'description': 'The permissions required to use the action',
'mode': 'w',
'default': ['View'],
},
{ 'id': 'float_index',
'type': 'float',
'description': 'Priority of the current action',
'mode': 'w',
'default': 1.0,
},
{ 'id': 'visible',
'type': 'boolean',
'description': 'Visibility of the current action',
'mode': 'w',
'default': True,
},
{ 'id': 'action',
'type': 'object',
'description': 'TALES Expression to define the URL of the action',
'mode': 'w',
},
{ 'id': 'icon',
'type': 'object',
'description': 'TALES Expression to define the URL of the icon of the' \
' action',
'mode': 'w',
},
)
_categories = ('action_type', )
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Sebastien Robin <seb@nexedi.com>
# Kevin Deldycke <kevin@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Agent:
"""
Agent properties for Agent objects
"""
_properties = (
)
_categories = ('agent',)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Kevin Deldycke <kevin@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AgentPrivilege:
"""
Agent Privilege properties for Agent Privilege objects
"""
_properties = (
{ 'id' : 'operation_upper_limit',
'description' : 'The maximum amount of money that can be processed by an operation initiated with this privilege',
'type' : 'float',
'mode' : 'w' },
)
_categories = ('agent_privilege',)
#############################################################################
#
# Copyright (c) 2005-2007 Nexedi SARL and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Aggregated:
"""
Properties on resource, in order to explicitely define which Items portal
types can be aggregated for this resource.
"""
_properties = (
{ 'id': 'aggregated_portal_type',
'description': 'Item portal types that can be aggregated ' \
'for this document',
'type': 'lines',
'mode': 'w',
'default': (),
},
{ 'id': 'required_aggregated_portal_type',
'description': 'Item portal types that *must* be aggregated ' \
'for this document' ,
'type': 'lines',
'mode': 'w',
'default': (),
},
)
##############################################################################
#
# Copyright (c) 2004 Nexedi SARL and Contributors. All Rights Reserved.
# Sebastien Robin <seb@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Alarm:
"""
Properties which allow to define a generic Alarm.
An alarm can be used to trigger an action periodically.
"""
_properties = (
{ 'id' : 'report_method_id',
'description' : 'the method used to display information',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'active_sense_method_id',
'description' : 'the method used to check things',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'sense_method_id',
'description' : 'the method used to know if there is a problem',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'solve_method_id',
'description' : 'the method used to solve problems if any.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'notification_method_id',
'description' : 'the method used to notify results.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'alarm_notification_mode',
'description' : 'defines the notification mode of an Alarm.'
'Never, on sense or always.',
'type' : 'selection',
'select_variable' : 'getAlarmNotificationModeSelectionList',
'mode' : 'w' },
{ 'id' : 'alarm_notification_mode_selection',
'description' : 'List of possible values for alarm_notification_mode',
'type' : 'tokens',
'default' : ['always','sense','never'],
'mode' : ''},
)
_categories = ( 'group', 'site', # XXX Why ?
'destination')
##############################################################################
#
# Copyright (c) 2004 Nexedi SARL and Contributors. All Rights Reserved.
# Guillaume Michon <guillaume@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Amortisation:
"""
Properties which allow to immobilise an item
These properties are applied to an Immobilisation Movement or to an Item
TODO:
- rename categories for more genericity (input_acount -> input)
"""
_properties = (
{ 'id' : 'amortisation_start_price',
'description' : 'The value to use to calculate the accounting amortisation movements (net of tax)',
'type' : 'float',
'mode' : 'w'
},
{ 'id' : 'extra_cost_price',
'description' : 'The extra costs to immobilise with the main price (net of tax)',
'type' : 'float',
'mode' : 'w'
},
{ 'id' : 'disposal_price',
'description' : 'The estimated price at the end of the lifetime (net of tax)',
'type' : 'float',
'mode' : 'w'
},
{ 'id' : 'durability',
'description' : 'The remaining durability of the item',
'type' : 'float',
'mode' : 'w'
},
{ 'id' : 'amortisation_duration',
'description' : 'The remaining amortisation duration in months',
'type' : 'int',
'mode' : 'w'
},
{ 'id' : 'immobilisation_vat',
'description' : 'The VAT at the beginning of the immobilisation period',
'type' : 'float',
'mode' : 'w'
},
{ 'id' : 'amortisation_method',
'description' : 'The amortisation method used for this particular immobilisation period',
'type' : 'string',
'mode' : 'w'
},
# Properties specific to each amortisation method
{ 'id' : 'degressive_coefficient',
'description' : 'The fiscal coefficient to use in degressive amortisation',
'type' : 'float',
'mode' : 'w'
},
)
_categories = ('input_account', 'output_account', 'immobilisation_account',
'amortisation_account', 'depreciation_account',
'extra_cost_account', 'monthly_amortisation_account',
'immobilisation_vat_account') # XXX Some rename required
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
# This has to be chanegd and improved by the new category acquisition tool
from Products.CMFCore.Expression import Expression
class Amount:
"""
Properties for Amount. Amounts are a quantity
of a given resource in a given variation.
The variation is stored in the category and properties
Efficiency may need to be renamed - this
is a proba value / fuzzy value
variation is a reserverd name implemented as getVariation and setVariation....
in the amount class
"""
_properties = (
{ 'id' : 'resource_relative_url',
'description' : "The resource relative url involved",
'type' : 'string',
'acquisition_base_category' : ('resource',),
'acquisition_portal_type' : Expression('python: portal.getPortalResourceTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Accounting
{ 'id' : 'quantity',
'description' : """The quantity of resource.""",
'type' : 'float',
'range' : True,
'default' : 0.0,
'acquisition_base_category' : ('order','delivery',),
'acquisition_portal_type' : Expression('python: portal.getPortalAcquisitionMovementTypeList() + portal.getPortalDeliveryTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getQuantity',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'cancellation_amount',
'description' : 'Defines if this quantity is used in order to cancel another one',
'type' : 'boolean',
'default': False,
'mode' : 'w' },
# quantity_sign is used by QuantitySignMovementGroup
# When comparing a delivery to a property_dict coming from a MovementGroup,
# the DeliveryBuilder needs to have at least a specific property for each MovementGroup
{ 'id' : 'quantity_sign',
'description' : 'Defines if the quantity is positive or negative',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'efficiency',
'description' : """The efficiency.""",
'type' : 'float',
'default' : 1.0,
'acquisition_base_category' : ('delivery',),
'acquisition_portal_type' : Expression('python: portal.getPortalAcquisitionMovementTypeList() + portal.getPortalDeliveryTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getEfficiency',
'acquisition_depends' : None,
#'get_adapter_id' :
#'set_adapater_id' :
#'has_adapater_id' :
'mode' : 'w' },
# Profit and loss
{ 'id' : 'profit_quantity', # XXX-JPS - probably deprecated
'description' : 'A quantity which represents generation of resource from nowhere',
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
)
_categories = ('resource', 'quantity_unit',
'base_application', 'base_contribution', 'use', 'trade_phase',
# used to link to amount generator line/cells
'causality',
# Acquired categories
'product_line',
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AmountGeneratorLine:
"""
Properties for amount generator lines
"""
_properties = (
{ 'id' : 'target_delivery',
'description' : "Defines if amount generator line should be applied on"
" delivery (e.g. a stamp on an order) instead of"
" movements (e.g. VAT to every order line).",
'type' : 'boolean',
'mode' : 'w',
},
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AppliedRule:
"""
AppliedRule
An AppliedRule makes the link between simulation movements it contains
and the rule that generated them.
"""
_properties = (
{ 'id' : 'last_expand_simulation_state',
# XXX: This property shall be deprecated soon
'description' : 'Contains the id of the simulation state when the '\
'object was last expanded (in order to avoid '\
'recalculation)',
'acquisition_base_category' : ( 'parent',),
'acquisition_portal_type' : ('Applied Rule', ),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getLastExpandSimulationState',
'acquisition_depends' : None,
'alt_accessor_id' : ('getLastExpandSimulationState', ),
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'prevent_compensation',
'description' : 'Controls the fact if compensation is allowed or '
'not in part of tree controlled by Applied Rule',
'type' : 'boolean',
'default' : False,
'mode' : 'w' },
)
_categories = ('specialise', 'causality', 'order', )
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
# Aurélien Calonne <aurel@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Archive:
"""
"""
_properties = (
{ 'id' : 'catalog_id',
'description' : 'The id of the catalog used by the archive',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'connection_id',
'description' : 'The id of the connection used by the archive',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'deferred_connection_id',
'description' : 'The id of the deferred connection used by the archive',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'priority',
'description' : 'Priority of activity use to index object into the archive',
'type' : 'int',
'mode' : 'w' ,
'default' : 5},
{ 'id' : 'stop_date',
'description' : 'The stop date at which we archive document',
'type' : 'date',
'range' : True,
'default' : None,
'mode' : 'w' },
{ 'id' : 'inventory_method_id',
'description' : 'The method that will be used to create inventory when creating archive',
'type' : 'string',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Arrow:
"""
Properties which allow to define a generic Arrow. Arrows are
used by Path and Movements to define a source and a destination
with attributes (payment, decision, etc.) which allow to qualify
a movement
"""
_properties = (
# Source reference
{ 'id' : 'source_relative_url',
'description' : 'The titles of the destination of this movement',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'source_person_title',
'description' : 'The title of the source person of this movement',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'r' },
{ 'id' : 'source_person_first_name',
'description' : 'The first name of source person of this movement',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_accessor_id' : 'getFirstName',
'mode' : 'w' },
{ 'id' : 'source_person_last_name',
'description' : 'The last name of source person of this movement',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_accessor_id' : 'getLastName',
'mode' : 'w' },
{ 'id' : 'source_person_default_email_text',
'description' : 'The email address of source person'\
' of this movement',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_accessor_id' : 'getDefaultEmailText',
'mode' : 'w' },
{ 'id' : 'source_person_default_telephone_text',
'description' : 'The telephone number of source person'\
' of this movement',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_accessor_id' : 'getDefaultTelephoneText',
'mode' : 'w' },
{ 'id' : 'source_organisation_title',
'description' : 'The title of the source organisation of this movement',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'r' },
# Destination reference
{ 'id' : 'destination_relative_url',
'description' : 'The titles of the destination of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'destination_person_title',
'description' : 'The title of the destination person of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'r' },
{ 'id' : 'destination_organisation_title',
'description' : 'The title of the destination organisation of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination',),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'r' },
# Source decision reference
{ 'id' : 'source_decision_relative_url',
'description' : 'The titles of the source decision of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_decision',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination decision reference
{ 'id' : 'destination_decision_relative_url',
'description' : 'The titles of the destination decision of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_decision',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Source section reference
{ 'id' : 'source_section_relative_url',
'description' : 'The titles of the source section of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_section',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination section reference
{ 'id' : 'destination_section_relative_url',
'description' : 'The titles of the destination section of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_section',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Source administration reference
{ 'id' : 'source_administration_relative_url',
'description' : 'The titles of the source administration of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_administration',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination administration reference
{ 'id' : 'destination_administration_relative_url',
'description' : 'The titles of the destination administration of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_administration',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Source payment reference
{ 'id' : 'source_payment_relative_url',
'description' : 'The titles of the source payment of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_payment',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination payment reference
{ 'id' : 'destination_payment_relative_url',
'description' : 'The titles of the destination payment of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_payment',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# more properties to make the difference between person and organisation
{ 'id' : 'destination_decision_person_title',
'description' : 'The title of the destination decision person of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_decision',),
'acquisition_portal_type' : 'Person',
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'destination_decision_organisation_title',
'description' : 'The title of the destination decision organisation of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_decision',),
'acquisition_portal_type' : 'Organisation',
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'destination_administration_person_title',
'description' : 'The title of the destination administration person of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_administration',),
'acquisition_portal_type' : 'Person',
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'destination_administration_organisation_title',
'description' : 'The title of the destination administration organisation of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_administration',),
'acquisition_portal_type' : 'Organisation',
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
# Source trade reference
{ 'id' : 'source_trade_relative_url',
'description' : 'The titles of the source trade of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_trade',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination trade reference
{ 'id' : 'destination_trade_relative_url',
'description' : 'The titles of the destination trade of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_trade',),
'acquisition_portal_type' : Expression('python: portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Source project reference
{ 'id' : 'source_project_relative_url',
'description' : 'The titles of the source project of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_project',),
'acquisition_portal_type' : Expression('python: portal.getPortalProjectTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination project reference
{ 'id' : 'destination_project_relative_url',
'description' : 'The titles of the destination project of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_project',),
'acquisition_portal_type' : Expression('python: portal.getPortalProjectTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Source function reference
{ 'id' : 'source_function_relative_url',
'description' : 'The titles of the source function of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_function',),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination function reference
{ 'id' : 'destination_function_relative_url',
'description' : 'The titles of the destination function of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_function',),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Source transport reference
{ 'id' : 'source_transport_relative_url',
'description' : 'The titles of the source transport of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_transport',),
'acquisition_portal_type' : Expression('python: portal.getPortalOrderTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination transport reference
{ 'id' : 'destination_transport_relative_url',
'description' : 'The titles of the destination transport of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_transport',),
'acquisition_portal_type' : Expression('python: portal.getPortalOrderTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Source advice, use for the consultant who helps taking the decision
{ 'id' : 'source_advice_relative_url',
'description' : 'The titles of the source advice of this movement',
'type' : 'string',
'acquisition_base_category' : ('source_advice',),
'acquisition_portal_type' : Expression('python: \
portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Destination advice
{ 'id' : 'destination_advice_relative_url',
'description' : 'The titles of the destination advice of this movement',
'type' : 'string',
'acquisition_base_category' : ('destination_advice',),
'acquisition_portal_type' : Expression('python: \
portal.getPortalNodeTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
)
_categories = ( 'source', 'destination',
'source_section', 'destination_section',
'source_decision', 'destination_decision',
'source_administration', 'destination_administration',
'source_payment', 'destination_payment',
'source_trade', 'destination_trade',
'source_function', 'destination_function',
'source_project', 'destination_project',
'source_carrier', 'destination_carrier',
'source_referral', 'destination_referral',
'source_account', 'destination_account',
'source_funding', 'destination_funding',
#'source_advice', 'destination_advice',
#'source_transport', 'destination_transport',
# Virtual categories
'source_region', 'destination_region',
'source_payment_region', 'destination_payment_region',
)
##############################################################################
#
# Copyright (c) 2003-2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Kevin Deldycke <kevin_AT_nexedi_DOT_com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Assignment:
"""
These properties are used by Career and Assignment
"""
_properties = (
{ 'id' : 'salary_coefficient'
, 'description' : 'A coefficient related to the salary classification of the person'
, 'type' : 'int'
, 'mode' : 'w'
},
{ 'id' : 'collective_agreement_title'
, 'description' : 'A title that identify the collective agreement of this person in the case of employee/employer relation'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'career_end_reason'
, 'description' : 'An explanation why the career ends'
, 'type' : 'text'
, 'mode' : 'w'
},
)
_categories = ( # Career categories
'grade', 'role', 'skill', 'subordination', 'salary_level', 'product_line'
# Assignment and Career categories
, 'group', 'site', 'function', 'activity'
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class AttributeEqualityConstraint:
"""
Define an Attribute Equality Constraint for ZODB Property Sheets
"""
_properties = (
{ 'id': 'constraint_attribute_name',
'type': 'string',
'description' : 'Attribute name whose values are checked' },
# TALES Expression
{ 'id': 'constraint_attribute_value',
'type': 'string',
'description' : 'Valid values of the Attribute' },
{ 'id': 'message_invalid_attribute_value',
'type': 'string',
'description' : 'Error message when the attribute value is invalid',
'default': 'Attribute ${attribute_name} value is ${current_value} '\
'but should be ${expected_value}' },
{ 'id': 'message_invalid_attribute_value_fixed',
'type': 'string',
'description' : 'Error message when the attribute value is '\
'invalid but has been fixed',
'default': 'Attribute ${attribute_name} value is ${current_value} '\
'but should be ${expected_value} (Fixed)'},
)
##############################################################################
#
# Copyright (c) 2002-2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Kevin Deldycke <kevin@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BankAccount:
"""
Properties for BankAccount Objects
"""
_properties = (
{'id' : 'bank_country_code',
'description' : 'The ISO 3166 2-letters country code of the bank to include in the IBAN.',
'type' : 'string',
'mode' : 'w'
},
{'id' : 'bank_code',
'description' : 'The code that identify the Bank holding this bank account. It it the first part of the BBAN.',
'type' : 'string',
'mode' : 'w'
},
{'id' : 'branch',
'description' : 'The branch code holding this bank account. This is the middle part of the BBAN.',
'type' : 'string',
'mode' : 'w'
},
{'id' : 'bank_account_number',
'description' : 'The bank account number. This is the last part of the BBAN',
'type' : 'string',
'mode' : 'w'
},
{'id' : 'bank_account_key',
'description' : 'The bank account key. This is an additionnal part of the BBAN',
'type' : 'string',
'mode' : 'w'
},
{'id' : 'bank_account_holder_name',
'description' : 'The bank account holder\'s name',
'type' : 'string',
'mode' : 'w'
},
{'id' : 'overdraft_facility',
'description' : 'The bank account overdraft facility indicator',
'type' : 'boolean',
'mode' : 'w'
},
{'id' : 'internal_bank_account_number',
'description' : 'An internal bank account number',
'type' : 'string',
'mode' : 'w'
},
)
_categories = ( 'source', 'bank_account_type', )
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# K. Toure <ktoure_AT_nexedi_DOT_com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BankingOperation:
"""
Person properties and categories
"""
_properties = (
# Subordination properties
{ 'id' : 'movement',
'storage_id' : 'movement',
'description' : 'The current amount',
'type' : 'content',
'portal_type' : ('Banking Operation Line',),
'acquired_property_id' : ('source_debit', 'source_credit'),
'mode' : 'w' },
)
_categories = ('site',)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BaobabCategory:
"""
PropertySheetTemplate properties for all Baobab Categories
"""
_properties = (
{
'id' : 'codification',
'description' : 'category codified identifier',
'type' : 'string',
'mode' : 'w',
'default' : None,
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getCodification',
},
)
_categories = ('vault_type',)
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Base:
"""
Base properties for all ERP5Type objects
"""
_properties = (
{ 'id' : 'id',
'description' : 'Local ID of the object in its enclosing container',
'type' : 'string',
'mode' : '' },
{ 'id' : 'uid',
'description' : 'Unique ID of the object in the ZSQLCatalog',
'type' : 'long',
'mode' : '' },
)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BaseCache:
"""
"""
_properties = (
{'id' : 'cache_expire_check_interval',
'description' : 'Cache expire check interval',
'type' : 'int',
'default' : 360,
'mode' : 'w' ,
},)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BaseType:
"""
Properties of an ERP5 portal type
"""
_properties = (
{ 'id': 'type_icon',
'storage_id': 'content_icon', # CMF Compatibility
'type': 'string',
'mode': 'w',
'default': '',
},
{ 'id': 'type_factory_method_id',
'storage_id': 'factory', # CMF Compatibility
'type': 'string',
'mode': 'w',
'label': 'Product factory method'
},
{ 'id': 'type_class'
, 'type': 'string'
, 'mode': 'w'
, 'label': 'Document class the Portal Type inherits from'
},
{ 'id': 'type_mixin'
, 'type': 'lines'
, 'mode': 'w'
, 'label': 'List of Mixins that are attached to the Portal Type'
},
{ 'id': 'type_interface'
, 'type': 'lines'
, 'mode': 'w'
, 'label': 'List of Interfaces that the Portal Type implements'
},
{ 'id': 'type_add_permission',
'storage_id': 'permission', # CMF Compatibility
'type': 'string',
'mode': 'w',
'label': 'Add permission'
},
{ 'id': 'type_init_script_id',
'storage_id': 'init_script', # CMF Compatibility
'type': 'string',
'mode': 'w',
'label': 'Init Script'
},
{ 'id': 'type_acquire_local_role'
, 'storage_id': 'acquire_local_roles' # Compatibility
, 'type': 'boolean'
, 'mode': 'w'
, 'label': 'Acquire Local Roles'
},
{ 'id': 'type_filter_content_type',
'storage_id': 'filter_content_types', # CMF Compatibility
'type': 'boolean',
'mode': 'w',
'label': 'Filter content types?'
},
{ 'id': 'type_allowed_content_type'
, 'storage_id': 'allowed_content_types' # CMF Compatibility
, 'type': 'lines'
, 'mode': 'w'
, 'label': 'Allowed content types'
},
{ 'id': 'type_hidden_content_type'
, 'storage_id': 'hidden_content_type_list' # CMF Compatibility
, 'type': 'lines'
, 'mode': 'w'
, 'label': 'Hidden content types'
},
{ 'id': 'type_property_sheet'
, 'storage_id': 'property_sheet_list' # CMF Compatibility
, 'type': 'multiple selection'
, 'mode': 'w'
, 'label': 'Property Sheets'
, 'select_variable':'getAvailablePropertySheetList'
, 'default': ()
},
{ 'id': 'type_base_category'
, 'storage_id': 'base_category_list' # CMF Compatibility
, 'type': 'multiple selection'
, 'mode': 'w'
, 'label': 'Base Categories'
, 'select_variable':'getAvailableBaseCategoryList'
},
{ 'id': 'type_group'
, 'storage_id': 'group_list' # CMF Compatibility
, 'type': 'multiple selection'
, 'mode': 'w'
, 'label': 'Groups'
, 'select_variable':'getAvailableGroupList'
},
# searchable text method id list used by ZSQLCatalog
{ 'id': 'searchable_text_property_id'
, 'type': 'lines'
, 'mode': 'w'
, 'label': 'Searchable text property ids'
# default known to exists everythere properties
, 'default': ['title', 'description', 'id', 'reference', 'short_title']
},
{ 'id': 'searchable_text_method_id'
, 'type': 'lines'
, 'mode': 'w'
, 'label': 'Searchable text method Ids'
, 'default': []
},
)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Yoshinori Okuji <yo@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Budget:
"""
Budget properties
"""
_categories = ( 'budget_type', )
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Courteaud Romain <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BudgetConstraint:
"""
Budget constraints.
"""
_constraints = (
{ 'id' : 'property_existence',
'type' : 'PropertyExistence',
'start_date_range_min' : None,
'start_date_range_max' : None,
'description' : 'Budget term is not defined.'
},
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BudgetTransactionConstraint:
"""
Budget transaction constraint.
Commented constraint are kept as example.
"""
_constraints = (
# { 'id' : 'source',
# 'type' : 'CategoryMembershipArity',
# 'min_arity' : '1',
# 'max_arity' : '1',
# 'portal_type' : ('Budget Cell', ),
# 'base_category' : ('source',),
# 'description' : 'Source is not defined.'
# },
# { 'id' : 'destination',
# 'type' : 'CategoryMembershipArity',
# 'min_arity' : '1',
# 'max_arity' : '1',
# 'portal_type' : ('Budget Cell', ),
# 'base_category' : ('destination',),
# 'description' : 'Destination is not defined.'
# },
{ 'id' : 'property_existence',
'type' : 'PropertyExistence',
'start_date' : None,
'description' : 'Date is not defined.'
},
# { 'id' : 'quantity_validity',
# 'type' : 'TransactionQuantityValueValidity',
# 'description' : 'The quantity of the transaction is greater than ' \
# 'the transferable maximum quantity.'
# },
{ 'id' : 'quantity_feasability',
'type' : 'TransactionQuantityValueFeasability',
'description' : 'The quantity of the transaction is not possible.'
},
)
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BudgetVariation:
"""
Budget variation properties
"""
_categories = ( 'inventory_axis', 'budget_variation')
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Yoshinori Okuji <yo@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Bug:
"""
Bug properties
"""
_properties = (
{ 'id' : 'tested',
'description' : 'if a bug is tested or not',
'type' : 'boolean',
'mode' : 'w' },
)
_categories = ( 'bug_type', 'bug_priority', 'bug_severity', 'bug_group', 'bug_difficulty',)
##############################################################################
#
# Copyright (c) 2008 Nexedi SARL and Contributors. All Rights Reserved.
# Rafael Monnerat <rafael@nexedi.com>
#
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BugConstraint:
"""
Constraintsts For Bug Objects
"""
_constraints = (
{ 'id' : 'title_existence',
'description' : 'Title must be defined',
'type' : 'PropertyExistence',
'title' : None,
'message_no_such_property' : 'Title must be defined',
},
{ 'id' : 'tested_existence',
'description' : 'Tested must be defined',
'type' : 'PropertyExistence',
'tested' : None,
'condition' : "python: object.getSimulationState() in ['ready','stopped']" ,
'message_no_such_property' : 'Tested is unchecked, must have a Unit/Functional test for this',
},
{ 'id' : 'source_project_category_membership_arity',
'description' : 'Handler Project must be defined',
'type' : 'CategoryMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ('Project', 'Project Line' ),
'base_category' : ('source_project',),
'message_arity_with_portal_type_not_in_range': 'Handler Project must be defined',
},
{ 'id' : 'start_date_existence',
'description' : 'Property start_date must be defined',
'type' : 'PropertyExistence',
'start_date' : None,
'message_no_such_property' : 'Begin Date must be defined'
},
{ 'id' : 'date_coherency',
'description' : 'Stop Date must be after Start Date',
'type' : 'TALESConstraint',
'expression' : 'python: object.getStopDate() >= object.getStartDate()',
'message_expression_false': 'End Date must be after Begin Date',
},
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BusinessConfiguration:
"""
Properties of a Business Configuration.
"""
_properties = (
{ 'id' : 'configuration_after_script_id',
'description' : 'Defines the Id of the script to be ran after'
'the configuration.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'user_interface_description_file_id',
'description' : 'Defines the Id of the file which has the description of'
'the user interface.',
'type' : 'string',
'mode' : 'w' },
)
_categories = ("current_state", "resource", "specialise")
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Łukasz Nowak <luke@nexedi.com>
# Yusuke Muraoka <yusuke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BusinessLink:
"""
Business Link properties
"""
_properties = (
{ 'id' : 'completed_state',
'description' : 'List of states for which related Simulation '
'Movement is considered as completed',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'frozen_state',
'description' : 'List of states for which related Simulation '
'Movement is considered as frozen',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
)
_categories = ('delivery_builder', 'order_builder', 'end_of', # XXX-JPS why end_of
'trade_phase' , 'incoterm') # XXX-JPS why incoterm
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Łukasz Nowak <luke@nexedi.com>
# Yusuke Muraoka <yusuke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BusinessProcess:
"""
Business Process properties
"""
_properties = (
{ 'id' : 'referential_date',
'description' : 'Which date(e.g. start_date, stop_date) is referential on the Business Process',
'type' : 'string',
'mode' : 'w' },
)
_categories = ( 'specialise', )
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class BusinessTemplate:
"""
Business templates properties and categories
A business template contains all zope objects needed to add a given
functionnality to ERP5, like accounting or pdf rendering.
"""
_properties = (
{ 'id' : 'template_portal_type_id',
'description' : 'A list of ids of portal types used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_portal_type_workflow_chain',
'description' : 'A list of workflow chains of portal types used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_portal_type_allowed_content_type',
'description' : 'A list of allowed content types for portal types',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_portal_type_hidden_content_type',
'description' : 'A list of hidden content types for portal types',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_portal_type_property_sheet',
'description' : 'A list of property sheet for portal types',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_portal_type_base_category',
'description' : 'A list of base categories for portal types',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_module_id',
'description' : 'A list of ids of modules used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_skin_id',
'description' : 'A list of ids of skins used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_registered_skin_selection',
'description' : 'A list of registered skin selections used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_workflow_id',
'description' : 'A list of ids of workflows used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_product_id',
'description' : 'A list of ids of products used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_document_id',
'description' : 'A list of ids of documents used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_property_sheet_id',
'description' : 'A list of ids of property sheets used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_constraint_id',
'description' : 'A list of ids of constraints used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_role',
'description' : 'A list of ids of roles used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_method_id',
'description' : 'A list of ids of catalog methods used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_result_key',
'description' : 'A list of ids of catalog result keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_related_key',
'description' : 'A list of ids of catalog related keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_result_table',
'description' : 'A list of ids of catalog result tables used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_search_key',
'description' : 'A list of ids of catalog search keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_keyword_key',
'description' : 'A list of ids of catalog keyword keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_datetime_key',
'description' : 'A list of ids of catalog DateTime keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_full_text_key',
'description' : 'A list of ids of catalog full text keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_request_key',
'description' : 'A list of ids of catalog request keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_multivalue_key',
'description' : 'A list of ids of catalog multivalue keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_topic_key',
'description' : 'A list of ids of catalog topic keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_scriptable_key',
'description' : 'A list of ids of catalog scriptable keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_role_key',
'description' : 'A list of ids of catalog role keys used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_catalog_local_role_key',
'description' : 'A list of ids of catalog local role keys used by ' \
'this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_site_property_id',
'description' : 'A list of ids of site properties used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_base_category',
'description' : 'A list of ids of base categories used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_action_path',
'description' : 'A list of ids of actions used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_extension_id',
'description' : 'A list of ids of extensions used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_test_id',
'description' : 'A list of ids of tests used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_path',
'description' : 'A list of object paths used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_keep_path',
'description' : 'A list of object paths that should be kept in installing this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_keep_workflow_path',
'description' : 'A list of object paths whose workflow history should be kept in installing this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_preference',
'description' : 'A list of preferences used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_message_translation',
'description' : 'A list of message translations used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_local_role',
'storage_id' : 'template_local_roles', # Kept for compatibility
'description' : 'A list of local roles used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_portal_type_role',
'storage_id' : 'template_portal_type_roles', # Kept for compatibility
'description' : 'A list of ERP5Types for which we want to add the roles in the template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_tool_id',
'description' : 'A list of Tool ids used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'publication_url',
'description' : 'A url on a webdav server which contains the business template source',
'type' : 'string',
'mode' : 'w', },
{ 'id' : 'change_log',
'description' : 'A change log',
'type' : 'text',
'mode' : 'w',
'default' : '' },
{ 'id' : 'dependency',
'description' : 'a list of template names required by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'provision',
'description' : 'a list of template names provided by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_format_version',
'description' : 'Business Template format version',
'type' : 'int',
'mode' : 'w',
'default' : 0 },
{ 'id' : 'license',
'description' : 'License',
'type' : 'text',
'mode' : 'w',
'default' : '' },
{ 'id' : 'copyright',
'description' : 'A list of copyright holders',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'maintainer',
'description' : 'A list of maintainers',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_update_business_template_workflow',
'description' : 'A flag indicating if we have to update business template workflows',
'type' : 'boolean',
'mode' : 'w',
'default' : 0 },
{ 'id' : 'template_update_tool',
'description' : 'A flag indicating if we have to update tools',
'type' : 'boolean',
'mode' : 'w',
'default' : 0 },
{ 'id' : 'bt_for_diff',
'description' : 'A flag indicating if bt is temporary',
'type' : 'boolean',
'mode' : 'w',
'default' : 0 },
# Kept for compatibility - will be removed some day
{ 'id' : 'template_local_roles',
'description' : 'A list of local roles used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_portal_type_roles',
'description' : 'A list of ERP5Types for which we want to add the roles in the template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
)
_categories = ( )
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CacheFactory:
"""
CacheFactory.
"""
_properties = (
{ 'id' : 'cache_duration',
'description' : 'Cache duration',
'type' : 'int',
'default' : 360,
'mode' : 'w' ,
},
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Rafael M. Monnerat <rafael@nexedi.com>
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CalendarConstraint:
"""Constraints for Calendar
"""
_constraints = (
{ 'id' : 'presence_request_line',
'type' : 'ContentExistence',
'portal_type' : ('Presence Request Period', ),
'description' : 'No Presence Request Period created yet',
'message_no_subobject_portal_type': 'No Presence Request Period created yet',
'condition' : 'python: object.getPortalType() == "Presence Request"',
},
{ 'id' : 'leave_request_line',
'type' : 'ContentExistence',
'portal_type' : ('Leave Request Period', ),
'description' : 'No Leave Request Period created yet',
'message_no_subobject_portal_type': 'No Leave Request Period created yet',
'condition' : 'python: object.getPortalType() == "Leave Request"',
},
{ 'id' : 'group_request_line',
'type' : 'ContentExistence',
'portal_type' : ('Group Leave Period', 'Group Presence Period', ),
'description' : 'No Calendar Line created yet',
'message_no_subobject_portal_type': 'No Calendar Line created yet',
'condition' : 'python: object.getPortalType() == "Group Calendar"',
},
)
##############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CalendarException:
"""
Properties for Calendar Exception
"""
_properties = (
{
'id': 'exception_date',
'description': 'The date of the periodicity exception.',
'type': 'date',
'mode': 'w'
},
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Rafael M. Monnerat <rafael@nexedi.com>
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CalendarPeriodConstraint:
"""Constraints for Calendar Period
"""
_constraints = (
{ 'id': 'start_date_existence',
'description': 'Date must be defined',
'message_no_such_property': 'Start date must be defined',
'type': 'PropertyExistence',
'start_date' : None,
},
{ 'id': 'stop_date_existence',
'description': 'Date must be defined',
'message_no_such_property': 'Stop date must be defined',
'type': 'PropertyExistence',
'stop_date' : None,
},
{ 'id': 'resource_existence',
'description': 'Type must be defined',
'message_category_not_set': 'Type must be defined',
'portal_type': (),
'type': 'CategoryExistence',
'resource' : 1,
},
)
#############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CalendarPreference:
"""System preferences for calendars
"""
_properties = (
{ 'id' : 'preferred_presence_calendar_period_type',
'description' : 'Part of the calendar_period_type category that can be'
' used as resource for presences',
'type' : 'string',
'preference' : 1,
'mode' : 'w',
'default' : '',
'write_permission': 'Manage portal',
},
{ 'id' : 'preferred_absence_calendar_period_type',
'description' : 'Part of the calendar_period_type category that can be'
' used as resource for absences',
'type' : 'string',
'preference' : 1,
'mode' : 'w',
'default' : '',
'write_permission': 'Manage portal',
},
)
##############################################################################
#
# Copyright (c) 2005-2006 Nexedi SARL and Contributors. All Rights Reserved.
# Aurelien Calonne <aurel@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CashContainer:
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
_properties = (
{ 'id' : 'cash_number_range_start',
'description' : '',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'cash_number_range_stop',
'description' : '',
'type' : 'string',
'mode' : 'w'
}
)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CashCurrency:
"""
Properties which allow to define a BankNote or a Coin.
"""
_properties = (
{'id' : 'former',
'description' : 'Tell if it is a former object or not',
'type' : 'boolean',
'mode' : 'w'
},
)
_categories = ( 'emission_letter'
, 'cash_status'
, 'variation'
)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CashDeliveryLine:
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
_properties = (
)
_categories = ( 'emission_letter'
, 'cash_status'
, 'variation'
)
# -*- coding: utf-8 -*-
#############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
# Aurélien Calonne <aurel@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CatalogPreference:
"""
This property sheet defines the user preference for catalog.
"""
_properties = (
{ 'id' : 'preferred_archive',
'description' : 'The archive the user want to use',
'type' : 'string',
'preference' : 1,
'mode' : '' },
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CategoriesSpreadsheetConfiguratorItem:
""" Properties of a CategoriesSpreadsheetConfiguratorItem."""
_properties = (
{ 'id' : 'categories_spreadsheet',
'storage_id' : 'default_categories_spreadsheet',
'description' : 'A spreadsheet with categories definition',
'type' : 'content',
# XXX maybe it can just be a File, so that we don't have to depend on DMS
'portal_type' : ('Spreadsheet',),
'acquired_property_id' : ('file', 'content_type', 'data'),
'acquisition_base_category' : (),
'acquisition_portal_type' : (),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultCategoriesSpreadsheetValue',
'acquisition_depends' : None,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CategoryExistenceConstraint:
"""
Define a Category Existence Constraint for ZODB Property Sheets
"""
_properties = (
{ 'id': 'constraint_base_category',
'type': 'lines',
'description' : 'Categories to check the existence for',
'default': () },
# TALES Expression
{ 'id': 'constraint_portal_type',
'type': 'string',
'description' : 'Portal types',
'default': 'python: ()' },
{ 'id' : 'use_acquisition',
'type': 'boolean',
'description': 'Use acquisition when checking categories' },
{ 'id': 'message_category_not_set',
'type': 'string',
'description' : 'Error message when the category is not defined',
'default': 'Category existence error for base category '\
'${base_category}, this category is not defined' },
{ 'id': 'message_category_not_associated_with_portal_type',
'type': 'string',
'description' : 'Error message when there is no such category',
'default': 'Category existence error for base category '\
'${base_category}, this document has no such category' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CategoryMembershipArityConstraint:
"""
Define a Category Membership Arity Constraint for ZODB Property Sheets
"""
_properties = (
{ 'id': 'min_arity',
'type': 'int',
'description' : 'Minimum arity' },
{ 'id': 'max_arity',
'type': 'int',
'description' : 'Maximum arity' },
# TALES Expression
{ 'id': 'constraint_portal_type',
'type': 'string',
'description' : 'Portal types',
'default': 'python: ()' },
{ 'id': 'constraint_base_category',
'type': 'lines',
'description' : 'Base categories',
'default': () },
{ 'id' : 'use_acquisition',
'type': 'boolean',
'description': 'Use acquisition when checking categories' },
{ 'id': 'message_arity_too_small',
'type': 'string',
'description' : 'Error message when the arity for the relation '\
'is too small',
'default': 'Arity Error for Relation ${base_category}, arity is '\
'equal to ${current_arity} but should be at least '\
'${min_arity}' },
{ 'id': 'message_arity_not_in_range',
'type': 'string',
'description' : 'Error message when the arity for the relation '\
'is out of bounds',
'default': 'Arity Error for Relation ${base_category}, arity is '\
'equal to ${current_arity} but should be between '\
'${min_arity} and ${max_arity}' },
{ 'id': 'message_arity_with_portal_type_too_small',
'type': 'string',
'description' : 'Error message when the arity for the relation '\
'and portal type is too small',
'default': 'Arity Error for Relation ${base_category} and Type '\
'${portal_type}, arity is equal to ${current_arity} '\
'but should be at least ${min_arity}' },
{ 'id': 'message_arity_with_portal_type_not_in_range',
'type': 'string',
'description' : 'Error message when the arity for the relation '\
'and portal type is out of bounds',
'default': 'Arity Error for Relation ${base_category} and Type '\
'${portal_type}, arity is equal to ${current_arity} '\
'but should be between ${min_arity} and ${max_arity}' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CategoryRelatedMembershipArityConstraint:
"""
Define a Category Related Membership Arity Constraint for ZODB
Property Sheets
@see CategoryMembershipArityConstraint
"""
# TALES Expression
_properties = (
{ 'id': 'filter_parameter',
'type': 'string',
'description' : 'Addition parameters passed to catalog',
'default': 'python: {}' },
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Łukasz Nowak <luke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Chain:
"""
Categories for chaining
"""
_categories = ( 'predecessor', 'successor' )
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Alexandre Boeglin <alex@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Codification:
"""
Codification is an identifier used by security groups
"""
_properties = (
{
'id' : 'codification',
'description' : 'a string which can be used to identify a category',
'type' : 'string',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getCodification',
'acquisition_depends' : None,
'mode' : 'w',
},
)
_categories = ()
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Comment:
"""
Provides a placeholder for everything which can not be store somewhere else
"""
_properties = (
{ 'id' : 'comment',
'description' : 'Comments',
'default' : '',
'type' : 'text',
'mode' : 'w' },
)
#############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Yusei TAHARA <yusei@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Computer:
"""
Computer properties and categories
"""
_properties = (
{ 'id' : 'network_address'
, 'storage_id' : 'default_network_address'
, 'description' : 'The unique identity of the computer in computer network.'
, 'type' : 'content'
, 'portal_type' : ( 'Internet Protocol Address', )#'Asynchronous Transfer Mode Address', 'UMTS Address' )
, 'acquired_property_id' : ( 'text', 'host_name', 'ip_address', 'netmask', )
, 'acquisition_base_category': ( 'parent', )
, 'acquisition_portal_type' : ( 'Computer', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultNetworkAddressValue'
, 'acquisition_depends' : None
, 'alt_accessor_id' : ()
, 'mode' : 'w'
},
)
_categories = ('product_line', 'role', 'function', 'group',)
#############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
class Configurable:
"""
Properties for configurable documents
"""
_properties = (
{'id' :'configuration_form_id',
'description':'The ID of the configuration form.',
'type' :'string',
'mode' :'w'
},
{'id' :'configuration_property_list',
'description':'The list of configuration properties.',
'type' :'tokens',
'default' :[],
'mode' :'w'
},
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ConfigurationItem:
""" Properties of a Configuration Item."""
_properties = ({'id' : 'configuration_class_name',
'description' : 'Configuration class name',
'type' : 'string',
'mode' : 'w',
'default' : '' },
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ConfiguratorItemSpreadsheet:
""" Properties of a Configurator Item which uses a property sheet"""
_properties = ({ 'id' : 'configuration_spreadsheet',
'storage_id' : 'default_configuration_spreadsheet',
'description' : 'The spreadsheet for used by one Configuration Item',
'type' : 'content',
'portal_type' : ('Spreadsheet',),
'acquired_property_id' : ('file', 'content_type', 'data'),
'acquisition_base_category' : (),
'acquisition_portal_type' : (),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getConfigurationSpreadsheetValue',
'acquisition_depends' : None,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Container:
"""
Properties of container
"""
_properties = (
{ 'id' : 'net_weight',
'description' : 'weight of the contained items',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'gross_weight',
'description' : 'global weight of the container',
'type' : 'float',
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ContentExistenceConstraint:
"""
Define a Content Existence Constraint for ZODB Property Sheets
"""
_properties = (
# TALES Expression
{ 'id': 'constraint_portal_type',
'type': 'string',
'description' : 'Portal types',
'default': 'python: ()' },
{ 'id': 'message_no_subobject',
'type': 'string',
'description' : 'Error message when there is no subobject',
'default': 'The document does not contain any subobject' },
{ 'id': 'message_no_subobject_portal_type',
'type': 'string',
'description' : 'Error message when there is no subobject of the '\
'given portal type',
'default': 'The document does not contain any subobject of portal '\
'portal type ${portal_type}' },
)
#############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Yusei TAHARA <yusei@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ContributionPredicate:
"""
ContributionPredicate properties
"""
_properties = (
{'id' : 'destination_portal_type',
'description' : 'Portal type which is a result of matching',
'default' : '',
'type' : 'string',
'mode' : 'w'},
)
#############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CustomerRelationPreference:
"""
This property sheet defines the user configurable taxonomy.
"""
_properties = (
{ 'id' : 'preferred_event_resource',
'description' : 'Preferred resources to count the different kinds of Events',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_campaign_resource',
'description' : 'Preferred resources to count the different kinds of Events',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_sale_opportunity_resource',
'description' : 'Preferred resources to count the different kinds of Events',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_meeting_resource',
'description' : 'Preferred resources to count the different kinds of Events',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_support_request_resource',
'description' : 'Preferred resources to count the different kinds of Events',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_event_assessment_form_id',
'description' : 'Preferred forms to use in the assessing of ticket events.',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_event_sender_email',
'description' : 'Preferred email for replies sent through the CRM system.',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Data:
"""
This property sheet defines the way to store data (file, images, etc.)
in the form of an object of any type
"""
_properties = (
{ 'id' : 'data',
'description' : 'An object (string, stream, etc.) which contains raw data',
'type' : 'data',
'default' : '',
'mode' : 'w' },
{ 'id' : 'content_type',
'description' : 'A string which represents the mime type of the data',
'type' : 'string',
'default' : 'application/unknown',
'mode' : 'w' },
# Syntax of filename property is published by
# Dublin Core DCMI Administrative Metadata.
# final version dated of 28 October 2003 can be found at url:
# http://dublincore.org/usage/meetings/2009/10/seoul/acore.pdf
{ 'id' : 'filename',
'description' : 'Name of provided file from where data come from',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'size',
'description' : 'Size in bytes of the data',
'type' : 'int',
'default' : 0,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2009 Nexedi KK, Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DecimalOption:
"""
This property sheet provides properties which are required when using
python's decimal module.
"""
_properties = (
{ 'id' : 'decimal_alignment_enabled',
'description' : 'True if use decimal alignment.',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'decimal_rounding_option',
'description' : 'Rounding option.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'decimal_exponent',
'description' : 'A example of decimal exponent. This value is used when rounds a number to a fixed exponent.',
'type' : 'string',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Fabien Morin <fabien@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DefaultAnnotationLine:
"""
Generate automatic accessors to manage a default AnnotationLine on a object.
"""
_properties = (
# Acquisition
{ 'id' : 'work_time_annotation_line',
'storage_id' : 'work_time_annotation_line',
'description' : 'The duration of worked time',
'type' : 'content',
'portal_type' : ('Annotation Line',),
'acquired_property_id' : ('source_section', 'source_section_title',
'source_section_uid',
'destination_section',
'destination_section_uid',
'destination_section_title',
'resource_uid',
'resource_title', 'quantity',
'quantity_unit', 'quantity_unit_title'),
'mode' : 'w' },
{ 'id' : 'overtime_annotation_line',
'storage_id' : 'overtime_annotation_line',
'description' : 'The duration of overtime worked hours',
'type' : 'content',
'portal_type' : ('Annotation Line',),
'acquired_property_id' : ('source_section', 'source_section_title',
'source_section_uid',
'destination_section',
'destination_section_uid',
'destination_section_title',
'resource_uid',
'resource_title', 'quantity',
'quantity_unit', 'quantity_unit_title'),
'mode' : 'w' },
{ 'id' : 'social_insurance_annotation_line',
'storage_id' : 'social_insurance_annotation_line',
'description' : "The Social Insurance annotation line, it's used to"
" display information on Social Insurance",
'type' : 'content',
'portal_type' : ('Annotation Line',),
'acquired_property_id' : ('source', 'source_title',
'source_uid',
'destination',
'destination_uid',
'destination_title',
'resource_uid',
'resource_title', 'quantity',
'quantity_unit', 'quantity_unit_title'),
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DefaultImage:
"""
Generate automatic accessors to manage a default image on a object.
"""
_properties = (
# Acquisition
{ 'id' : 'image',
'storage_id' : 'default_image',
'description' : 'The default image',
'type' : 'content',
'portal_type' : ('Embedded File',),
'acquired_property_id' : ('file', 'path', 'absolute_url',
'width', 'height'),
'acquisition_base_category' : (),
'acquisition_portal_type' : (),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultImageValue',
'acquisition_depends' : None,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DefaultRoleDefinition:
"""Properties which allow to define a Default Role Definition for any
document.
"""
_properties = (
{ 'id' : 'role_definition',
'storage_id' : 'default_role_definition',
'description' : 'A default role definition',
'type' : 'content',
'portal_type' : ('Role Definition',),
'acquired_property_id' : ('agent', 'agent_title', 'agent_value',
'agent_uid', 'role_name'),
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DefaultSupply:
"""
Properties which allow to define a Default Supply for a resource.
"""
_properties = (
# XXX Kept for compatibility.
{ 'id' : 'supply_line',
'storage_id' : 'default_supply_line',
'description' : '',
'type' : 'content',
'portal_type' : ('Supply Line',),
'acquired_property_id' : ('base_price', 'id', 'priced_quantity',
'price_currency', 'source', 'destination',
'quantity_step', 'priced_quantity',
'start_date', 'stop_date',
'start_date_range_max',
'start_date_range_min',
'comment', 'source_reference',
'destination_reference',
'p_variation_base_category_list'),
'mode' : 'w' },
# Define default internal supply line
{ 'id' : 'internal_supply_line',
'storage_id' : 'default_isl',
'description' : '',
'type' : 'content',
'portal_type' : ('Internal Supply Line',),
'acquired_property_id' : ('base_price', 'id', 'priced_quantity',
'price_currency', 'price_currency_title',
'price_precision', 'base_unit_price',
'source', 'destination',
'source_title', 'destination_title',
'source_value', 'destination_value',
'quantity_step', 'priced_quantity',
'start_date', 'stop_date',
'start_date_range_max',
'start_date_range_min',
'comment', 'source_reference',
'destination_reference',
'p_variation_base_category_list',
'destination_account',
'min_delay', 'max_delay', 'min_flow', 'max_flow',
'min_stock', 'max_stock'),
'mode' : 'w' },
# Define default purchase supply line
{ 'id' : 'purchase_supply_line',
'storage_id' : 'default_psl',
'description' : '',
'type' : 'content',
'portal_type' : ('Purchase Supply Line',),
'acquired_property_id' : ('base_price', 'id', 'priced_quantity',
'price_currency', 'price_currency_title',
'price_precision', 'base_unit_price',
'source', 'destination',
'source_title', 'destination_title',
'source_value', 'destination_value',
'quantity_step', 'priced_quantity',
'start_date', 'stop_date',
'start_date_range_max',
'start_date_range_min',
'comment', 'source_reference',
'destination_reference',
'p_variation_base_category_list',
'destination_account',
'min_delay', 'max_delay', 'min_flow', 'max_flow',
'min_stock', 'max_stock'),
'mode' : 'w' },
# Define default sale supply line
{ 'id' : 'sale_supply_line',
'storage_id' : 'default_ssl',
'description' : '',
'type' : 'content',
'portal_type' : ('Sale Supply Line',),
'acquired_property_id' : ('base_price', 'id', 'priced_quantity',
'price_currency', 'price_currency_title',
'price_precision', 'base_unit_price',
'source', 'destination',
'source_title', 'destination_title',
'source_value', 'destination_value',
'quantity_step', 'priced_quantity',
'start_date', 'stop_date',
'start_date_range_max',
'start_date_range_min',
'comment', 'source_reference',
'destination_reference',
'p_variation_base_category_list',
'source_account',
'min_delay', 'max_delay', 'min_flow', 'max_flow',
'min_stock', 'max_stock'),
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Delivery:
"""
Properties which allow to define a generic Delivery.
Delivery objects usually have a causality.
"""
_categories = ('causality', 'incoterm', 'delivery_mode', 'solver',
'base_contribution')
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class DeliveryBuilder:
"""
Properties which allow to define a generic Delivery Builder.
"""
_properties = (
{ 'id' : 'delivery_module',
'description' : 'Define the module name where to create the delivery.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'delivery_portal_type',
'description' : 'Define the portal type of the delivery.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'delivery_line_portal_type',
'description' : 'Define the portal type of the delivery line.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'delivery_cell_portal_type',
'description' : 'Define the portal type of the delivery cell.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'resource_portal_type',
'description' : 'Define the portal type of the resource.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'simulation_select_method_id',
'description' : 'defines how to query all Simulation Movements which\
meet certain criteria',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'delivery_collect_order',
'description' : 'defines how to group selected movements according\
to gathering rules',
'type' : 'string',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'delivery_line_collect_order',
'description' : 'defines how to group selected movements according\
to gathering rules',
'type' : 'string',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'delivery_cell_collect_order',
'description' : 'defines how to group selected movements according\
to gathering rules',
'type' : 'string',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'delivery_select_method_id',
'description' : 'defines how to select existing Delivery which may\
eventually be updated with selected simulation\
movements',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'delivery_cell_separate_order',
'description' : 'defines what to do with cell which share the same\
properties after being collecting.',
'type' : 'string',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'delivery_module_before_building_script_id',
'description' : 'defines a script which is called before building.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'delivery_after_generation_script_id',
'description' : 'defines a script which is called on each delivery\
created',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'delivery_creatable',
'description' : 'defines whether to create new deliveries or not',
'type' : 'boolean',
'default' : 1,
'mode' : 'w' },
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
class DeliverySolver:
_categories = ('delivery',)
##############################################################################
#
# Copyright (c) 2003 Nexedi SARL and Contributors. All Rights Reserved.
# Yoshinori Okuji <yo@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Device:
"""
Device class stores informations on a general network Device
with one network interface
"""
_properties = (
{ 'id' : 'hostname',
'description' : 'Hostname',
'type' : 'string',
'mode' : '' },
{ 'id' : 'ip_address',
'description' : 'IP Address',
'type' : 'string',
'mode' : '' },
{ 'id' : 'netmask',
'description' : 'Netmask',
'type' : 'string',
'mode' : '' },
{ 'id' : 'netmask_bits',
'description' : 'Netmask Bits',
'type' : 'int',
'mode' : '' },
{ 'id' : 'network_address',
'description' : 'Network Address',
'type' : 'string',
'mode' : '' },
{ 'id' : 'broadcast_address',
'description' : 'Broadcast Address',
'type' : 'string',
'mode' : '' },
{ 'id' : 'dns_server_ip_address',
'description' : 'DNS Server IP Address',
'type' : 'string',
'mode' : '' },
{ 'id' : 'gateway_ip_address',
'description' : 'Gateway IP Address',
'type' : 'string',
'mode' : '' },
{ 'id' : 'ppp_user',
'description' : 'PPP User Login',
'type' : 'string',
'mode' : '' },
{ 'id' : 'ppp_password',
'description' : 'PPP User Password',
'type' : 'string',
'mode' : '' },
{ 'id' : 'wlan_wep_key',
'description' : 'WLAN Wep Key',
'type' : 'string',
'mode' : '' },
{ 'id' : 'wlan_essid',
'description' : 'WLAN EssID',
'type' : 'string',
'mode' : '' },
{ 'id' : 'wlan_channel',
'description' : 'WLAN Channel',
'type' : 'string',
'mode' : '' },
{ 'id' : 'ipsec_extra_config',
'description' : 'IPSec Extra Config',
'type' : 'text',
'mode' : '' },
{ 'id' : 'network_interface',
'description' : 'Network Interface',
'type' : 'string',
'mode' : '' },
{ 'id' : 'network_type',
'description' : 'Network Type',
'type' : 'string',
'mode' : '' },
{ 'id' : 'connection_type',
'description' : 'Connection Type',
'type' : 'string',
'mode' : '' },
{ 'id' : 'modem_type',
'description' : 'Modem Type',
'type' : 'string',
'mode' : '' }
)
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Discount:
"""
Discounts are used in orders, trade condition,...
"""
_properties = (
{ 'id' : 'discount',
'description' : 'An absolute discount value',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'discount_ratio',
'description' : 'A percentage of amount',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'additional_discount',
'description' : 'An absolute discount value',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'additional_discount_ratio',
'description' : 'A percentage of amount',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'immediate_discount',
'description' : 'is the discount immediate',
'type' : 'boolean',
'mode' : 'w' },
)
_categories = ( 'discount_type', )
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DistributedRamCache:
"""
"""
_categories = ( 'specialise', )
##############################################################################
#
## Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
#
## WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# # consequences resulting from its eventual inadequacies and bugs
# # End users who are looking for a ready-to-use solution with commercial
# # garantees and support are strongly adviced to contract a Free Software
# # Service Company
# #
# # This program is Free Software; you can redistribute it and/or
# # modify it under the terms of the GNU General Public License
# # as published by the Free Software Foundation; either version 2
# # of the License, or (at your option) any later version.
# #
# # This program is distributed in the hope that it will be useful,
# # but WITHOUT ANY WARRANTY; without even the implied warranty of
# # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# # GNU General Public License for more details.
# #
# # You should have received a copy of the GNU General Public License
# # along with this program; if not, write to the Free Software
# # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
# ##############################################################################
class Document:
"""
This propert sheet defines the default taxonomy for Document management in ERP5.
"""
_properties = (
{ 'id' : 'base_data',
'description' : 'An object (string, stream, etc.) which contains raw data'
'to store the converted content of the document in its base format',
'type' : 'data',
'default' : '',
'read_permission' : 'Manage properties',
'mode' : 'w' },
{ 'id' : 'base_content_type',
'description' : 'A string which represents the mime type of the base data',
'type' : 'string',
'read_permission' : 'Manage properties',
'mode' : 'w' },
{ 'id' : 'content_md5',
'description' : 'A string which represents the md5 of the file',
'type' : 'string',
'read_permission' : 'Manage properties',
'mode' : 'w' },
)
_categories = ('similar', 'predecessor', 'successor', 'contributor', 'classification',
# Follow up is used to create document workspaces for projects or tickets
'follow_up',
# Source is defined in DMS documentation
'source',
# Update frequency in case this document must be crawled regularly
'update_frequency',
# XXX-JPS where are these defined in documentation. Why ?
'destination',
# XXX-JPS all the following properties should be configured on portal type
# and removed from here
'publication_section', 'function', 'group', 'site')
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Rafael Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DocumentConstraint:
"""Constraints for Documents
"""
_constraints = (
{ 'id': 'assignor_existence',
'description': 'Documents should have one group or use one project as \
Follow Up relation',
'expression' : 'python: len(object.getFollowUpList()) > 0 \
or len(object.getGroupList()) > 0 or \
object.getValidationState() == "embedded"',
'type': 'TALESConstraint',
'message_expression_false': 'Follow Up or Group must be defined',
},
)
# -*- coding: utf-8 -*-
#############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.ERP5Type import Permissions
class DocumentPreference:
"""
This property sheet defines the user configurable taxonomy.
"""
_properties = (
{ 'id' : 'preferred_ooodoc_server_address',
'description' : 'Address of a server for converting docs (ip or domain)',
'type' : 'string',
'preference' : 1,
'write_permission': Permissions.ManageProperties,
'mode' : '' },
{ 'id' : 'preferred_ooodoc_server_port_number',
'description' : 'Port number of a server for converting docs',
'type' : 'int',
'preference' : 1,
'write_permission': Permissions.ManageProperties,
'mode' : '' },
{ 'id' : 'preferred_ooodoc_server_timeout',
'description' : 'Timeout when connecting to the document conversion'
' server (in seconds)',
'type' : 'int',
'preference' : 1,
'write_permission': Permissions.ManageProperties,
'mode' : '' },
{ 'id' : 'preferred_document_reference_regular_expression',
'description' : 'A regular expression to find and verify doc references',
'type' : 'string',
'preference' : 1,
'write_permission': Permissions.ManageProperties,
'mode' : '' },
{ 'id' : 'preferred_document_filename_regular_expression',
'storage_id' : 'preferred_document_file_name_regular_expression', # Compatibility
'description' : 'A regular expression to parse file names',
'type' : 'string',
'preference' : 1,
'write_permission': Permissions.ManageProperties,
'mode' : '' },
{ 'id' : 'preferred_document_reference_method_id',
'description' : 'Function for parsing, finding and verifying doc reference',
'type' : 'string',
'preference' : 1,
'write_permission': Permissions.ManageProperties,
'mode' : '' },
{ 'id' : 'preferred_document_ingestion_email_notification',
'description' : 'None - always, "always", "problem (only if problem), "never"', # XXX-JPS this is not a description
'type' : 'selection',
'select_variable' : 'getPreferredDocumentIngestionEmailNotificationSelectionList',
'write_permission': Permissions.ManageProperties,
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_document_email_ingestion_address',
'description' : 'Email ingestion address',
'type' : 'string',
'write_permission': Permissions.ManageProperties,
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_document_classification',
'description' : 'Preffered classification policy for newly created documents',
'type' : 'string',
'write_permission': Permissions.ManageProperties,
'preference' : 1,
'mode' : '' },
# XXX-JPS. This is not a real property - it is somehow a hack.
# BG: I was advised by somebody from Nexedi (I think it was Jerome)
{ 'id' : 'preferred_document_ingestion_email_notification_selection',
'description' : 'List of possible values for preferred_document_ingestion_email_notification',
'type' : 'tokens',
'default' : ['always','problem','never'],
'write_permission': Permissions.ManageProperties,
'mode' : 'w'},
{ 'id' : 'preferred_conversion_cache_factory',
'description' : 'Preferred Conversion Cache',
'type' : 'string',
'write_permission': Permissions.ManageProperties,
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_synchronous_metadata_discovery',
'description' : 'Is preferred synchronous metadata discovery',
'type' : 'boolean',
'write_permission': Permissions.ManageProperties,
'default' : False,
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_redirect_to_document',
'description' : 'Is preferred to redirect user to ingested document',
'type' : 'boolean',
'write_permission': Permissions.ManageProperties,
'default' : False,
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_ingestion_namespace',
'description' : 'Namespace to use for url registry',
'type' : 'string',
'write_permission': Permissions.ManageProperties,
'default' : '',
'preference' : 1,
'mode' : 'w' },
# Kept for compatibility - will be removed some day
{ 'id' : 'preferred_document_file_name_regular_expression',
'description' : 'An alias of preferred_document_filename_regular_expression',
'type' : 'string',
'preference' : 1,
'write_permission': Permissions.ManageProperties,
'mode' : '' },
)
# vim: shiftwidth=2
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Sebastien Robin <seb@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DocumentProxy:
"""
Document Proxy properties
"""
_categories = ( 'document_proxy', )
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Vincent Pelletier <vincent@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DocumentationHelper:
"""
DocumentationHelper attributes definition.
"""
_properties = (
{ 'id' : 'type',
'description' : 'Text representation of the documented item\'s '\
'type.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'content',
'description' : 'Text representation (as in repr()) of the '\
'documented item\'s content',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'security',
'description' : 'Security defined on the documented item.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'argument',
'description' : 'List of arguments. See doc(inspect.getargspec).',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'inheritance',
'description' : 'Inheritance list.',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'source_path',
'description' : 'String representation of the path of the place '\
'where the documented item is defined.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'source_code',
'description' : 'Source code of the documented item.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'static_method',
'description' : 'List of DocHelper objects documenting item\'s '\
'methods.',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'static_property',
'description' : 'List of DocHelper objects documenting item\'s '\
'properties.',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'dynamic_accessor',
'description' : 'List of DocHelper objects documenting item\'s '\
'accessors.',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'dynamic_method',
'description' : 'List of DocHelper objects documenting item\'s '\
'dynamic methods, except accessors.',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'dynamic_property',
'description' : 'List of DocHelper objects documenting item\'s '\
'dynamic properties.',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'dynamic_category',
'description' : 'List of DocHelper objects documenting item\'s '\
'dynamic categories.',
'type' : 'lines',
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Aurelien Calonne <aurel@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Domain:
"""
Domain Property
"""
_properties = (
{'id' : 'domain_generator_method_id',
'description': 'A method wich is called to generate domains',
'type' : 'string',
'mode' : 'w',
'default' : ''},
)
_categories = ( )
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DublinCore:
"""
Properties of DublinCore
"""
_properties = (
{ 'id' : 'title',
'description' : '',
'type' : 'string',
'translatable' : 1,
'translation_domain' : 'erp5_content',
'default' : '',
'acquisition_base_category': (),
'acquisition_portal_type': (),
'acquisition_copy_value': 0,
'acquisition_mask_value': 1,
'acquisition_accessor_id': 'getTitle',
'acquisition_depends': None,
'alt_accessor_id': ('getCompactTitle',),
'mode' : 'w' },
{ 'id' : 'subject',
'description' : '',
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'description',
'description' : '',
'default' : '',
'type' : 'text',
'mode' : 'w' },
{ 'id' : 'contributor',
'storage_id' : 'contributors', # CMF Compatibility
'description' : '',
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'effective_date',
'description' : '',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'expiration_date',
'description' : '',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'format',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'language',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'right',
'storage_id' : 'rights', # CMF Compatibility
'description' : '',
'type' : 'string',
'mode' : 'w' },
# Extended properties specific to ERP5 - not part of DublinCore
{ 'id' : 'short_title',
'description' : '',
'type' : 'string',
'default' : '',
'translatable' : 1,
'translation_domain' : 'erp5_content',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class DynamicCategoryProperty:
"""
Define a Dynamic Category Property for ZODB Property Sheets,
meaningful for Property Sheets which defines an Expression within
_categories (only Item and Movement for now)
"""
_properties = (
{ 'id': 'category_expression',
'type': 'string',
'description' : 'The category list expression' },
)
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class EmailHeader:
"""
Email header properties and categories
"""
_properties = (
{ 'id' : 'sender',
'description' : 'Sender',
'type' : 'string',
'mode' : 'rw' },
{ 'id' : 'recipient',
'description' : 'Recipients',
'type' : 'string',
'mode' : 'rw' },
{ 'id' : 'cc_recipient',
'description' : 'Carbon Copy Recipients',
'type' : 'string',
'mode' : 'rw' },
{ 'id' : 'bcc_recipient',
'description' : 'Blind Carbon Copy Recipients',
'type' : 'string',
'mode' : 'rw' },
)
_categories = ()
#############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Kevin Deldycke <kevin_AT_nexedi_DOT_com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class EntityConstraint:
"""
Geographic Address Constraints.
"""
_constraints = (
{ 'id' : 'region'
, 'description' : 'All Addresses must have a region, in order to permit accounting based on geographical zones.'
, 'type' : 'CategoryAcquiredMembershipArity'
, 'min_arity' : '1'
, 'max_arity' : '1'
, 'portal_type' : ()
, 'base_category': ('region', )
},
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class EquivalenceTester:
"""
Equivalence Tester are used for the equivalence testers.
"""
_properties = (
{ 'id' : 'tested_property',
'description' : 'Property used to test',
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'tested_property_title',
'description' : 'Title of the property used to test',
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'divergence_provider',
'description' : 'Defines whether a equivalence tester acts as a divergence provider.',
'type' : 'boolean',
'default' : 1,
'mode' : 'rw' },
{ 'id' : 'matching_provider',
'description' : 'Defines whether a equivalence tester acts as a matching provider.',
'type' : 'boolean',
'default' : 0,
'mode' : 'rw' },
{ 'id' : 'updating_provider',
'description' : 'Defines whether a equivalence tester acts as a updating provider.',
'type' : 'boolean',
'default' : 1,
'mode' : 'rw' },
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Event:
"""
Event properties and categories
"""
_properties = (
# XXX Copy/Paste from ERP5/PropertySheet/Order.py
{ 'id' : 'received_date',
'description' : 'Received date',
'type' : 'date',
'mode' : 'w' },
# Source properties
{ 'id' : 'organisation_title',
'description' : 'The organisations this persons works for',
'type' : 'string',
'acquisition_base_category' : ('subordination',),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
# Source properties
{ 'id' : 'person_title',
'description' : 'The person this event come from',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
)
# XXX Source, Destination are duplicated...
_categories = ('source', 'destination', 'subordination', 'follow_up')
##############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
# Yusei TAHARA <yusei@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ExpressPreference:
"""
User Preferences for erp5 express
Contains all preferences (see portal_preferences) relative to erp5 express.
"""
_properties = (
{ 'id' : 'preferred_witch_tool_server_url',
'description' : 'The URL of a server which provides Witch Tool',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Manage portal',
'write_permission' : 'Manage portal',
'mode' : 'w' },
{ 'id' : 'preferred_witch_tool_server_root',
'description' : 'The root of a server which provides Witch Tool',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Manage portal',
'write_permission' : 'Manage portal',
'mode' : 'w' },
{ 'id' : 'preferred_express_subscription_status',
'description' : 'ERP5 Express subscription status',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Manage portal',
'write_permission' : 'Manage portal',
'mode' : 'w' },
{ 'id' : 'preferred_express_configuration_status',
'description' : 'ERP5 Express configuration status',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Manage portal',
'write_permission' : 'Manage portal',
'mode' : 'w' },
{ 'id' : 'preferred_express_user_id',
'description' : 'ERP5 Express subscription user id',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Modify portal content',
'write_permission' : 'Modify portal content',
'mode' : 'w' },
{ 'id' : 'preferred_express_password',
'description' : 'ERP5 Express subscription password',
'type' : 'string',
'preference' : 1,
'read_permission' : 'Modify portal content',
'write_permission' : 'Modify portal content',
'mode' : 'w' },
{ 'id' : 'preferred_express_after_setup_script_id',
'description' : 'ERP5 Express after setup script id',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Modify portal content',
'write_permission' : 'Modify portal content',
'mode' : 'w' },
{ 'id' : 'preferred_express_erp5_uid',
'description' : 'ERP5 Express unique ID',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Modify portal content',
'write_permission' : 'Modify portal content',
'mode' : 'w' },
{ 'id' : 'preferred_express_client_uid',
'description' : 'ERP5 Express client unique ID',
'type' : 'string',
'preference' : 1,
#'read_permission' : 'Modify portal content',
'write_permission' : 'Modify portal content',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2006-2007 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ExternalDocument:
"""
Properties of documents which have been downloaded from a URL. Most
properties are used by the crawling API to frequently update content
if necessary.
"""
_properties = (
{ 'id' : 'crawling_cache_duration',
'description' : 'Defines the number of day a document should be kept in'
'public cache after it has disappeared from the Web.',
'default' : 10,
'type' : 'int',
'mode' : 'w'},
{ 'id' : 'crawling_depth',
'description' : 'Defines the maximum number of links which can be followed in the'
'crawling process. If set to 0 (default), no crawling happens.',
'type' : 'int',
'default' : 0,
'mode' : 'w'},
{ 'id' : 'crawling_scope',
'description' : 'Defines whether the crawling process should be local to a single'
'domain or IP host. If so, crawling will not try to access'
'links outside the initial host.',
'type' : 'string',
'mode' : 'w'},
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ExtraLocalRole:
"""
ExtraRole defines base categories to extend standard role definition
"""
_properties = (
)
_categories = (
'extra_assignee',
'extra_assignor',
'extra_associate',
'extra_auditor',
'extra_author',
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class FlowCapacity:
"""
Properties for Path.
"""
_properties = (
# Accounting
# XXX efficiency is already defined on Amount
# Need to be removed
{ 'id' : 'efficiency',
'description' : """The efficiency.""",
'type' : 'float',
'default' : 1.0,
'mode' : 'w' },
{ 'id' : 'min_flow',
'description' : """Minimal quantity to use on a movement.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
{ 'id' : 'max_flow',
'description' : """Maximal quantity to use on a movement.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
{ 'id' : 'min_delay',
'description' : """The minimal delay time of a movement process.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
{ 'id' : 'max_delay',
'description' : """The maximal delay time of a movement process.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
{ 'id' : 'min_stock',
'description' : """The minimal stock quantity of a resource.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
{ 'id' : 'max_stock',
'description' : """The maximal stock quantity of a resource.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
)
_categories = ('quantity_unit',)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Folder:
"""
Properties common to all folders
"""
_properties = (
{ 'id' : 'id_group',
'description' : 'The default ID group for objects in this folder',
'type' : 'string',
'default' : None,
'mode' : 'w'},
{ 'id' : 'last_id',
'description' : 'The default ID group for objects in this folder',
'type' : 'string',
'default' : '0',
'mode' : 'w'},
{ 'id' : 'id_generator',
'description' : 'The name of the function to use to generate the Id of a new contained object. Default behaviour (when this value is not set or the function cannot be found) is to increment last_id and update it.',
'type' : 'string',
'default' : '',
'mode' : 'w'},
)
##############################################################################
#
# Copyright (c) 2002-2005 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Gadget:
"""
Gadget properties and categories.
"""
_properties = (
# UI form ID properties
{ 'id' : 'view_form_id'
, 'description': 'The Id of the callable ERP5 form used to view gadget'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'edit_form_id'
, 'description': 'The Id of the callable ERP5 form used to edit gadget preferences'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'multiple_instances_allowed'
, 'description': 'Is multiple instance of a gadget allowed in one page'
, 'type' : 'boolean'
, 'mode' : 'w'
},
# Gadget classification
{ 'id' : 'render_type'
, 'description': 'A gadget may be rendered in a page synchronous or asynchronous'
, 'type' : 'string'
, 'mode' : 'w'
},
)
_categories = ('gadget_type',)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class GeographicAddress:
"""
Properties for GeographicAddress Objects
"""
_properties = (
{ 'id' : 'street_address',
'description' : 'Street address.',
'type' : 'string',
'mode' : 'w',
'translatable': True,
'translation_domain' : 'content_translation',
},
{ 'id' : 'city',
'description' : 'City name.',
'type' : 'string',
'mode' : 'w',
'translatable': True,
'translation_domain' : 'content_translation',
},
{ 'id' : 'zip_code',
'description' : 'Zip code.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'prefecture',
'description' : 'Prefecture.',
'type' : 'string',
'mode' : 'w',
'translatable': True,
'translation_domain' : 'content_translation',
},
)
_categories = ( 'region', )
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Vincent Pelletier <vincent@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class HtmlStylePreference:
"""
User Preferences for HtmlStyle
"""
_properties = (
{ 'id' : 'preferred_html_style_developper_mode',
'description' : 'When true, useful links for developers are shown in '\
'the interface.',
'type' : 'boolean',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_html_style_translator_mode',
'description' : 'When true, links to translation system will be '\
'displayed.',
'type' : 'boolean',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_html_style_contextual_help',
'description' : 'When true, links to contextual help will be displayed.',
'type' : 'boolean',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_html_style_access_tab',
'description' : 'When true, access tab will be used in front page.',
'type' : 'boolean',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_html_style_acknowledgeable_message',
'description' : 'When true, some messages will be displayed on any page',
'type' : 'boolean',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_html_style_documentation_base_url',
'description' : 'Defines the base URL where portal type action '\
'documentation will be searched for.',
'type' : 'string',
'preference' : 1,
'default' : 'http://www.erp5.com/erp5_help/',
'mode' : 'w' },
{ 'id' : 'preferred_html_style_unsaved_form_warning',
'description' : 'When true, display a javascript confirmation box if '\
'the user tries to navigate away from a form that was '\
'partially changed but is unsaved.',
'type' : 'boolean',
'preference' : 1,
'default' : True,
'mode' : 'w' },
{ 'id' : 'preferred_string_field_width',
'description' : 'The default width of string fields',
'type' : 'int',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_textarea_width',
'description' : 'The default width of text area fields',
'type' : 'int',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_textarea_height',
'description' : 'The default height of text area fields',
'type' : 'int',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_money_quantity_field_width',
'description' : 'The default width of fields displaying amounts of money',
'type' : 'int',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_quantity_field_width',
'description' : 'The default width of quantity fields',
'type' : 'int',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_listbox_view_mode_line_count',
'description' : 'Number of lines in a listbox in view mode',
'type' : 'int',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_listbox_list_mode_line_count',
'description' : 'Number of lines in a listbox in list mode',
'type' : 'int',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_category_child_item_list_method_id',
'description' : 'The method used to list categories in ListFields',
'type' : 'string',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_nano_image_height',
'description' : 'The height for nano image. The unit is the pixel',
'type' : 'int',
'default' : 25,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_nano_image_width',
'description' : 'The width for nano image. The unit is the pixel',
'type' : 'int',
'default' : 25,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_micro_image_height',
'description' : 'The height for micro image. The unit is the pixel',
'type' : 'int',
'default' : 64,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_micro_image_width',
'description' : 'The width for micro image. The unit is the pixel',
'type' : 'int',
'default' : 64,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_thumbnail_image_height',
'description' : 'The height for thumbnail image.The unit is the pixel',
'type' : 'int',
'default' : 128,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_thumbnail_image_width',
'description' : 'The width for thumbnail image.The unit is the pixel',
'type' : 'int',
'default' : 128,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_xsmall_image_height',
'description' : 'The height for thumbnail image.The unit is the pixel',
'type' : 'int',
'default' : 200,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_xsmall_image_width',
'description' : 'The width for xsmall image.The unit is the pixel',
'type' : 'int',
'default' : 200,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_small_image_height',
'description' : 'The height for small image.The unit is the pixel',
'type' : 'int',
'default' : 320,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_small_image_width',
'description' : 'The width for small image.The unit is the pixel',
'type' : 'int',
'default' : 320,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_medium_image_height',
'description' : 'The height for medium image.The unit is the pixel',
'type' : 'int',
'default' : '480',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_medium_image_width',
'description' : 'The width for medium image.The unit is the pixel',
'type' : 'int',
'default' : 480,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_large_image_height',
'description' : 'The height for large image.The unit is the pixel',
'type' : 'int',
'default' : 768,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_large_image_width',
'description' : 'The width for large image.The unit is the pixel',
'type' : 'int',
'default' : 768,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_xlarge_image_height',
'description' : 'The height for xlarge image.The unit is the pixel',
'type' : 'int',
'default' : 1024,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_xlarge_image_width',
'description' : 'The width for xlarge image.The unit is the pixel',
'type' : 'int',
'default' : 1024,
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_image_format',
'description' : 'Preferred image format.',
'type' : 'string',
'preference' : 1,
'default' : 'png',
'mode' : 'w' },
{ 'id' : 'preferred_image_size',
'description' : 'Preferred image size.',
'type' : 'string',
'preference' : 1,
'default' : 'large',
'mode' : 'w' },
{ 'id' : 'preferred_image_quality',
'description' : 'Preferred image quality.',
'type' : 'float',
'preference' : 1,
'default' : 75.0,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Rafael M. Monnerat <rafael@nexedi.com>
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class IndividualCalendarConstraint:
"""Constraints for Presence and Leave Request
"""
_constraints = (
{ 'id': 'destination_existance',
'description': 'Person must be defined',
'message_category_not_set': 'Person must be defined',
'portal_type': ('Person',),
'type': 'CategoryExistence',
'destination' : 1,
},
)
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Copyright (c) 2004 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class IndustrialDescription:
"""
Help for the creation
"""
_properties = (
{ 'id' : 'bill_of_material_description', #XXX
'description' : 'A description text of the components and their consumptions in the product',
'type' : 'text',
'mode' : 'w' },
{ 'id' : 'industrial_process_description', #XXXX
'description' : 'A description text of operations required to build the product',
'type' : 'text',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002-2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
class IntegrationModule:
"""
Integration Module properties
"""
_properties = (
{ 'id' : 'gid_prefix',
'description' : 'prefix added to the gid',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'gid_property',
'description' : 'object properties used to generate the GID',
'type' : 'lines',
'mode' : 'w' },
)
_categories = ('source_section', 'destination_section')
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Yusei TAHARA <yusei@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class InternetProtocolAddress:
"""
Information about IP address
(used by yet to add InternetProtocolAddress which is like a Phone / Address
please review following what mandriva in sysconfig
dhcp must be handled maybe with category
"""
_properties = (
{ 'id' : 'host_name',
'description' : 'Hostname',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'ip_address',
'description' : 'IP Address',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'netmask',
'description' : 'Netmask',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'netmask_bit',
'description' : 'Netmask Bits',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'network_address',
'description' : 'Network Address',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'broadcast_address',
'description' : 'Broadcast Address',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'dns_server_ip_address',
'description' : 'DNS Server IP Address',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'gateway_ip_address',
'description' : 'Gateway IP Address',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'network_interface',
'description' : 'Network Interface',
'type' : 'string',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
# This has to be chanegd and improved by the new category acquisition tool
from Products.CMFCore.Expression import Expression
class Inventory:
"""
Properties for Inventory.
"""
_properties = (
# Inventory
{ 'id' : 'full_inventory',
'description' : """Set to True if inventory contains everything, False if it's only a partial inventory.""",
'type' : 'boolean',
'default' : False,
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class InventoryLine:
"""
Properties of an inventory line
"""
_properties = (
{ 'id' : 'item_id_list',
'description' : 'list of ids of items',
'type' : 'lines',
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
# This has to be chanegd and improved by the new category acquisition tool
from Products.CMFCore.Expression import Expression
class InventoryMovement:
"""
Properties for InventoryMovement.
No default value is set in order to allow
None inventory values in movements
"""
_properties = (
# Inventory
{ 'id' : 'inventory',
'description' : """The quantity of items in stock after inventory.""",
'type' : 'float',
'acquisition_base_category' : ('delivery',),
'acquisition_portal_type' : Expression('python: portal.getPortalAcquisitionMovementTypeList() + portal.getPortalDeliveryTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getInventory',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'inventory_efficiency',
'description' : """The efficiency of the inventory. 1.0 is perfect.""",
'type' : 'float',
'default' : None,
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Item:
"""
Properties of item
Items in ERP5 are intended to provide a way to track objects
"""
_properties = (
{ 'id' : 'serial_number',
'description' : 'serial number',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'location',
'description' : 'documentary location',
'type' : 'string',
'mode' : 'w' },
)
_categories = ('package_type', Expression('python: portal.getPortalVariationBaseCategoryList()'))
# XXX Please check if it is meaningful to add order cat to all items ?
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class ItemAggregation:
"""
Properties of an object wich aggregates items
"""
_properties = (
{ 'id' : 'item_id',
'description' : 'list of ids of items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getId',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'item_title',
'description' : 'list of titles of items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'produced_item_id',
'description' : 'list of ids of produced items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getId',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'produced_item_title',
'description' : 'list of ids of produced items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'consumed_item_id',
'description' : 'list of ids of consumed items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getId',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'consumed_item_title',
'description' : 'list of ids of consumed items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
)
_categories = ('aggregate',)
##############################################################################
#
# Copyright (c) 2005-2009 Nexedi SA and Contributors. All Rights Reserved.
# Yoshinori Okuji <yo@nexedi.co.jp>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class LocalizationPreference:
"""
Localization-related preferences.
"""
_properties = (
{ 'id' : 'preferred_date_order',
'description' : 'The order of year, month and day.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_float_number_style',
'description' : 'The style of float number (with comma, point, '\
'space, ...).',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_money_quantity_style',
'description' : 'The style of money quantities.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_user_interface_language',
'description' : 'A list of languages displayed in the user interface.',
'type' : 'tokens',
'default' : (),
'preference' : 1,
'mode' : 'w'},
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Login:
"""
Properties for Login (user ID, password, and some day
more properties such as X509 certificates).
Login information used to be defined on the Person
propertysheet. However, such Login information is
more general and needs to be defined on different objects
such as External Sources (ex. IMAP Reader).
TODO:
- add acquisition from reference property for used_id
to prepare transition
"""
_properties = (
{ 'id' : 'password'
, 'description' : 'The password required to login'
, 'type' : 'string'
, 'write_permission' : 'Set own password'
, 'read_permission' : 'Manage users'
, 'mode' : 'w'
},
{ 'id' : 'user_id'
, 'description' : 'The user ID required to login'
, 'type' : 'string' # XXX Possibly add acquisition from reference property
, 'mode' : 'rw'
},
)
##############################################################################
#
# Copyright (c) 2002, 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class MailMessage:
"""
LEGACY
This property sheet is here for convenience and compatibility
of legacy implementations of ERP5 CRM. It should never be
used in new environments.
"""
_properties = (
{ 'id' : 'to',
'description' : 'Destination email address, extracted from header.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'reply_to',
'description' : 'Reply to email address, extracted from header.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'sender',
'description' : 'Sender email address, extracted from header.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'body',
'description' : 'Mail body.',
'type' : 'text',
'mode' : 'w' },
{ 'id' : 'header',
'description' : 'Mail header as received.',
'type' : 'text',
'mode' : 'w' },
{ 'id' : 'other_info',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'original',
'description' : 'Save raw mail received from MTA',
'type' : 'string',
'mode' : 'w' },
# Kept for compatibility
{ 'id' : 'date',
'description' : 'Mail send date, extracted from header.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'subject',
'description' : 'Mail subject, extracted from header.',
'type' : 'string',
'default' : '',
'mode' : 'w' },
{ 'id' : 'organisation_title',
'description' : 'The organisations this persons works for',
'type' : 'string',
'acquisition_base_category' : ('subordination',),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'person_title',
'description' : 'The person this mail come from',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
class MappedProperty:
"""
Property sheet for Mapped Property class and subclass instances
"""
_properties = (
{'id' : 'mapping_property',
'description' : 'List of mapping of properties or categories',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class MappedValue:
"""
A MappedValue holds some properties values just as standard
properties. The propertysheet is used to defined which properties
can be defined.
"""
_properties = (
{ 'id' : 'mapped_value_property',
'storage_id' : 'mapped_value_property_list', # Compatibility
'description' : 'A list of property values provided by the MappedValue document',
'type' : 'tokens',
'default' : [],
'mode' : 'w' },
{ 'id' : 'mapped_value_base_category',
'storage_id' : 'mapped_value_base_category_list', # Compatibility
'description' : 'A list of base categories provided by the MappedValue document',
'type' : 'tokens',
'default' : [],
'mode' : 'w' },
# All other property accessors are implemented by the class
)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Alexandre Boeglin <alex@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Mapping:
"""
This PropertySheet allows the mapping from one object to a category,
like :
organisation_module.nexedi.setMapping('group/nexedi')
portal_categories.group.nexedi.getMappingRelatedValueList()
this can be used to tell which document is represented by one
category.
"""
_properties = ()
_categories = ('mapping',)
##############################################################################
#
# Copyright (c) 2008 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Measure:
_properties = (
{ 'id' : 'quantity',
'description' : "Value of the measure, expressed in the selected quantity unit.",
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'measure_variation_base_category',
'description' : "Base category range of matrix.",
'type' : 'tokens',
'mode' : 'w' },
{ 'id' : 'default_metric_type',
'description' : "Use this measure by default to perform unit conversion\n"
"(useful in cases where only a quantity unit is specified).",
'type' : 'boolean',
'mode' : 'w' },
)
_categories = ( 'metric_type', 'quantity_unit' )
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Nicolas Delaby <nicolas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class MemcachedPlugin:
"""
"""
_properties = (
{'id' : 'server_max_key_length',
'description' : 'Max key len authorised by Server. 0 means no limit',
'type' : 'int',
'default' : 250,
'mode' : 'w' ,
},
{'id' : 'server_max_value_length',
'description' : 'Max value len authorised by Server. 0 means no limit',
'type' : 'int',
'default' : 1048576,
'mode' : 'w' ,
},
{'id' : 'expiration_time',
'description' : 'Time to live of stored value (in second)',
'type' : 'int',
'default' : 0,
'mode' : 'w' ,
},
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Movement:
"""
Properties which allow to define a generic Movement.
Movement always relate to an order which defines
contractual information.
"""
_properties = (
# Accounting
#{ 'id' : 'accountable',
# 'description' : 'If set to 1, self must be accounted',
# 'type' : 'boolean',
# 'default' : 0,
# 'mode' : 'w' },
# Order reference
{ 'id' : 'order_relative_url',
'description' : 'The relative_url of the order which defines contractual conditions',
'type' : 'string',
'acquisition_base_category' : ('order',),
'acquisition_portal_type' : Expression('python: portal.getPortalOrderTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'grouping_reference',
'description' : 'A reference which allows to unify multiple objects',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'frozen',
'description' : 'A frozen movement cannot be modified by the'
' simulation anylonger',
'type' : 'int',
'acquisition_base_category' : ('delivery', 'parent'),
'acquisition_portal_type' : Expression('''python:
portal.getPortalMovementTypeList() +
portal.getPortalOrderTypeList() +
portal.getPortalDeliveryTypeList()
'''),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getFrozen',
'acquisition_depends' : None,
'mode' : 'w' },
)
_categories = ('order', 'specialise', 'aggregate',
Expression('python: portal.getPortalVariationBaseCategoryList()'),
)
# XXX Please check if it is meaningful to add order cat to all movemements ?
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class MovementGroup:
_properties = (
{ 'id' : 'tested_property',
'description' : 'Property used to Test',
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'update_always',
'description' : 'Update existing document always if enabled',
'type' : 'boolean',
'mode' : 'w' },
)
_categories = ('collect_order_group', 'divergence_scope',)
##############################################################################
#
# Copyright (c) 2009 Nexedi KK, Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class OpenOrder:
"""
OpenOrder provides a way to order same items repeatedly. This property sheet
provides properties which are brought by the nature of repetition.
"""
_properties = (
{ 'id' : 'forecasting_term_day_count',
'description' : 'A number of days to be forecasted.',
'type' : 'int',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
# Copyright (c) 2004-2008 Nexedi SA and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
# Jean-Paul Smets <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Order:
"""
Order properties and categories
"""
_properties = (
{ 'id' : 'trade_condition_title',
'description' : 'Trade condition title',
'type' : 'string',
'acquisition_base_category' : ('specialise',),
'acquisition_portal_type' : ('Sale Trade Condition','Purchase Trade Condition'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
# For compatibility only - please refrain using these properties
# because they are not supported anylonger. Clean approach should
# use CRM events for the same purpose, ie. to track the date
# of reception or of issuing of an order.
{ 'id' : 'received_date',
'description' : 'Received date (No longer supported)',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'emit_date',
'description' : 'Emit date (No longer supported)',
'type' : 'date',
'mode' : 'w' },
)
_categories = (
'origin',
'order',
'specialise',
'resource',
'segmentation'
)
_constraints = (
{ 'id' : 'applied_rule',
'description' : 'There must be at most one Applied Rule using this order',
'type' : 'CategoryRelatedMembershipArity',
'min_arity' : '0',
'max_arity' : '1',
'portal_type' : ('Applied Rule', ),
'base_category' : ('causality',)
},
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Organisation:
"""
Organisation properties and categories
"""
_properties = (
{ 'id' : 'corporate_name',
'description' : 'The official name of this organisation',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'social_capital',
'description' : 'The social capital of this organisation',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'social_capital_currency_id',
'description' : "The currency in which the social capital is expressed",
'type' : 'string',
'portal_type' : ('Currency',),
'acquisition_base_category' : ('price_currency',),
'acquisition_portal_type' : ('Currency',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getId',
'mode' : 'w' },
{ 'id' : 'social_capital_currency_title',
'description' : "The currency in which the social capital is expressed",
'type' : 'string',
'portal_type' : ('Currency',),
'acquisition_base_category' : ('price_currency',),
'acquisition_portal_type' : ('Currency',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'mode' : 'w' },
{ 'id' : 'activity_code',
'description' : 'The activity code of this organisation',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'geographic_incorporate_code',
'description' : 'The geographic incorporate code of this organisation, sometimes derivated from corporate code',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'vat_code',
'description' : 'The VAT (Value Added Tax) code of this organisation',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'corporate_registration_code',
'description' : 'The corporate registration code of this organisation',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'social_code',
'description' : 'The social code of this organisation',
'type' : 'string',
'mode' : 'w' },
# Acquisition
{ 'id' : 'address',
'storage_id' : 'default_address',
'description' : 'The default address of this organisations',
'type' : 'content',
'portal_type' : ('Address',),
'acquired_property_id' : ( 'text', 'street_address', 'city',
'zip_code', 'region', 'region_title',
'prefecture'),
'acquisition_base_category' : ('region', ),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultAddressValue',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'telephone',
'storage_id' : 'default_telephone',
'description' : 'The default phone for this organisation',
'type' : 'content',
'portal_type' : ('Telephone',),
'acquired_property_id' : ( 'text', 'telephone_number' ),
'acquisition_base_category' : ('region', ),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultTelephoneValue',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'mobile_telephone',
'storage_id' : 'mobile_telephone',
'description' : 'A default mobile phone for this organisation',
'type' : 'content',
'portal_type' : ('Telephone',),
'acquired_property_id' : ( 'text', 'telephone_number' ),
'acquisition_base_category' : ('region', ),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultMobileTelephoneValue',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'fax',
'storage_id' : 'default_fax',
'description' : 'The defaut fax phone number for this organisation',
'type' : 'content',
'portal_type' : ('Fax',),
'acquired_property_id' : ( 'text', 'telephone_number' ),
'acquisition_base_category' : ('region', ),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultFaxValue',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'email',
'storage_id' : 'default_email',
'description' : 'The default email address for this organisation',
'type' : 'content',
'portal_type' : ('Email',),
'acquired_property_id' : ( 'text', ),
'acquisition_base_category' : ('region', ),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultEmailValue',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'alternate_email',
'storage_id' : 'alternate_email',
'description' : 'An alternate email address for this organisation',
'type' : 'content',
'portal_type' : ('Email',),
'acquired_property_id' : ( 'text', ),
'acquisition_base_category' : ('region', ),
'acquisition_portal_type' : ('Category',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultAlternateEmailValue',
'acquisition_depends' : None,
'mode' : 'w' },
# Amortisation
{ 'id' : 'financial_year_stop_date',
'description' : 'The date which ends the organisation financial year',
'type' : 'date',
'mode' : 'w' },
)
_categories = ( 'role', 'group', 'activity', 'skill', 'market_segment', 'region',
'social_form', 'function', 'price_currency', 'economical_class', 'site', )
##############################################################################
#
# Copyright (c) 2004 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class OutcomeDescription:
"""
Provides addition description property for outcomes
"""
_properties = (
{ 'id' : 'outcome_description',
'description' : 'A description text of the outcome of a task, project, test, etc.',
'type' : 'text',
'mode' : 'w' },
)
##############################################################################
# Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved.
# Mayoro DIAGNE <mayoro@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PDFType:
"""
EXPERIMENTAL - DO NOT USE THIS PROPERTYSHEET BESIDES R&D
PDFType properties for all Type definitions
"""
_properties = (
{ 'id' : 'pdf_form'
, 'storage_id' : 'default_pdf_form'
, 'description' : 'A Scribus Form rendered as PDF'
, 'type' : 'content'
, 'portal_type' : ( 'PDF', )
, 'acquired_property_id' : ('file', 'path', 'absolute_url',
'width', 'height')
, 'acquisition_base_category' : ()
, 'acquisition_portal_type' : ()
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultPdfFormValue'
, 'acquisition_depends' : None
, 'mode' : 'w' },
{ 'id' : 'scribus_form'
, 'storage_id' : 'default_scribus_form'
, 'description' : 'A Scribus Form in native format'
, 'type' : 'content'
, 'portal_type' : ( 'File', )
, 'acquired_property_id' : ( 'file', )
, 'acquisition_base_category' : ()
, 'acquisition_portal_type' : ()
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultScribusFormValue'
, 'acquisition_depends' : None
, 'mode' : 'w' },
{ 'id' : 'resolution'
, 'description' : 'Resolution of converted background from pdf file'
, 'type' : 'int'
, 'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2009 Nexedi KK, Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PackingList:
"""A property sheet class for packing list.
Packing list can be considered as a kind of small order which does not
need proper agreement between seller and buyer, this class inherit Order
property sheet class.
"""
# Just inherit Order. No additional properties are needed for now.
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Path:
"""
Properties for Path.
"""
_properties = (
{ 'id' : 'resource_relative_url',
'description' : "The resource relative url involved",
'type' : 'string',
'acquisition_base_category' : ('resource',),
'acquisition_portal_type' : Expression('python: portal.getPortalResourceTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
# Accounting
)
_categories = ('resource',)
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Fabien Morin <fabien@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PaySheetModel:
"""
Properties for PaySheetModel objects
"""
_properties = (
{ 'id' : 'variation_settings_category',
'storage_id' : 'variation_settings_category_list',
'description' : 'A list of categories which define possible language or \
context settings variation',
'type' : 'lines',
'default' : [],
'mode' : 'w'
},
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PaymentCondition:
"""
Payment Conditions are used to define all the parameters of a payment
"""
_properties = (
{ 'id' : 'calculation_script_id',
'description' : 'If a script is defined on trade model Line, this '
'script will be used for calculation',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'payment_term', # XXX-JPS rename to business_term or trade_term
'description' : 'payment term in a number of days',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'payment_date', # XXX-JPS rename to business_date or trade_due_date
'description' : 'An absolute payment date',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'payment_end_of_month', # XXX-JPS rename to business_end_of_month or trade_end_of_month
'description' : 'is the payment required on the end of month',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'payment_additional_term', # XXX-JPS rename to business_additional_term or trade_additional_term
'description' : 'additionnal term in a number of days',
'type' : 'int',
'mode' : 'w' },
)
_categories = ( 'trade_date', 'payment_mode',
'source_payment', 'destination_payment', )
##############################################################################
#
# Copyright (c) 2004 Nexedi SARL and Contributors. All Rights Reserved.
# Sebastien Robin <seb@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Periodicity:
"""
A Periodicity allows to define an event which happens periodically.
Here an explanation of which kind of period we can define:
- Every 2 days:
- set periodicity_day_frequency to 2
- Every Monday and Wednesday
- set periodicity_week_frequency to 1
- set periodicity_week_day to ['monday','wednesday']
- Every 10th of every 3 months
- set periodicity_month_frequency to 3
- set periodicity_month_day to 10
- Every 2nd Thursday of every 4 months
- set periodicity_month_frequency to 4
- set periodicity_month_week to 2
- set periodicity_month_week_day to 'thursday'
"""
_properties = (
{ 'id' : 'alarm_date',
'description' : 'When will be the next time when we will start the alarm',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'enabled',
'description' : 'Allow to disable this periodic event',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'periodicity_start_date',
'description' : 'When this periodic event will start',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'periodicity_stop_date',
'description' : 'When this periodic event will stop',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'periodicity_minute',
'description' : 'Recur every periodicity minute (ex, at 10 and at 16 )',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'periodicity_minute_frequency',
'description' : 'Recur every periodicity minute (ex every 2 minute)',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_hour',
'description' : 'Recur every periodicity hours (ex, at 10 and at 16 )',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'periodicity_hour_frequency',
'description' : 'Recur every periodicity hours (ex every 2 hours)',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_day_frequency',
'description' : 'Recur every periodicity days (ex every 2 days)',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_week_frequency',
'description' : 'Recur every periodicity weeks (ex every 3 weeks)',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_week',
'description' : 'Recur every periodicity week (ex, week 41 and 43)',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'periodicity_week_day',
'description' : 'Recur on some days of the week (ex monday and sunday)',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'periodicity_month_frequency',
'description' : 'Recur every periodicity month (ex every 4 months)',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_month_day',
'description' : 'Recur on some days of the month (ex 5th, and 14th)',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'periodicity_month',
'description' : 'Recur on some months of the year (ex 5th, and 10th)',
'type' : 'lines',
'mode' : 'w' },
{ 'id' : 'periodicity_year_frequency',
'description' : 'Recur every periodicity years (ex every 2 year)',
'type' : 'int',
'mode' : 'w' }
)
##############################################################################
#
# Copyright (c) 2009 Nexedi KK, Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PeriodicityTerm:
"""
A property sheet extends Periodicity to add term.
"""
_properties = (
{ 'id' : 'periodicity_term_scope_type',
'description' : 'A scope type pattern which is often used in the real world. ex. from today to the end of month, the end of year.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'periodicity_term_time_scale',
'description' : 'A time scale of term. ex. day, month, year.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'periodicity_term_length_number',
'description' : 'A length number of term without time scale.',
'type' : 'int',
'mode' : 'w' },
)
#############################################################################
#
# Copyright (c) 2002-2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Kevin Deldycke <kevin_AT_nexedi_DOT_com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Person:
"""
Person properties and categories
"""
_properties = (
# Personnal properties
{ 'id' : 'first_name'
, 'description': 'First name.'
, 'type' : 'string'
, 'mode' : 'w'
, 'translatable' : True
, 'translation_domain' : 'content_translation'
},
{ 'id' : 'last_name'
, 'description': 'Last name.'
, 'type' : 'string'
, 'mode' : 'w'
, 'translatable' : True
, 'translation_domain' : 'content_translation'
},
{ 'id' : 'middle_name'
, 'description': 'Middle name.'
, 'type' : 'string'
, 'mode' : 'w'
, 'translatable' : True
, 'translation_domain' : 'content_translation'
},
{ 'id' : 'birth_name'
, 'description': 'Also called maiden name.'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'prefix'
, 'description': 'Name prefix.'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'suffix'
, 'description': 'Name suffix.'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'birthday'
, 'description': 'Date of birth.'
, 'storage_id' : 'start_date'
, 'type' : 'date'
, 'mode' : 'w'
},
{ 'id' : 'birthplace_address'
, 'description' : 'The current address where the person is'\
' born'
, 'type' : 'content'
, 'portal_type' : ( 'Address', )
, 'acquired_property_id' : ( 'text', 'street_address', 'city',
'prefecture',
'zip_code', 'region', 'region_title')
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultBirthplaceAddressValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'social_code'
, 'description': 'The social code of this person.'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'partner_count'
, 'description': 'Number of familial partners.'
, 'type' : 'int'
, 'mode' : 'w'
},
{ 'id' : 'child_count'
, 'description': 'Number of children.'
, 'type' : 'int'
, 'mode' : 'w'
},
{ 'id' : 'head_of_family'
, 'description': 'Has authority to exercise family control.'
, 'type' : 'boolean'
, 'mode' : 'w'
},
# Contact fields
{ 'id' : 'address'
, 'storage_id' : 'default_address'
, 'description' : 'The current address of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Address', )
, 'acquired_property_id' : ( 'text', 'street_address', 'city',
'prefecture',
'zip_code', 'region', 'region_title',
'prefecture')
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultAddressValue'
, 'acquisition_depends' : None
, 'alt_accessor_id' : ( 'getCareerDefaultAddressValue', )
, 'mode' : 'w'
, 'translation_acquired_property_id':('street_address', 'city',
'prefecture', )
},
{ 'id' : 'telephone'
, 'storage_id' : 'default_telephone'
, 'description' : 'The current telephone of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Telephone', )
, 'acquired_property_id' : ( 'text', 'telephone_number' )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultTelephoneValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'mobile_telephone'
, 'storage_id' : 'mobile_telephone'
, 'description' : 'The current mobile telephone of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Telephone', )
, 'acquired_property_id' : ( 'text', 'telephone_number' )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultMobileTelephoneValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'fax'
, 'storage_id' : 'default_fax'
, 'description' : 'The current fax of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Fax', )
, 'acquired_property_id' : ( 'text', 'telephone_number' )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultFaxValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'email'
, 'storage_id' : 'default_email'
, 'description' : 'The current email of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Email', )
, 'acquired_property_id' : ( 'text', )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultEmailValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'alternate_email'
, 'storage_id' : 'alternate_email'
, 'description' : 'An alternate email of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Email', )
, 'acquired_property_id' : ( 'text', )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultAlternateEmailValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'career'
, 'storage_id' : 'default_career'
, 'description' : 'The default career hold some properties of a Person.'
, 'type' : 'content'
, 'portal_type' : ( 'Career', )
, 'acquired_property_id': ( 'start_date', 'stop_date', 'title',
'description', 'reference'
, 'subordination', 'subordination_title', 'subordination_value'
, 'subordination_uid_list', 'subordination_uid'
, 'collective_agreement_title', 'salary_coefficient'
, 'skill', 'skill_list', 'skill_id_list'
, 'skill_title_list', 'skill_value_list'
, 'skill_title', 'skill_value', 'skill_id'
, 'salary_level', 'salary_level_id', 'salary_level_title', 'salary_level_value'
, 'grade', 'grade_id', 'grade_title', 'grade_value'
, 'activity', 'activity_id', 'activity_title', 'activity_value'
, 'role', 'role_id', 'role_title', 'role_value'
, 'role_id_list', 'role_title_list', 'role_value_list'
, 'function', 'function_id', 'function_title', 'function_value'
, 'function_list', 'function_id_list', 'function_title_list', 'function_value_list'
, 'product_line', 'product_line_list', 'product_line_id_list'
, 'product_line_title_list', 'product_line_value_list'
)
, 'mode' : 'w'
},
)
_categories = ( # set on the Person directly
'gender', 'nationality', 'marital_status',
# acquired from address
'region',
# acquired from career
'group', 'subordination', 'role', 'function', 'activity',
'salary_level', 'grade', 'skill', 'product_line',
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PortalTest:
"""
Properties for PortalTest Objects
"""
_properties = (
{ 'id' : 'consistency_check_method_id',
'description' : 'Method to invoke as a consistency test',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'consistency_report_template_id',
'description' : 'Template id to invoke for rendering consistency test',
'type' : 'lines',
'mode' : 'w'
},
{ 'id' : 'consistency_fix_method_id',
'description' : 'Method to invoke as a consistency test',
'type' : 'lines',
'mode' : 'w'
}
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PortalTypeRolesSpreadsheetConfiguratorItem:
""" Properties of a PortalTypeRolesSpreadsheetConfiguratorItem."""
_properties = (
{ 'id' : 'portal_type_roles_spreadsheet',
'storage_id' : 'default_portal_type_roles_spreadsheet',
'description' : 'The spreadsheet for portal type roles configuration',
'type' : 'content',
'portal_type' : ('Spreadsheet',),
'acquired_property_id' : ('file', 'content_type', 'data'),
'acquisition_base_category' : (),
'acquisition_portal_type' : (),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultPortalTypeRolesSpreadsheetValue',
'acquisition_depends' : None,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Predicate:
"""
Predicate properties and categories
Predicate in ERP5 use a simplified form based on identity, range and
set and range operations
Other predicates must be implemented through scripts. Parameters
can be provides to scripts (this reduces duplication of code)
"""
_properties = (
{ 'id' : 'criterion_property',
'description' : 'The properties to test identity or range on',
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'membership_criterion_base_category', # OR, we check if we have one
# of theses categories
'description' : 'The base categories to test',
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'multimembership_criterion_base_category', # AND, we check we have all
# theses categories
'description' : 'The base categories which allow multiple values and required AND test',
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'membership_criterion_category',
'description' : 'The predicate categories',
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'test_tales_expression',
'description' : 'A Tales expression to implement a simple ' \
'condition in Python. Runtime context of this ' \
'expression will be the tested document',
'type' : 'string',
'default' : 'python: True',
'mode' : 'w' },
{ 'id' : 'test_method_id',
'description' : 'A python method to implement additional tests',
'type' : 'lines', # Only a list of method ids is feasable for lines
'mode' : 'w' },
#{ 'id' : 'parameter_string', # XXX Not feasable for AND
# 'description' : 'A string defining default values for parameters (python syntax)',
# 'type' : 'string',
# 'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2005-2009 Nexedi SA and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Preference:
"""
User Preference PropertySheet
XXX: why is this here and not in ERP5Form ?
"""
_properties = (
{ 'id' : 'priority',
'description' : 'Priority of the preference.',
'type' : 'int',
'default' : 3, # ( Priority.USER )
'mode' : 'w',
'write_permission': 'View management screens', },
{ 'id' : 'preferred_section_category',
'description' : 'The section category for documents; '\
'usually something like group/nexedi.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_section',
'description' : 'The section Organisation for documents.',
'type' : 'string',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_text_editor',
'description' : 'Preferred Text Editor',
'type' : 'selection',
'select_variable' : 'getPreferredTextEditorSelectionList',
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_text_format',
'description' : 'Preferred Text Format',
'type' : 'selection',
'select_variable' : 'getPreferredTextFormatSelectionList',
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_text_editor_selection',
'description' : 'List of possible values for preferred_document_text_editor',
'type' : 'tokens',
'default' : ['text_area','fck_editor',],
'mode' : 'w'},
{ 'id' : 'preferred_text_format_selection',
'description' : 'List of possible values for preferred_document_text_format',
'type' : 'tokens',
'default' : ['plain','html',],
'mode' : 'w'},
{ 'id' : 'preferred_time_zone',
'description' : 'Preferred timezone',
'type' : 'string',
'default' : '',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_max_user_inactivity_duration',
'description' : 'Maximum user\'s inactivity duration in seconds before user is automatically logged out',
'type' : 'float',
'default' : '',
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_criterion_property',
'description' : 'List of criterion properties used for predicate',
'type' : 'tokens',
'default' : ['quantity', 'price', 'portal_type',
'title', 'reference', 'language',],
'preference' : 1,
'mode' : 'w'},
{ 'id' : 'preferred_hide_rows_on_no_search_criterion',
'description' : 'If enabled will not show any records if search criteria for a listbox is missing',
'type' : 'boolean',
'default' : False,
'preference' : 1,
'write_permission': 'Manage properties',
'mode' : 'w'},
{ 'id' : 'preferred_unit_test_sql_connection_string',
'description' : 'Preferred Unit Test SQL Connection String',
'type' : 'string',
'write_permission': 'Manage properties',
'preference' : 1,
'mode' : '' },
{ 'id' : 'preferred_predicate_category',
'description' : 'List of base categories used for predicate',
'type' : 'tokens',
'default' : [],
'preference' : 1,
'mode' : 'w'},
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Price:
"""
Properties which allow to define a generic Price.
"""
_properties = (
# Pricing properties
{ 'id' : 'price',
'description' : 'A typical per unit price',
'type' : 'float',
'acquisition_base_category' : ('order', 'delivery',),
'acquisition_portal_type' : \
Expression('python: ' \
'portal.getPortalAcquisitionMovementTypeList() +' \
'portal.getPortalDeliveryTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getPrice',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'base_unit_price',
'description' : 'The smallest unit price used to determine the precision of a price',
'type' : 'float',
'acquisition_base_category' : ('parent', 'order', 'delivery'),
'acquisition_portal_type' : \
Expression('python: ' \
'portal.getPortalAcquisitionMovementTypeList() +' \
'portal.getPortalDeliveryTypeList() +' \
'portal.getPortalSupplyPathTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getBaseUnitPrice',
'acquisition_depends' : None,
'mode' : 'w' },
# priced_quantity should be acquired from cells to lines
{ 'id' : 'priced_quantity',
'description' : 'Number of units involved in base prices',
'type' : 'float',
'default' : 1.0,
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('portal/getPortalSupplyPathTypeList'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getPricedQuantity',
'mode' : 'w' },
# Asset Value Pricing
{ 'id' : 'source_total_asset_price',
'description' : 'Total asset price from the source point of view',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'destination_total_asset_price',
'description' : 'Total asset price from the destination point of view',
'type' : 'float',
'mode' : 'w' },
# Pricing properties related to sourcing
# Such price should be used very carefully since
# They are incompatible with the multi company model
# WARNING: dangerous naming (like we had with source_reference)
{ 'id' : 'source_base_price',
'description' : 'A typical per unit price at which this ' \
'resource can be sourced (bought)',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'source_base_price_validity',
'description' : 'Validity of the typical per unit price at ' \
'which this resource can be sourced',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'destination_base_price',
'description' : 'A typical per unit price at which this ' \
'resource can be supplied (sold)',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'destination_base_price_validity',
'description' : 'Validity of the typical per unit price at ' \
'which this resource can be supplied',
'type' : 'date',
'mode' : 'w' },
)
_categories = ( 'price_currency', )
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Pricing:
"""
Element tarif
"""
_properties = (
{ 'id' : 'comments',
'description' : 'Comments',
'type' : 'text',
'mode' : 'w' },
)
_categories = ( 'quantity_range',)
#############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Daniel Feliubadalo <daniel@sip2000.com>
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ProductDataPreference:
"""
This property sheet defines the user configurable taxonomy.
"""
_properties = (
{ 'id' : 'preferred_product_variation_base_category',
'description' : 'Defines base categories axes in products variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_product_optional_variation_base_category',
'description' : 'Defines optional base categories axes in products variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_product_individual_variation_base_category',
'description' : 'Defines individual base categories axes in products variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_component_variation_base_category',
'description' : 'Defines base categories axes in components variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_component_optional_variation_base_category',
'description' : 'Defines optional base categories axes in components variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_component_individual_variation_base_category',
'description' : 'Defines individual base categories axes in components variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_service_variation_base_category',
'description' : 'Defines base categories axes in services variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_service_optional_variation_base_category',
'description' : 'Defines optional base categories axes in services variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_service_individual_variation_base_category',
'description' : 'Defines individual base categories axes in services variations',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Lukasz Nowak <lukasz.nowak@ventis.com.pl>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ProductionOrder:
"""
Constraints that can be enforced on Production Orders
"""
_properties = (
)
_categories = (
)
_constraints = (
{ 'id' : 'destination_category_existence',
'description' : 'Destination must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Person', 'Organisation'),
'destination': 1,
'message_category_not_set': 'Recipient or Beneficiary must be defined',
},
{ 'id' : 'specialise_category_existence',
'description' : 'Specialise must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Supply Chain',),
'specialise': 1,
'message_category_not_set': 'Supply Chain must be defined',
},
{ 'id' : 'total_quantity',
'description' : 'Total Quantity must not be 0',
'type' : 'TALESConstraint',
'expression' : 'python: object.getTotalQuantity() > 0',
'message_expression_false': 'Total Quantity must not be 0',
},
{ 'id' : 'start_date',
'description' : 'Start Date must be defined',
'type' : 'PropertyExistence',
'start_date' : None,
'message_no_such_property' : "Shipping Date must be defined",
},
{ 'id' : 'date_coherency',
'description' : 'Stop Date must be after Start Date',
'type' : 'TALESConstraint',
'expression' : 'python: object.getStopDate() >= object.getStartDate()',
'message_expression_false': 'Delivery Date must be after Shipping Date',
},
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Lukasz Nowak <lukasz.nowak@ventis.com.pl>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ProductionOrderLine:
"""
Constraints that can be enforced on Production Order Lines
"""
_properties = (
)
_categories = (
)
_constraints = (
{ 'id' : 'resource_category_existence',
'description' : 'Resource must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Component', 'Product'),
'resource': 1,
'message_category_not_set': 'Product must be defined',
},
{ 'id' : 'specialise_category_existence',
'description' : 'Specialise must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Transformation',),
'specialise': 1,
'message_category_not_set': 'Transformation must be defined',
},
{ 'id' : 'total_quantity',
'description' : 'Total Quantity must not be 0',
'type' : 'TALESConstraint',
'expression' : 'python: object.getTotalQuantity() > 0',
'message_expression_false': 'Total Quantity must not be 0',
},
{ 'id' : 'date_coherency',
'description' : 'Stop Date must be after Start Date',
'type' : 'TALESConstraint',
'expression' : 'python: object.getStopDate() >= object.getStartDate()',
'message_expression_false': 'Delivery Date must be after Shipping Date',
},
{ 'id' : 'transformation_for_resource',
'description' : 'Transformation must match chosen resource',
'type' : 'TALESConstraint',
'expression' : 'python: object.getResourceValue() is not None and object.getSpecialise() in \
object.getResourceValue().getResourceRelatedList(portal_type=object.getPortalTransformationTypeList())',
'message_expression_false': 'Transformation must match chosen resource',
},
)
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PropertyAssignmentMovementGroup:
_properties = (
{ 'id' : 'grouping_method',
'description' : 'Method use to group',
'type' : 'string',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PropertyExistenceConstraint:
"""
Define a Property Existence Constraint for ZODB Property Sheets
"""
_properties = (
{ 'id': 'constraint_property',
'type': 'lines',
'description' : 'Properties to check the existence for',
'default': () },
{ 'id': 'message_no_such_property',
'type': 'string',
'description' : 'Error message when there is no such property',
'default': 'Property existence error for property ${property_id}, '\
'this document has no such property or the property '\
'has never been set' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class PropertyTypeValidityConstraint:
"""
Define an Attribute Equality Constraint for ZODB Property Sheets
"""
_properties = (
{'id': 'message_unknown_type',
'type': 'string',
'description' : "Error message when the attribute's type is unknown",
'default': "Attribute ${attribute_name} is defined with an unknown "\
"type ${type_name}" },
{'id': 'message_incorrect_type',
'type': 'string',
'description' : "Error message when the type of attribute's value is "\
"incorrect",
'default': "Attribute ${attribute_name} should be of type "\
"${expected_type} but is of type ${actual_type}" },
{'id': 'message_incorrect_type_fix_failed',
'type': 'string',
'description' : "Error message when the type of attribute's value is "\
"incorrect and it could not be fixed",
'default': "Attribute ${attribute_name} should be of type "\
"${expected_type} but is of type ${actual_type} (Type cast "\
"failed with error ${type_cast_error})" },
{'id': 'message_incorrect_type_fixed',
'type': 'string',
'description' : "Error message when the type of attribute's value is "\
"incorrect but could be fixed",
'default': "Attribute ${attribute_name} should be of type "\
"${expected_type} but is of type ${actual_type} (Fixed)" },
)
##############################################################################
#
# Copyright (c) 2002-2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
class PythonScript:
"""
PythonScript properties for all ERP5 objects
"""
_properties = (
{ 'id' : 'body',
'description' : 'A local property description',
'type' : 'string',
'storage_id' : '_body',
'mode' : '' },
{ 'id' : 'parameter_signature',
'description' : 'A local property description',
'type' : 'string',
'storage_id' : '_params',
'mode' : '' },
{ 'id' : 'proxy_role',
'description' : 'A local property description',
'type' : 'tokens',
'storage_id' : '_proxy_roles',
'mode' : '' },
)
_categories = ('callable_type',)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Nicolas Dumazet <nicolas.dumazet@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class QuantityUnitConversionDefinition:
"""
Properies for Quantity Unit Conversion Definitions
"""
_properties = (
{ 'id' : 'inverse',
'description' : 'Defines if this quantity should be interpreted as an inversed number',
'type' : 'boolean',
'default': False,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Reference:
"""
Properties which define the references of a document
"""
_properties = (
# Sourcing / planning properties
{ 'id' : 'reference',
'storage_id' : 'default_reference', # Compatibility
'description' : 'The absolute references of the document (our reference)',
'type' : 'string',
'range' : True,
'mode' : 'w' },
{ 'id' : 'ean13_code',
'description' : 'The EAN-13 code of this document',
'type' : 'string',
'mode' : 'w' },
# WARNING: the naming is wrong because it conflicts with getSourceReference
# which returns the reference of the source. Must be renamed as
# source_specific_reference
{ 'id' : 'source_reference',
'storage_id' : 'default_source_reference', # Compatibility
'description' : 'The references of the document for default sources',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'destination_reference',
'storage_id' : 'default_destination_reference', # Compatibility
'description' : 'The references of the document for default destinations',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'grouping_reference',
'description' : 'A reference which allows to unify multiple objects',
'type' : 'string',
'mode' : 'w' },
# Do not use the property below - it may be replaced by calculated
# references made out of reference, version_reference, portal_type, etc.
# ex. PROD-33456724-3
{ 'id' : 'document_reference', # XXX ERROR - we already have a reference
'description' : 'The references of the document itself',
'type' : 'string',
'mode' : 'w' },
)
_categories = ()
#############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ReportPreference:
"""This property sheet defines the user configurable parameters for reporting.
"""
_properties = (
{ 'id' : 'preferred_report_style',
'description' : 'The preferred style used to render a report. This must'
' be the name of a valid skin selection from SkinsTool.',
'type' : 'string',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_report_format',
'description' : 'The preferred format, if the style support it, the'
' report will be converted to this format.',
'type' : 'string',
'preference' : 1,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Resource:
"""
Properties which allow to define a generic Resource.
The underlying idea is that we only define 'base' properties
which correspond to a generic variations of the resource.
Variations can change the base properties by introduction
new attributions such as 'option' properties.
"""
_properties = (
# Pricing properties
{ 'id' : 'source_base_price',
'description' : 'A typical per unit price at which this resource can be sourced (bought)',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'source_base_price_validity',
'description' : 'Validity of the typical per unit price at which this resource can be sourced',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'destination_base_price',
'description' : 'A typical per unit price at which this resource can be supplied (sold)',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'destination_base_price_validity',
'description' : 'Validity of the typical per unit price at which this resource can be supplied',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'base_price',
'description' : 'A default per unit price used for internal price calculations',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'priced_quantity',
'description' : 'Number of units involved in base prices',
'type' : 'float',
'default' : 1.0,
'mode' : 'w' },
{ 'id' : 'consumer_unit_quantity',
'description' : 'Number of consumer_unit involved in the resoure (sku)',
'type' : 'float',
'default' : 1.0,
'mode' : 'w' },
{ 'id' : 'base_unit_quantity',
'description' : 'The smallest transferrable amount expressed in the default unit',
'type' : 'float',
'default' : 1.0,
'mode' : 'w' },
# Physical properties
{ 'id' : 'base_weight',
'description' : 'A typical per unit weight of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'base_volume',
'description' : 'A typical per unit volume of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'base_length',
'description' : 'A typical per unit length of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'base_width',
'description' : 'A typical per unit width of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'base_height',
'description' : 'A typical per unit height of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'base_surface',
'description' : 'A typical per unit surface of the resource',
'type' : 'float',
'mode' : 'w' },
# Basic conversion properties
# A property is set on categories to define if it is length, weight etc.
# another property defines the conversion to the default lenght
# (ie. nomber of meters in 1 inch)
# This allows to implement universal conversions
{ 'id' : 'length_quantity',
'description' : 'length of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'weight_quantity',
'description' : 'weight of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'height_quantity',
'description' : 'height of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'width_quantity',
'description' : 'width of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'surface_quantity',
'description' : 'surface area of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'volume_quantity',
'description' : 'volume of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'unit_quantity',
'description' : 'units of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'time_quantity',
'description' : 'time of the resource',
'type' : 'float',
'mode' : 'w' },
# Sourcing / planning properties
{ 'id' : 'source_title',
'storage_id' : 'default_source_title', # Compatibility
'description' : 'The titles of the sources of this resource',
'type' : 'string',
'acquisition_base_category' : ('source',),
'acquisition_portal_type' : ('Organisation','MetaNode'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'destination_title',
'storage_id' : 'default_destination_title', # Compatibility
'description' : 'The titles of the destinations of this resource',
'type' : 'string',
'acquisition_base_category' : ('destination',),
'acquisition_portal_type' : ('Organisation','MetaNode'),
'acquisition_copy_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
# Default attributes overriden in supply lines (should be in supply line)
{ 'id' : 'trade_description',
'description' : 'A description of the document intended for client',
'type' : 'text',
'default' : '',
'mode' : 'w' },
{ 'id' : 'instructions',
'description' : 'instructions in order to explain how to use the resource',
'type' : 'text',
'default' : '',
'mode' : 'w' },
# Pricing
{ 'id' : 'p_variation_base_category',
# XXX Compatibility
'description' : 'Base category range of matrix',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
)
_categories = ( 'source', 'destination', 'quantity_unit',
'base_contribution',
'use',
'price_currency', 'product_line',
'industrial_phase')
##############################################################################
#
# Copyright (c) 2008 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ResourceConstraint:
"""Constraints for Resource
"""
_constraints = (
{ 'id': 'resource_measures_consistency',
'type': 'ResourceMeasuresConsistency',
},
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ResourceMeasuresConsistencyConstraint:
"""
Define an Resource Measures Consistency Constraint for ZODB
Property Sheets
"""
_properties = (
{ 'id': 'message_measure_no_quantity_unit',
'type': 'string',
'description' : "Error message when the measure doesn't have a "\
"valid quantity_unit",
'default': "Measure for metric_type '${metric_type}' doesn't "\
"have a valid quantity_unit" },
{ 'id': 'message_measure_no_quantity',
'type': 'string',
'description' : "Error message when the measure doesn't have a "\
"valid quantity value",
'default': "Measure for metric_type '${metric_type}' doesn't "\
"have a valid quantity value" },
{ 'id': 'message_duplicate_metric_type',
'type': 'string',
'description' : 'Error message when several measures have the '\
'same metric_type',
'default': "Several measures have the same metric_type "\
"'${metric_type}'" },
{ 'id': 'message_duplicate_default_measure',
'type': 'string',
'description' : 'Error message when several measures are '\
'associated to the same unit',
'default': "Several measures are associated to the same unit "\
"'${quantity_unit}'" },
{ 'id': 'message_missing_metric_type',
'type': 'string',
'description' : "Error message when the metric category doesn't "\
"exist",
'default': "Implicit measure for the management unit can't be "\
"created because 'metric_type/${metric_type}' "\
"category doesn't exist" },
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class RoleDefinition:
"""
RoleDefinition defines association between a role name and a list of
Person/Organisation/Domain
"""
_properties = (
{ 'id' : 'role_name',
'description' : 'The role name (ex. Assignor, Assignee, etc.)',
'type' : 'string',
'mode' : 'w' },
)
_categories = (
'agent',
)
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class RoleInformation:
"""
Properties of an ERP5 Role Information
"""
_properties = (
{ 'id': 'role_name',
'type': 'lines',
'description': 'A list of role names defined by this Role Information',
'default': [],
'mode': 'w',
},
{ 'id': 'condition',
'type': 'object',
'description': 'TALES Expression to define the applicability of the' \
' role',
'mode': 'w',
},
{ 'id': 'role_category',
'type': 'lines',
'description': 'Static definition of the security categories',
'default': [],
'mode': 'w',
},
{ 'id': 'role_base_category',
'type': 'tokens',
'description': 'Base categories to use in order to retrieve dynamic' \
' security categories',
'default': [],
'mode': 'w',
},
{ 'id': 'role_base_category_script_id',
'type': 'string',
'description': 'Script ID to use in order retrieve dynamic' \
' security categories',
'mode': 'w',
},
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi KK and Contributors. All Rights Reserved.
# Yusei TAHARA <yusei@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class RoundingModel:
"""Rounding Model properties and categories.
"""
_properties = (
{ 'id' : 'rounding_method_id',
'description' : 'The name of a python script which implements custom rounding routine.',
'type' : 'string',
'mode' : 'w',
'default' : None,
},
{ 'id' : 'rounded_property_id',
'description' : 'The property name which value is rounded. Note that some property is virtual, like total_price.',
'type' : 'tokens',
'mode' : 'w',
'default' : None,
},
{ 'id' : 'precision',
'description' : 'Precision value to be used for rounding, specified as a minimal unit.',
'type' : 'float',
'mode' : 'w',
'default' : None,
},
)
##############################################################################
#
# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Rule:
"""
Property sheet for Rule class and subclass instances
"""
_properties = (
{ 'id' : 'matching_property',
'description' : 'List of properties used in to compare previsions '
'with Simulation Movements',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'expandable_property',
'description' : 'List of properties used in expand',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'same_total_quantity',
'default' : 'Automatically fix quantities of generated movements'
' so that total quantity is the same as input'
' movement',
'type' : 'boolean',
'default' : True,
'mode' : 'w' },
)
_categories = ('trade_phase', )
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Daniele Vanbaelinghem <daniele@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class SQLIdGenerator:
"""
Id Generator provides properties to check the storage on ZODB
"""
_properties = (
{'id' :'stored_in_zodb',
'label' : 'A flag indicating if the last_id is stored in the ZODB',
'type' :'boolean',
'mode' :'w'
},
{'id' :'store_interval',
'label' :'The generator store the last id in the zodb \
every store interval',
'type' :'int',
'mode' :'w'
},
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class SaleOpportunity:
"""
Sales Opportunity properties and categories
This propertysheet is now useless. Do not use it.
It is only there for reminder of how one should
use acquisition in a context of synchronisation.
"""
_properties = (
{ 'id' : 'client_organisation_title',
'description' : 'The organisations involved',
'type' : 'lines',
'acquisition_base_category' : ('client',),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'client_person_title',
'description' : "The contact persons involved",
'type' : 'lines',
'acquisition_base_category' : ('client',),
'acquisition_portal_type' : ('Person',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ServiceConfiguratorItem:
""" Properties of a ServiceConfiguratorItem."""
_properties = ({'id' : 'service',
'description' : 'Services',
'type' : 'lines',
'mode' : 'w',
'default' : []},
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class SimpleItem:
"""
Properties of a simple item with title and description
"""
_properties = (
{ 'id' : 'title',
'description' : '',
'type' : 'string',
'default' : '',
'acquisition_base_category': (),
'acquisition_portal_type': (),
'acquisition_copy_value': 0,
'acquisition_mask_value': 1,
'acquisition_accessor_id': 'getTitle',
'acquisition_depends': None,
'alt_accessor_id': ('getCompactTitle',),
'mode' : 'w',
'translatable': 1,
'translation_domain' : 'erp5_content',
},
{ 'id' : 'short_title',
'description' : '',
'type' : 'string',
'translatable': 1,
'translation_domain' : 'erp5_content',
'mode' : 'w' },
{ 'id' : 'description',
'description' : '',
'type' : 'text',
'default' : '',
'mode' : 'w' },
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Simulation:
"""
Attributes used in the optimisation of the simulation
TODO:
- should all categories which are propagatable in simulation
be defined here or elsewhere (movement, another property sheets)
"""
_properties = (
# Change of dates and quantities
{ 'id' : 'quantity_frozen', # XXX-JPS Legacy ideas, not used
'description' : 'If set to 1, the quantity can not be changed',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'start_date_frozen', # XXX-JPS Legacy ideas, not used
'description' : 'If set to 1, the start date can not be changed',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'stop_date_frozen', # XXX-JPS Legacy ideas, not used
'description' : 'If set to 1, the stop date can not be changed',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'delivery_ratio',
'description' : 'ratio to apply on the quantity property of the' \
'corresponding delivery to obtain the current quantity',
'default' : 1.,
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'order_ratio', # XXX-JPS Legacy ideas, not used
'description' : 'ratio to apply on the quantity property of the' \
'corresponding order to obtain the current quantity',
'default' : 1.,
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'delivery_error',
'description' : 'correction to make the match between delivery quantity and simulation quantity consistent',
'default' : 0.,
'type' : 'float',
'mode' : 'w' },
)
_categories = ('order', 'delivery', 'delivery_mode', 'incoterm',
'payment_mode', 'solver', 'specialise',
# XXX-JPS I doubt that this is really required (here)
'property_mapping',
# used to link to Business Links and Trade Model Paths
# (but this is redundant with Amount property sheet)
'causality',
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class SitePropertyConfiguratorItem:
""" Site Properties Configurator Item."""
_properties = ({'id' : 'site_property_list',
'description' : 'Site Property List',
'type' : 'lines',
'mode' : 'w',
'default' : []},)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Jean-a
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class SolverSelection:
"""
Solver Selection provides provides properties to
store a selection of solver portal types.
"""
_properties = (
{'id' :'delivery_solver',
'label' :'Delivery Solver to be used',
'type' :'string',
'mode' :'w'
},
)
_categories = ('causality', 'delivery', 'solver',)
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
class SolverType:
"""
Properties of an ERP5 Solver portal type
"""
_properties = (
{ 'id': 'tested_property',
'type': 'lines',
'default' : (),
'mode': 'w',
'label': 'Property to be solved'
},
{ 'id': 'solver_action_title',
'type': 'string',
'mode': 'w',
'label': 'Solver Action Title'
},
{ 'id': 'line_groupable',
'type': 'boolean',
'mode': 'w',
'label': 'Line Groupable'
},
{ 'id': 'line_exclusive',
'type': 'boolean',
'mode': 'w',
'label': 'Line Exclusive'
},
{ 'id': 'configuration_groupable',
'type': 'boolean',
'mode': 'w',
'label': 'Configuration Groupable'
},
{ 'id': 'process_exclusive',
'type': 'boolean',
'mode': 'w',
'label': 'Process Exclusive'
},
{ 'id': 'automatic_solver',
'type': 'boolean',
'mode': 'w',
'label': 'Solve automatically if True'
},
{ 'id': 'default_configuration_property_dict_method_id',
'type': 'string',
'mode': 'w',
'description':'the method used to get a dict of default properties.',
},
{ 'id': 'configuration_property_list_dict_method_id',
'type': 'string',
'mode': 'w',
'description':'the method used to get a dict of possible values.',
},
)
_categories = ('conflicting_solver', 'delivery_solver',)
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class SortIndex:
"""
Discounts are used in orders, trade condition,...
"""
_properties = (
{ 'id' : 'string_index',
'description' : 'a string which can be used to sort objects in a list',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'int_index',
'description' : 'an int which can be used to sort objects in a list',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'float_index',
'description' : 'a float which can be used to sort objects in a list',
'type' : 'float',
'mode' : 'w' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class StandardBT5ConfiguratorItem:
""" Properties of a ReturnStandardBT5ConfiguratorItem."""
_properties = ({'id' : 'bt5_id',
'description' : 'Business Template ID',
'type' : 'string',
'mode' : 'w',
'default' : 'erp5_base' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.ERP5Type import Permissions
class StandardProperty:
"""
Define a Standard Property for ZODB Property Sheets
"""
_properties = (
# 'reference' has be used in favor of 'id' because of
# UniqueObject forbidding 'title' ID for example
{ 'id': 'reference',
'type': 'string',
'description': 'Property name' },
# TALES expression
{ 'id': 'property_default',
'type': 'string',
'description': 'Default value if not set',
'default': None },
{ 'id': 'multivalued',
'type': 'boolean',
'description': 'Determines if the property is multivalued',
'default': False },
{ 'id': 'range',
'type': 'boolean',
'description': 'Determines if the range accessors should be created' ,
'default': False },
{ 'id': 'preference',
'type': 'boolean',
'description': 'Determines if the preference accessors should be created',
'default': False },
# CMF compatibility
{ 'id': 'storage_id',
'type': 'string',
'description' : 'Name to be used instead of the Reference',
'default': None },
{ 'id': 'read_permission',
'type': 'string',
'description' : 'Permission needed to access Getters',
'default': Permissions.AccessContentsInformation },
{ 'id': 'write_permission',
'type': 'string',
'description' : 'Permission needed to access Setters',
'default': Permissions.ModifyPortalContent },
)
_categories = ('elementary_type',)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class State:
"""
State properties and categories
"""
_properties = (
{
'id': 'is_initial_state',
'description': 'Define the initial state of the workflow',
'type': 'boolean',
'mode': 'w',
'default': 0
},
)
# XXX Can not use because getDestinationTitleList acquire on Node
_categories = ('destination',)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class StockCapacity:
"""
Properties for Path.
"""
_properties = (
# Accounting
{ 'id' : 'min_quantity',
'description' : """The quantity of resource.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
{ 'id' : 'max_quantity',
'description' : """The quantity of resource.""",
'type' : 'float',
'default' : 0.0,
'mode' : 'w' },
)
_categories = ('quantity_unit',)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Yoshinori Okuji <yo@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class SubversionPreference:
"""
User Preferences for Subversion
"""
_properties = (
{ 'id' : 'preferred_subversion_user_name',
'description' : 'The user name for Subversion',
'type' : 'string',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_subversion_working_copy',
'description' : 'The Subversion working copies',
'type' : 'lines',
'preference' : 1,
'mode' : 'w' },
{ 'id' : 'preferred_diff_filter_script_id',
'description' : 'Scripts to filter what is displayed in diffs ',
'type' : 'lines',
'preference' : 1,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class SupplyLine:
"""
Properties which allow to define a generic Price.
"""
_properties = (
{ 'id' : 'base_price',
'description' : 'A typical per unit base price',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'additional_price',
'description' : 'A per unit additional price',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'discount_ratio',
'description' : 'A discount ratio',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'exclusive_discount_ratio',
'description' : 'A exclusive discount ratio',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'surcharge_ratio',
'description' : 'A surcharge ratio',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'variable_additional_price',
'description' : 'A per unit additional price that depends on a'\
'continuous property',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'non_discountable_additional_price',
'description' : 'A per unit additional price that is not impacted by'\
'discount ratio',
'type' : 'float',
'mode' : 'w' },
# Pricing calculation
# Matrix definition
# Quantity step
{ 'id' : 'quantity_step',
'description' : 'A list of quantity values which define ' \
'acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'additional_price_quantity_step',
'description' : 'A list of quantity values which define ' \
'acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'discount_ratio_quantity_step',
'description' : 'A list of quantity values which define ' \
'acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'exclusive_discount_ratio_quantity_step',
'description' : 'A list of quantity values which define ' \
'acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'surcharge_ratio_quantity_step',
'description' : 'A list of quantity values which define ' \
'acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'variable_additional_price_quantity_step',
'description' : 'A list of quantity values which define ' \
'acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'non_discountable_additional_price_quantity_step',
'description' : 'A list of quantity values which define ' \
'acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'mode' : 'w' },
# Base category
{ 'id' : 'p_variation_base_category',
# XXX Compatibility
'description' : 'Base category range of matrix',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
# { 'id' : 'additional_price_variation_base_category',
# 'description' : 'Base category range of matrix',
# 'type' : 'float',
# 'multivalued' : 1,
# 'mode' : 'w' },
{ 'id' : 'discount_ratio_variation_base_category',
'description' : 'Base category range of matrix',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'exclusive_discount_ratio_variation_base_category',
'description' : 'Base category range of matrix',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'surcharge_ratio_variation_base_category',
'description' : 'Base category range of matrix',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
# # Option Matrix
# { 'id' : 'optional_additional_price_quantity_step',
# 'description' : 'A list of quantity values which define ' \
# 'acceptable ranges',
# 'type' : 'float',
# 'multivalued' : 1,
# 'mode' : 'w' },
# { 'id' : 'optional_discount_ratio_quantity_step',
# 'description' : 'A list of quantity values which define ' \
# 'acceptable ranges',
# 'type' : 'float',
# 'multivalued' : 1,
# 'mode' : 'w' },
# { 'id' : 'optional_exclusive_discount_ratio_quantity_step',
# 'description' : 'A list of quantity values which define ' \
# 'acceptable ranges',
# 'type' : 'float',
# 'multivalued' : 1,
# 'mode' : 'w' },
# { 'id' : 'optional_surcharge_ratio_quantity_step',
# 'description' : 'A list of quantity values which define ' \
# 'acceptable ranges',
# 'type' : 'float',
# 'multivalued' : 1,
# 'mode' : 'w' },
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
class SupplyLink:
_properties = (
{ 'id' : 'deliverable',
'description' : 'Last link is defuned by deliverable=1.',
'type' : 'boolean',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TALESConstraint:
"""
Define a TALES Constraint for ZODB Property Sheets
"""
_properties = (
# TALES Expression
{ 'id': 'expression',
'type': 'string',
'description' : 'TALES Expression' },
{ 'id': 'message_expression_false',
'type': 'string',
'description' : 'Error message when the Expression is false',
'default': 'Expression was false' },
{ 'id': 'message_expression_error',
'type': 'string',
'description' : 'Error message when there is an error while '\
'evaluating an Expression',
'default': 'Error while evaluating expression: ${error}' },
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Jean-a
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class TargetSolver:
_categories = ('delivery', 'causality')
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Task:
"""
Properties which allow to define a generic Task.
Task have a beginning and end.
Task is used by
- Movement
If we want to use a single date, then use start_date and target_start date.
stop dates will be acquired from start dates as long as they hold None
"""
_properties = (
# Accounting
{ 'id' : 'start_date',
'description' : 'The date which the movement starts',
'type' : 'date',
'range' : True,
'default' : None,
'acquisition_base_category' : ('delivery', 'order', 'parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalAcquisitionMovementTypeList() + portal.getPortalDeliveryTypeList() + portal.getPortalOrderTypeList() + portal.getPortalInvoiceTypeList() + portal.getPortalSupplyTypeList() + portal.getPortalProjectTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getStartDate',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'stop_date',
'description' : 'The date which the movement stops',
'type' : 'date',
'range' : True,
'default' : None,
'acquisition_base_category' : ('delivery', 'order', 'parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalAcquisitionMovementTypeList() + portal.getPortalDeliveryTypeList() + portal.getPortalOrderTypeList() + portal.getPortalInvoiceTypeList() + portal.getPortalSupplyTypeList() + portal.getPortalProjectTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getStopDate',
'acquisition_depends' : None,
'alt_accessor_id' : ('getStartDate', ),
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
# Rafael Monnerat <rafael@nexedi.com>
#
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TaskConstraint:
"""
Constraintsts For Task
"""
_constraints = (
{ 'id' : 'source_category_membership_arity',
'description' : 'Source must be defined',
'type' : 'CategoryMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ('Person', 'Organisation', 'Category'),
'base_category' : ('source',),
'message_arity_with_portal_type_not_in_range': 'Assignee must be defined',
},
{ 'id' : 'destination_category_membership_arity',
'description' : 'Destination must be defined',
'type' : 'CategoryMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ('Person', 'Organisation', 'Category'),
'base_category' : ('destination',),
'message_arity_with_portal_type_not_in_range': 'Location must be defined',
},
{ 'id' : 'start_date_existence',
'description' : 'Property start_date must be defined',
'type' : 'PropertyExistence',
'start_date' : None,
'message_no_such_property' : 'Begin Date must be defined'
},
{ 'id' : 'date_coherency',
'description' : 'Stop Date must be after Start Date',
'type' : 'TALESConstraint',
'expression' : 'python: object.getStopDate() >= object.getStartDate()',
'message_expression_false': 'End Date must be after Begin Date',
},
{ 'id' : 'lines',
'description' : 'Lines must be defined',
'type' : 'ContentExistence',
'portal_type' : ('Task Line', 'Task Report Line' ),
'message_no_subobject_portal_type' : \
'At least one line is required',
},
)
##############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
# Rafael M. Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TaskLineConstraint:
"""
Task Line Constraints
"""
_constraints = (
{ 'id' : 'quantity_existence',
'description' : 'Property quantity must be defined',
'type' : 'PropertyExistence',
'quantity' : None,
"message_no_such_property" : 'Quantity must be defined in lines'
},
{ 'id' : 'resource',
'description' : 'Resource must be defined',
'type' : 'CategoryMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ( ),
'base_category' : ('resource',),
'message_arity_not_in_range' : 'Service must be defined in lines',
},
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Telephone:
"""
Properties for Telephone Objects
Can be used for Fax numbers aswell.
"""
_properties = (
{ 'id' : 'telephone_country',
'description' : 'Country indicative number',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'telephone_area',
'description' : 'Area indicative number',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'telephone_city',
'description' : 'City indicative number',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'telephone_number',
'description' : 'Telephone number minus indicatives',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'telephone_extension',
'description' : 'Telephone number extension',
'type' : 'string',
'mode' : 'w' },
)
#############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho Teixeira <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TelephonePreference:
"""
This property sheet defines configurable default values for
Telephone configuration.
"""
_properties = (
{ 'id' : 'preferred_telephone_default_country_number',
'description' : 'The default country number.',
'type' : 'string',
'preference' : 1,
'mode' : 'w',
'default' : '',
},
{ 'id' : 'preferred_telephone_default_area_number',
'description' : 'The default area number.',
'type' : 'string',
'preference' : 1,
'mode' : 'w',
'default' : '',
},
{ 'id' : 'preferred_telephone_default_city_number',
'description' : 'The default city number.',
'type' : 'string',
'preference' : 1,
'mode' : 'w',
'default' : '',
},
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TextDocument:
"""
Properties for a simple text based Document
"""
_properties = (
{ 'id' : 'text_content',
'description' : 'The content of the document considered as a text string',
'type' : 'text',
'mode' : 'w'
},
{ 'id' : 'text_content_substitution_mapping_method_id',
'description' : 'The method ID which returns a mapping for substitutions of a text content',
'type' : 'string',
'mode' : 'w'
},
)
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Ticket:
"""
CRM Ticket properties
"""
_properties = (
{ 'id' : 'assessment_form_id',
'description' : 'The ID of a form which can be used to assess related events.',
'type' : 'string',
'mode' : 'w' },
)
_categories = ('specialise', ) # Tickets can specialise a trade condition
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradeCondition:
"""
Trade Conditions are used to store the conditions (payment, logistic,...)
which should be applied (and used in the orders) when two companies make
business together
"""
_properties = (
{ 'id' : 'source_decision_destination_reference',
'description' : 'The reference of the source_decision for'
' default destination',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'calculation_script_id',
'description' : 'If no script found on Trade Model Lines, this'
' script is used to do localised calculs',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'destination_decision_source_reference',
'description' : 'The reference of the destination_decision'
' for default source',
'type' : 'string',
'mode' : 'w' },
# Subordination properties
{ 'id' : 'payment_condition',
'storage_id' : 'default_payment_condition',
'description' : 'The current payment condition.',
'type' : 'content',
'portal_type' : ('Payment Condition',),
'acquired_property_id' : ( # from PropertySheet/PaymentCondition.py
'payment_mode', 'payment_mode_title',
'trade_date', 'trade_date_title',
'payment_term', 'payment_additional_term',
'payment_end_of_month', 'payment_date',
'quantity', 'efficiency',
'source_payment',
'source_payment_value',
'source_payment_title',
'destination_payment',
'destination_payment_value',
'destination_payment_title',
# from PropertySheet/TradeModelLine.py
'calculation_script_id',
),
'mode' : 'w' },
)
_categories = ( 'group', 'activity', 'incoterm',
'price_currency', 'delivery_mode',
'trade_condition_type', )
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Fabien Morin <fabien@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradeConditionConstraint:
"""
Trade Condition Constraints
"""
_constraints = (
{ 'id' : 'reference_existence',
'description' : 'Property reference must be defined',
'type' : 'PropertyExistence',
'reference' : None,
"message_no_such_property" : 'Reference must be defined'
},
{ 'id' : 'date_coherency',
'description' : 'Expiration Date must be after Effective Date',
'type' : 'TALESConstraint',
'condition' : 'python: object.getExpirationDate() and '
'object.getEffectiveDate()',
'expression' : 'python: object.getExpirationDate() >= '
'object.getEffectiveDate()',
'message_expression_false': 'Expiration date must be after effective date',
},
{ 'id' : 'version_existence',
'description' : 'Version must be defined',
'type' : 'PropertyExistence',
'version' : None,
'message_no_such_property' : 'Version must be defined',
},
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradeModelLine:
"""
Properties for trade model lines
"""
_categories = ('trade_phase',)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradeModelLineCellConsistencyConstraint:
"""
Define an Trade Model Line Cell Consistency Constraint for ZODB
Property Sheets
"""
_properties = (
{ 'id': 'base_id',
'type': 'string',
'description' : 'Cell base_id' },
{ 'id': 'message_cell_inexistance',
'type': 'string',
'description' : 'Error message when there is a missing cell for '\
'a given line',
'default': 'Missing cells on line "${line}"' },
)
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Fabien Morin <fabien@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradeModelLineConstraint:
"""
Trade Model Line Constraints
"""
_constraints = (
{ 'id' : 'reference_existence',
'description' : 'Property reference must be defined',
'type' : 'PropertyExistence',
'reference' : None,
"message_no_such_property" : 'Reference must be defined in lines'
},
{ 'id' : 'resource',
'description' : 'Resource must be defined',
'type' : 'CategoryMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ( ),
'base_category' : ('resource',),
'message_arity_not_in_range' : 'Service must be defined in lines',
},
{ 'id' : 'trade_phase',
'description' : 'Trade Phase must be defined',
'type' : 'CategoryMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ( ),
'base_category' : ('trade_phase',),
'message_arity_not_in_range' : 'Trade Phase must be defined in lines',
},
{ 'id': 'cell_existence',
'description': 'If variation categories are define on Trade Model Line \
cell corresponding to this categories should exist too',
'base_id': 'movement',
'type': 'TradeModelLineCellConsistency',
},
)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Lukasz Nowak <luke@nexedi.com>
# Yusuke Muraoka <yusuke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradeModelPath:
"""
Trade Model Path properties
"""
_properties = (
{ 'id' : 'source_method_id',
'description' : 'ID of method to get source list of categories',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'destination_method_id',
'description' : 'ID of method to get destination list of categories',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'reference_date_method_id',
'description' : 'ID of method to get the reference date at the trade_phase defined by trade_date',
'type' : 'string',
'default' : 'getStopDate',
'mode' : 'w' },
)
_categories = ('end_of', # XXX-JPS What is end_of ????
'trade_phase' , 'incoterm') # XXX-JPS why incoterm ?
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
# Alexandre Boeglin <alex@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class TradeOrder:
"""
Constraints that can be enforced on Trade Orders
"""
_properties = (
)
_categories = (
)
_constraints = (
{ 'id' : 'source_section_category_existence',
'description' : 'Source section must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Person', 'Organisation'),
'source_section': 1,
'message_category_not_set': 'Supplier must be defined',
},
{ 'id' : 'destination_section_category_existence',
'description' : 'Destination section must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Person', 'Organisation'),
'destination_section': 1,
'message_category_not_set': 'Client must be defined',
},
{ 'id' : 'source_category_existence',
'description' : 'Source must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Person', 'Organisation'),
'source': 1,
'message_category_not_set': 'Sender or Provider must be defined',
},
{ 'id' : 'destination_category_existence',
'description' : 'Destination must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Person', 'Organisation'),
'destination': 1,
'message_category_not_set': 'Recipient or Beneficiary must be defined',
},
{ 'id' : 'price_currency_category_existence',
'description' : 'Price Currency must be defined',
'type' : 'CategoryExistence',
'portal_type' : ('Currency', ),
'price_currency': 1,
'message_category_not_set': 'Currency must be defined',
},
{ 'id' : 'total_quantity',
'description' : 'Total Quantity must not be 0',
'type' : 'TALESConstraint',
'expression' : 'python: object.getTotalQuantity() != 0',
'message_expression_false': 'Total Quantity must not be 0',
},
{ 'id' : 'start_date',
'description' : 'Start Date must be defined',
'type' : 'PropertyExistence',
'start_date' : None,
'message_no_such_property' : "Shipping Date must be defined",
},
{ 'id' : 'date_coherency',
'description' : 'Stop Date must be after Start Date',
'type' : 'TALESConstraint',
'expression' : 'python: object.getStopDate() >= object.getStartDate()',
'message_expression_false': 'Delivery Date must be after Shipping Date',
},
{ 'id' : 'lines',
'description' : 'Lines must be defined',
'type' : 'ContentExistence',
'portal_type' : Expression('portal/getPortalOrderMovementTypeList'),
'message_no_subobject_portal_type' : \
'At least one line is required',
},
)
##############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
# Rafael M. Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradeOrderLine:
"""
Trade order Line Constraints
"""
_constraints = (
{ 'id' : 'resource',
'description' : 'Resource must be defined',
'type' : 'CategoryAcquiredMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ( ),
'base_category' : ('resource',),
'condition' : 'not: object/hasLineContent | nothing',
'message_arity_not_in_range' : 'Product or service must be defined in lines',
},
)
#############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TradePreference:
""" This property sheet defines what can be configured on preferences for
trade.
"""
_properties = (
# roles
{ 'id' : 'preferred_client_role',
'description' : 'Roles of clients',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_supplier_role',
'description' : 'Roles of suppliers',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
# uses
{ 'id' : 'preferred_sale_use',
'description' : 'Uses of resources that are sold',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_purchase_use',
'description' : 'Uses of resources that are purchased',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_packing_use',
'description' : 'Uses of resources that are packing containers',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
{ 'id' : 'preferred_price_ratio_use',
'description' : 'Uses of movements for which the price will be a ratio'
' applied to the base instead of an unit price',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
# base_amount
{ 'id' : 'preferred_trade_base_amount',
'description' : 'Uses of base amounts for trade',
'type' : 'lines',
'preference' : 1,
'default' : [],
'write_permission': 'Manage properties',
'mode' : '' },
)
##############################################################################
#
# Copyright (c) 2002, 2004 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.CMFCore.Expression import Expression
class Transformation:
"""
A transformation can acquire other transformations
"""
_properties = (
{ 'id' : 'template_transformation_id',
'description' : "The contact persons involved",
'type' : 'lines',
'acquisition_base_category' : ('specialise',),
'acquisition_portal_type' : ('Transformation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getId',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'template_transformation_url',
'description' : "The contact persons involved",
'type' : 'lines',
'acquisition_base_category' : ('specialise',),
'acquisition_portal_type' : ('Transformation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getRelativeUrl',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'template_transformation_title',
'description' : "The contact persons involved",
'type' : 'lines',
'acquisition_base_category' : ('specialise',),
'acquisition_portal_type' : ('Transformation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TransformedResource:
"""
TransformedResource which allows to define possible
variations for a Resource, a Transformation, etc.
"""
_properties = (
# Definition of the variation domain
{ 'id' : 'q_variation_base_category',
'description' : 'A list of base categories which define possible discrete variations. '\
'Variation ranges are stored as category membership. '\
'(prev. variation_category_list).',
'type' : 'lines',
'default' : [],
'mode' : 'w' },
{ 'id' : 'v_variation_base_category',
'description' : 'A list of base categories which define possible discrete variations. '\
'Variation ranges are stored as category membership. '\
'(prev. variation_category_list).',
'type' : 'lines',
'default' : [],
'mode' : 'w' },
# XXX does not seem to be used anymore
# { 'id' : 'identical_variation_base_category',
# #'storage_id' : 'identical_variation_base_category_list', # Coramy Compatibility
# 'description' : 'A list of base categories which keep an identical value to the default resource.',
# 'type' : 'lines',
# 'default' : [],
# 'mode' : 'w' },
)
_categories = ('specialise', 'industrial_phase', 'option', 'trade_phase')
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Transition:
"""
Transition properties and categories
"""
_properties = (
{ 'id' : 'transition_form_id',
'description' : 'Defines the form use to display question to the user.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'before_script_id',
'description' : 'Defines the script called before a transition.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'after_script_id',
'description' : 'Defines the script called after a transition.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'guard_expression',
'description' : 'Tales expression use to disable transition',
'type' : 'tales',
'mode' : 'w' },
)
# XXX Can not use because getDestinationTitleList acquires on Node
_categories = ('destination',)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class TranslatableProperty:
"""
Define a Translatable Property for new-style Property Sheets
"""
_properties = (
{ 'id': 'translatable',
'type': 'boolean',
'description' : 'Determines if the value is translatable',
'default': False },
{ 'id': 'translation_domain',
'type': 'string',
'description' : 'Define the translation domain',
'default': None },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Url:
"""
Properties for Url Objects
"""
_properties = (
{ 'id' : 'url_string',
'description' : 'url value',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'url_protocol',
'description' : 'for which protocol does this url hold',
'type' : 'string',
'mode' : 'r'
}
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Variable:
"""
Variable properties and categories
"""
_properties = (
{ 'id' : 'initial_value',
'description' : 'Defines the default value.',
'type' : 'tales',
'mode' : 'w' },
{ 'id' : 'automatic_update',
'description' : 'Do we update the value in each transition ?',
'type' : 'boolean',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Variation:
"""
Properties which allow to define a discrete Variation instance
"""
_properties = (
# Pricing properties
{ 'id' : 'source_additional_price',
'description' : 'A typical per unit price at which this resource can be sourced (bought)',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'source_additional_price_validity',
'description' : 'Validity of the typical per unit price at which this resource can be sourced',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'destination_additional_price',
'description' : 'A typical per unit price at which this resource can be supplied (sold)',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'destination_additional_price_validity',
'description' : 'Validity of the typical per unit price at which this resource can be supplied',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'additional_price',
'description' : 'A default per unit price used for internal price calculations',
'type' : 'float',
'mode' : 'w' },
# Physical properties
{ 'id' : 'additional_weight',
'description' : 'A typical per unit weight of the resource',
'type' : 'float',
'mode' : 'w' },
{ 'id' : 'additional_volume',
'description' : 'A typical per unit volume of the resource',
'type' : 'float',
'mode' : 'w' },
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class VariationRange:
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
_properties = (
# Definition of the variation domain
{ 'id' : 'variation_base_category',
'storage_id' : 'variation_base_category_list', # Coramy Compatibility
'description' : 'A list of base categories which define possible discrete variations. '\
'Variation ranges are stored as category membership. '\
'(prev. variation_category_list).',
'type' : 'tokens',
'default' : [],
'mode' : 'w' },
{ 'id' : 'optional_variation_base_category',
'storage_id' : 'optional_variation_base_category_list',
'description' : 'A list of optional base categories which define possible discrete variations. '\
'Variation ranges are stored as category membership. '\
'(prev. variation_category_list).',
'type' : 'tokens',
'default' : [],
'mode' : 'w' },
{ 'id' : 'individual_variation_base_category',
'storage_id' : 'individual_variation_base_category_list',
'description' : 'A list of individual base categories which define possible discrete variations. '\
'Variation ranges are stored as category membership. '\
'(prev. variation_category_list).',
'type' : 'tokens',
'default' : [],
'mode' : 'w' },
{ 'id' : 'variation_property',
'storage_id' : 'variation_property_list', # Coramy Compatibility
'description' : 'A list of properties which define variations',
'type' : 'tokens',
'default' : [],
'mode' : 'w' },
{ 'id' : 'variation_base_category_line',
'description' : 'The variation base category which serves as line in the matrix representation.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'variation_base_category_column',
'description' : 'The variation base category which serves as column in the matrix representation.',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'variation_base_category_tab',
'description' : 'The variation base category which serves as tab in the matrix representation.',
'type' : 'lines',
'default' : [],
'mode' : 'w' },
)
_categories = ('variation',)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Version:
"""
Properties which define the versions of a document
"""
_properties = (
{ 'id' : 'version',
'description' : 'A version identifier',
'type' : 'string',
'mode' : 'w',
'default' : '' },
{ 'id' : 'revision',
'description' : 'A revision identifier',
'type' : 'string',
'mode' : 'w',
'default' : '' },
)
_categories = ()
##############################################################################
#
# Copyright (c) 2002,2008 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class WebSection:
"""
WebSection properties for all ERP5 objects
"""
_properties = (
{ 'id' : 'container_layout',
'description' : 'ID of a page template or form which defines the rendering layout for the container',
'type' : 'string',
'default' : None,
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : ('Web Section', 'Web Site'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getContainerLayout',
'acquisition_depends' : None,
'mode' : '' },
{ 'id' : 'content_layout',
'description' : 'ID of a page template or form which defines the rendering layout for contents',
'type' : 'string',
'default' : None,
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : ('Web Section', 'Web Site'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getContentLayout',
'acquisition_depends' : None,
'mode' : '' },
{ 'id' : 'visible',
'description' : 'Defines visibility of current section.',
'type' : 'boolean',
'mode' : 'rw' },
{ 'id' : 'default_page_displayed',
'description' : 'Defines whether the default page should be displayed.',
'type' : 'boolean',
'default' : 1,
'mode' : 'rw' },
{ 'id' : 'site_map_document_parent',
'description' : 'Defines whether the documents of this section should '
'be part of the site map.',
'type' : 'boolean',
'default' : 0,
'mode' : 'rw' },
{ 'id' : 'site_map_section_parent',
'description' : 'Defines whether the subsections of this section should '
'be part of the site map.',
'type' : 'boolean',
'default' : 0,
'mode' : 'rw' },
{ 'id' : 'custom_render_method_id',
'description' : 'ID of a page template, script, form or any callable object'
'which overrides the default rendering of the section',
'type' : 'string',
'default' : None,
'mode' : 'rw' },
{ 'id' : 'layout_configuration_form_id',
'description' : 'The ID of a form which can be used to configure layout preferences.',
'type' : 'string',
'default' : None,
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : ('Web Section', 'Web Site'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getLayoutConfigurationFormId',
'acquisition_depends' : None,
'mode' : '' },
{ 'id' : 'authorization_forced',
'description' : 'Force authorization for anonymous user if document can not be found.',
'type' : 'boolean',
'default' : 0,
'mode' : 'rw' },
{ 'id' : 'available_language',
'description' : 'Languages available in the Web Section or Web Site (subset of Localizer languages)',
'type' : 'tokens',
'default' : (),
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : ('Web Section', 'Web Site'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getAvailableLanguageList',
'acquisition_depends' : None,
'mode' : 'rw' },
)
_categories = ('aggregate', )
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class WebSite:
"""
WebSite properties for all ERP5 objects
"""
_properties = (
{ 'id' : 'skin_selection_name',
'description' : 'The name of a skin selection to be used for a web site',
'type' : 'string',
'default' : None,
'mode' : 'rw' },
{ 'id' : 'static_language_selection',
'description' : 'If set to True, the language selection is based on the URL rather than '
'on cookie. This property impacts the behaviour of Base_doLanguage',
'type' : 'boolean',
'default' : 0,
'mode' : 'rw' },
)
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Workflow:
"""
Workflow properties and categories
"""
_properties = (
{
'id' : 'state_base_category',
'description' : 'Defines the base category used to save the current' \
'state',
'type' : 'string',
'mode' : 'w'
},
)
# XXX Can not use because getDestinationTitleList acquire on Node
_categories = ('source',)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class XMLObject:
"""
Base properties for all ERP5 synchronizable
objects.
"""
_properties = (
{ 'id' : 'rid',
'description' : 'Remote local ID of the object (optional)',
'type' : 'string',
'mode' : '' },
{ 'id' : 'sid',
'description' : 'Synchronisation UID for this object (optional)',
'type' : 'int',
'mode' : '' },
)
import sys
from Products.ERP5Type.Utils import initializeProduct, updateGlobals
this_module = sys.modules[__name__]
document_classes = updateGlobals(this_module, globals())
def initialize(context):
initializeProduct(context, this_module, globals(),
document_classes=document_classes)
...@@ -33,7 +33,7 @@ import transaction ...@@ -33,7 +33,7 @@ import transaction
from Products.ERP5Type.dynamic.portal_type_class import synchronizeDynamicModules from Products.ERP5Type.dynamic.portal_type_class import synchronizeDynamicModules
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.backportUnittest import expectedFailure from Products.ERP5Type.tests.backportUnittest import expectedFailure, skip
from Products.ERP5Type.Core.PropertySheet import PropertySheet as PropertySheetDocument from Products.ERP5Type.Core.PropertySheet import PropertySheet as PropertySheetDocument
from zope.interface import Interface, implementedBy from zope.interface import Interface, implementedBy
...@@ -1277,6 +1277,10 @@ class TestZodbImportFilesystemPropertySheet(ERP5TypeTestCase): ...@@ -1277,6 +1277,10 @@ class TestZodbImportFilesystemPropertySheet(ERP5TypeTestCase):
[ zodb_constraint_class.exportToFilesystemDefinitionDict() \ [ zodb_constraint_class.exportToFilesystemDefinitionDict() \
for zodb_constraint_class in zodb_constraint_class_tuple ]) for zodb_constraint_class in zodb_constraint_class_tuple ])
TestZodbImportFilesystemPropertySheet = skip(
"ERP5PropertySheetLegacy is now obsolete")(
TestZodbImportFilesystemPropertySheet)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestPortalTypeClass)) suite.addTest(unittest.makeSuite(TestPortalTypeClass))
......
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