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

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

src/e/r/erp5-HEAD/product/ERP5/Tool/TrashTool.py   erp5(Download)
      new_trash_id = '%s_%s' % (getBaseTrashId(), n)
    # create trash bin
    trashbin = self.newContent( portal_type     = 'Trash Bin'
                              , id              = new_trash_id
                              , title           = bt_title

src/e/r/erp5-HEAD/product/ERP5/Tool/ContributionTool.py   erp5(Download)
    if temp_object:
      # For temp_object creation, use the standard method
      return BaseTool.newContent(self, portal_type=portal_type, **kw)
 
    # Then put the file inside ourselves for a short while
    else:
      if not portal_type:
        document = BaseTool.newContent(self, id=id,
                                      portal_type=portal_type,
                                      is_indexable=0)

src/e/r/erp5-HEAD/product/ERP5/Tool/TemplateTool.py   erp5(Download)
      try:
        # create bt object
        bt = self.newContent(portal_type='Business Template', id=id)
        prop_dict = {}
        for prop in bt.propertyMap():
        file_list.sort()
        # import bt object
        bt = self.newContent(portal_type='Business Template', id=bt_id)
        bt_path = os.path.join(path, 'bt')
 

src/e/r/erp5-HEAD/product/ERP5/Tool/SolverProcessTool.py   erp5(Download)
 
    # Create an empty solver process
    new_solver = self.newContent(portal_type='Solver Process',
                                 temp_object=temp_object)
    # And build decisions

src/e/r/erp5-HEAD/product/ERP5Form/PreferenceTool.py   erp5(Download)
    if self.getActiveSystemPreference() is not None:
      raise ValueError("Another Active Preference already exists.")
    system_preference = self.newContent(portal_type='System Preference')
    system_preference.enable()
 
        raise ValueError("User %r not found" % (username, ))
      newSecurityManager(None, user.__of__(user_folder))
      preference = self.newContent(portal_type='Preference')
      if enable:
        preference.enable()

src/e/r/erp5-HEAD/product/ERP5/Tool/IdTool.py   erp5(Download)
      else:
        raise ValueError('Failed to gererate id')
    return BaseTool.newContent(self, *args, **kw)
 
  def _get_id(self, id):