Bug: Many2One relationships --- account_invoice_production_lot

Bug #1277623 reported by Med Said BARA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Account - Invoicing Reports
Invalid
Undecided
Unassigned

Bug Description

Hi;

When trying to install "account_invoice_production_lot" i get this error:

'Many2One relationships from non-transient Model to TransientModel are forbidden'
AssertionError: Many2One relationships from non-transient Model to TransientModel are forbidden

Here after my log:
openerp.modules.module: module account_invoice_production_lot: creating or updating database tables
2014-02-07 16:23:33,107 2453 ERROR DevDB openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr
    return fct_src(cr, uid, model, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 424, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 475, in _button_immediate_function
    _, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 39, in restart_pool
    registry = RegistryManager.new(db_name, force_demo, status, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 233, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 354, in load_modules
    loaded_modules, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 256, in load_marked_modules
.
.
.
.
 File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3208, in _auto_init
    self._m2o_add_foreign_key_checked(k, dest_model, f.ondelete)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2906, in _m2o_add_foreign_key_checked
    'Many2One relationships from non-transient Model to TransientModel are forbidden'
AssertionError: Many2One relationships from non-transient Model to TransientModel are forbidden
2014-02-07 16:23:33,117 2453 DEBUG DevDB openerp.addons.web.http: <--
{'error': {'code': 200,
           'data': {'debug': 'Client Traceback (most recent call last):\n File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch\n response["result"] = method(self, **self.params)\n File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1132, in call_button\n action = self._call_kw(req, model, method, args, {})\n File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1120, in _call_kw\n return getattr(req.session.model(model), method)(*args, **kwargs)\n File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy\n result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)\n File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method\n result = self.session.send(self.service_name, method, *args)\n File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send\n raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)\n\n\nServer Traceback (most recent call last):\n File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send\n return openerp.netsvc.dispatch_rpc(service_name, method, args)\n File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc\n result = ExportService.getService(service_name).dispatch(method, params)\n File "/usr/lib/pymodules/python2.7/openerp/addons/hotdebug/hook.py", line 124, in wrapped\n return fn(*args, **kw)\n File "/usr/lib/pymodules/python2.7/openerp/addons/hotdebug/hook.py", line 67, in wrapped\n return fn(*args, **kw)\n File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch\n res = fn(db, uid, *params)\n File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw\n return self.execute(db, uid, obj, method, *args, **kw or {})\n File "/usr/lib/pymodules/python2.7/openerp/addons/anybus_trigger_user/trigger.py", line 82, in execute\n res = openerp_execute(self, db, uid, obj, method, *args, **kw)\n File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper\n return f(self, dbname, *args, **kwargs)\n File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute\n res = self.execute_cr(cr, uid, obj, method, *args, **kw)\n File "/usr/lib/pymodules/python2.7/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr\n return fct_src(cr, uid, model, method, *args, **kw)\n File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr\n return getattr(object, method)(cr, uid, *args, **kw)\n File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 424, in button_immediate_install\n return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)\n File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 475, in _button_immediate_function\n _, pool = pooler.restart_pool(cr.dbname, update_module=True)\n File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 39, in restart_pool\n registry = RegistryManager.new(db_name, force_demo, status, update_module)\n File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 233, in new\n openerp.modules.load_modules(registry.db, force_demo, status, update_module)\n File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 354, in load_modules\n loaded_modules, update_module)\n File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 256, in load_marked_modules\n loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)\n File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 165, in load_module_graph\n init_module_models(cr, package.name, models)\n File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 374, in init_module_models\n result = obj._auto_init(cr, {\'module\': module_name})\n File "/usr/lib/pymodules/python2.7/openerp/addons/smile_base/orm.py", line 42, in new_auto_init\n res = native_auto_init(self, cr, context)\n File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3208, in _auto_init\n self._m2o_add_foreign_key_checked(k, dest_model, f.ondelete)\n File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2906, in _m2o_add_foreign_key_checked\n \'Many2One relationships from non-transient Model to TransientModel are forbidden\'\nAssertionError: Many2One relationships from non-transient Model to TransientModel are forbidden\n',
                    'fault_code': u'Many2One relationships from non-transient Model to TransientModel are forbidden',
                    'type': 'server_exception'},
           'message': 'OpenERP Server Error'},
 'id': 'r78',
 -----------------------------------
Perhaps because "stock.production.lot" is a transient model

Best regards.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

I can install account_invoice_production_lot without problems and stock.production.lot is not a transient model.
So, I'm not able to reproduce the bug.

It seems your problem is related to other modules

Changed in account-invoice-report:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.