Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(17)  |  Call(11)  |  Derive(0)  |  Import(6)

src/e/r/erp5-HEAD/product/ERP5Type/mixin/component.py   erp5(Download)
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
 
from zLOG import LOG, INFO
      reference_has_error = True
      error_list.append(
        ConsistencyMessage(self,
                           object_relative_url,
                           message=self._message_reference_not_set,
      reference_has_error = True
      error_list.append(
        ConsistencyMessage(self,
                           object_relative_url,
                           message=self._message_invalid_reference,
                           mapping={}))
 
    version = self.getVersion()
    if not version:
      error_list.append(ConsistencyMessage(self,
                                           mapping={}))
    elif version[0] == '_':
      error_list.append(ConsistencyMessage(self,
                                           object_relative_url,
                                           message=self._message_invalid_version,

src/e/r/erp5-HEAD/product/ERP5Type/Constraint/Constraint.py   erp5(Download)
from Products.CMFCore.Expression import Expression
from Products.ERP5Type.interfaces import IConstraint
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from zope.interface import implements
 
    def _generateError(self, obj, error_message, mapping={}):
      """Generic method used to generate error in checkConsistency.
      """
      if error_message is not None:
        msg = ConsistencyMessage(self, 

src/e/r/erp5-HEAD/product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.ScriptConstraint.py   erp5(Download)
  def _createConsistencyMessage(self, object_relative_url, message):
    # XXX If I put in the right place I have TypeError: 'NoneType' object is not callable
    from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
    return ConsistencyMessage(self,
      object_relative_url=object_relative_url,

src/e/r/erp5-HEAD/product/ERP5Configurator/mixin/configurator_item.py   erp5(Download)
##############################################################################
 
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from Products.ERP5Type.Base import Base
from zLOG import LOG, INFO
  def _createConstraintMessage(self, message):
    return ConsistencyMessage(self,
        object_relative_url=self.getRelativeUrl(),
        message=message)
 

src/e/r/erp5-HEAD/product/ERP5Type/Base.py   erp5(Download)
from Products.ERP5Type.Accessor.TypeDefinition import asDate
from Products.ERP5Type.Message import Message
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
 
    def getUnauthorizedErrorMessage(constraint):
      return ConsistencyMessage(constraint,
                                object_relative_url=self.getRelativeUrl(),
                                message='There is something wrong.')
    error_list = UnrestrictedMethod(self._checkConsistency)(fixit=fixit)

src/e/r/erp5-HEAD/product/ERP5Type/tests/testConstraint.py   erp5(Download)
    self.assertEqual(1, len(consistency_message_list))
    message = consistency_message_list[0]
    from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
    self.assertTrue(isinstance(message, ConsistencyMessage))
    self.assertEqual(message.class_name, 'Attribute Equality Constraint')