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' },
)
This diff is collapsed.
##############################################################################
#
# 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) 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',
},
)
##############################################################################
#
# 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.
# 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) 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' },
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment