← Back to team overview

openerp-india team mailing list archive

[Bug 493657] Re: relational custom fields incompatible with server update: AttributeError: 'NoneType' object has no attribute '_table'

 

Hi.
I'm working under v6.1 (ubuntu & windows).
I still get the bug:
when I create a custom field under web interface, then later i decide to add it directly in the code :

Client Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\openerp\addons\web\common\http.py", line 180, in dispatch
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\openerp\addons\web\controllers\main.py", line 466, in authenticate
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\openerp\addons\web\common\session.py", line 73, in authenticate
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\openerp\addons\web\common\openerplib\main.py", line 117, in proxy
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\openerp\addons\web\common\http.py", line 611, in send


Server Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\openerp\addons\web\common\http.py", line 592, in send
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\netsvc.py", line 360, in dispatch_rpc
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\service\web_services.py", line 384, in dispatch
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\service\web_services.py", line 395, in exp_authenticate
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\pooler.py", line 50, in get_pool
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\pooler.py", line 33, in get_db_and_pool
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\modules\registry.py", line 138, in get
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\modules\registry.py", line 160, in new
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\modules\loading.py", line 334, in load_modules
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\modules\loading.py", line 253, in load_marked_modules
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\modules\loading.py", line 170, in load_module_graph
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\modules\module.py", line 378, in init_module_models
  File "C:\Program Files (x86)\OpenERP 6.1-1\server\.\openerp\osv\orm.py", line 2935, in _auto_init
AttributeError: 'NoneType' object has no attribute '_table'

It's gonna be a critical issue for me!!!!
Thanks in advance.

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/493657

Title:
  relational custom fields incompatible with server update:
  AttributeError: 'NoneType' object has no attribute '_table'

Status in OpenERP Server:
  Fix Released

Bug description:
  On server 5.0 (rev: 1902), create a new database with minimal profile, install addons product and delivery.
  Add a custom m2o field 'x_test' on product.product pointing to delivery.carrier .

  Restart the server with --update=product and you'll get this kind of stacktrace:
  [2009-12-07 18:13:09,168] INFO:init:module product: creating or updating database tables
  Traceback (most recent call last):
    File "./bin/openerp-server.py", line 111, in <module>
      pooler.get_db_and_pool(db, update_module=tools.config['init'] or tools.config['update'])
    File "/home/xafer/openerp/5.0/server-5.0/bin/pooler.py", line 40, in get_db_and_pool
      addons.load_modules(db, force_demo, status, update_module)
    File "/home/xafer/openerp/5.0/server-5.0/bin/addons/__init__.py", line 738, in load_modules
      r = load_module_graph(cr, graph, status, report=report)
    File "/home/xafer/openerp/5.0/server-5.0/bin/addons/__init__.py", line 581, in load_module_graph
      init_module_objects(cr, package.name, modules)
    File "/home/xafer/openerp/5.0/server-5.0/bin/addons/__init__.py", line 366, in init_module_objects
      result = obj._auto_init(cr, {'module': module_name})
    File "/home/xafer/openerp/5.0/server-5.0/bin/osv/orm.py", line 1915, in _auto_init
      ref = self.pool.get(f._obj)._table
  AttributeError: 'NoneType' object has no attribute '_table'

  
  As far as I understand, the 'x_test' custom field is loaded with the rest of the product.product fields before the delivery addon is actually loaded, making it point to a currently unknown 'delivery.carrier' object known in the stacktrace as 'NoneType'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/493657/+subscriptions