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

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

src/e/r/erp5-HEAD/product/ERP5/Constraint/DocumentReferenceConstraint.py   erp5(Download)
    for property_id in ('reference', 'language', 'version'):
      if document.getProperty(property_id) in (None, ''):
        error_list.append(self._generateError(document,
             self._getMessage('message_property_not_defined'),
             mapping=dict(property_id=property_id)))
    res = list(res)
    if len(res) == 2: # this document and another document
      error_list.append(self._generateError(document,
                self._getMessage('message_another_document_exists'),
                mapping=dict(document_reference=document.getReference(),
      # this is very serious since there are many document with the same
      # reference
      error_list.append(self._generateError(document,
                self._getMessage('message_multiple_documents_exists'),
                mapping=dict(document_count=len(res),

src/e/r/erp5-HEAD/product/ERP5/Constraint/AccountTypeConstraint.py   erp5(Download)
    if getattr(obj, 'getAccountType', _MARKER) is _MARKER:
      errors.append(self._generateError(
        obj,
        translateString("Account does not have account_type category")))
    else:
        if obj.isMemberOf(category):
          if obj.getAccountType() not in account_type_list:
            errors.append(self._generateError(obj,
                self._getMessage('message_inconsistent_account_type'),
                # XXX we should probably print translated logical path of

src/e/r/erp5-HEAD/product/ERP5/Constraint/AccountingTransactionBalance.py   erp5(Download)
          precision = section_currency.getQuantityPrecision()
        if round(total, precision) != 0:
          error_list.append(self._generateError(obj, self._getMessage(
                'message_transaction_not_balanced_for_source'),
                mapping=dict(section_title=section.getTranslatedTitle())))
          precision = section_currency.getQuantityPrecision()
        if round(total, precision) != 0:
          error_list.append(self._generateError(obj, self._getMessage(
                'message_transaction_not_balanced_for_source'),
                mapping=dict(section_title=section.getTranslatedTitle())))

src/e/r/erp5-HEAD/product/ERP5/Constraint/TradeModelLineCellConsistency.py   erp5(Download)
    for cell_coordinates in document.getCellKeyList(base_id=base_id):
      if document.getCell(base_id=base_id, *cell_coordinates) is None:
        error_list.append(self._generateError(document,
          self._getMessage('message_cell_inexistance'),
          mapping=dict(line=document.getTitle())))

src/e/r/erp5-HEAD/product/ERP5/Constraint/ResourceMeasuresConsistency.py   erp5(Download)
 
    error = lambda msg, **kw: error_list.append(
      self._generateError(obj, self._getMessage(msg), mapping=kw))
 
    getCategoryValue = portal.portal_categories.getCategoryValue

src/s/l/slapos.core-HEAD/master/bt5/slapos_cloud/ConstraintTemplateItem/SoftwareInstanceXmlValidationConstraint.py   slapos.core(Download)
        tree = etree.fromstring(obj.getTextContent())
      except etree.XMLSyntaxError:
        error_list.append(self._generateError(obj,
                            self._getMessage('message_xml_garbaged')))
      except ValueError:
        error_list.append(self._generateError(obj,
          mapping = {}
          mapping['xml_error'] = xml_schema.error_log.filter_from_errors()[0]
          error_list.append(self._generateError(obj,
                              self._getMessage('message_xml_garbaged'),
                              mapping))

src/e/r/erp5-HEAD/product/ERP5/Constraint/BudgetConsumptionFeasability.py   erp5(Download)
            object
        # Add error
        errors.append(self._generateError(object, error_message))
      else:
        budget_cell = result[0]
              budget_cell
          # Add error
          errors.append(self._generateError(object, error_message))
 
      return errors

src/e/r/erp5-HEAD/product/ERP5Type/Constraint/ContentExistence.py   erp5(Download)
            [str(Message('erp5_ui', pt)) for pt in portal_type])
      # Add error
      error_list.append(self._generateError(obj,
                          self._getMessage(message_id), mapping))
    return error_list

src/e/r/erp5-HEAD/product/ERP5/Constraint/TransactionQuantityValueValidity.py   erp5(Download)
                            'TMQ = %.2f' % max_quantity
            # Add error
            errors.append(self._generateError(object, error_message))
      return errors
 

src/e/r/erp5-HEAD/product/ERP5/Constraint/TransactionQuantityValueFeasability.py   erp5(Download)
                              (object_quantity, balance, node_title, node)
              # Add error
              errors.append(self._generateError(object, error_message))
      return errors