← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 731698] [NEW] module recorder: 'NoneType' object has no attribute 'search'

 

On Wednesday 09 March 2011, you wrote:
> Public bug reported:

> "/home/ana/openerp6.0.sep/server/openerp/addons/base_module_record/wizard/
> base_module_record_objects.py", line 89, in _record_objects
> search_ids=obj_pool.search(cr,uid,search_condition)
> AttributeError: 'NoneType' object has no attribute 'search'

Typical case: your db references an object that doesn't exist in the pool. Did 
you create an ORM  model and then removed it from python (or renamed or didn't 
load that module) ?
It most probably is not a bug there, but an failure after hacking the orm 
model (happens to us all the time, when we are developing).
In pg84 series I have an extra warning when pool.get('some.missing.model') 
can't find it. Helps me debug my code.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/731698

Title:
  module recorder:  'NoneType' object has no attribute 'search'

Status in OpenERP Modules (addons):
  New

Bug description:
  Imposible recording a new module on 6.0. Obtaining this error:

  Environment Information : 
  System : Linux-2.6.31-22-generic-i686-with-Ubuntu-9.10-karmic
  OS Name : posix
  Distributor ID:	Ubuntu
  Description:	Ubuntu 9.10
  Release:	9.10
  Codename:	karmic
  Operating System Release : 2.6.31-22-generic
  Operating System Version : #65-Ubuntu SMP Thu Sep 16 15:48:58 UTC 2010
  Operating System Architecture : 32bit
  Operating System Locale : es_ES.UTF8
  Python Version : 2.6.4
  OpenERP-Client Version : 6.1-dev
  Last revision No. & ID :1830 launchpad_translations_on_behalf_of_openerp-20110305045540-8wjqhcc2lqvrfh9i
  Traceback (most recent call last):
    File "/home/ana/openerp6.0.sep/server/openerp/netsvc.py", line 410, in dispatch
      result = ExportService.getService(service_name).dispatch(method, auth, params)
    File "/home/ana/openerp6.0.sep/server/openerp/service/web_services.py", line 635, in dispatch
      res = fn(db, uid, *params)
    File "/home/ana/openerp6.0.sep/server/openerp/service/web_services.py", line 662, in exp_execute
      return self._execute(db, uid, wiz_id, datas, action, context)
    File "/home/ana/openerp6.0.sep/server/openerp/service/web_services.py", line 644, in _execute
      return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
    File "/home/ana/openerp6.0.sep/server/openerp/wizard/__init__.py", line 177, in execute
      res = self.execute_cr(cr, uid, data, state, context)
    File "/home/ana/openerp6.0.sep/server/openerp/wizard/__init__.py", line 81, in execute_cr
      res['action'] = result_def['action'](self, cr, uid, data, context)
    File "/home/ana/openerp6.0.sep/server/openerp/addons/base_module_record/wizard/base_module_record_objects.py", line 89, in _record_objects
      search_ids=obj_pool.search(cr,uid,search_condition)
  AttributeError: 'NoneType' object has no attribute 'search'



References