← Back to team overview

openerp-india team mailing list archive

[Bug 1067368] Re: Model registry fails silently.

 

The pool should be seen as a dictionary. Using pool[model] or
pool.get(model) should work similarly to a dict: get() returns None when
the key is not in the dict. (Although the get() on the pool doesn't
accepts a default value as a second argument.) __getitem__ will raise an
exception if the key is not in the dict.

The fact a model couldn't be loaded although it was requested is
reported at the time of the pool creation.

** Changed in: openobject-server
       Status: New => Invalid

-- 
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/1067368

Title:
  Model registry fails silently.

Status in OpenERP Server:
  Invalid

Bug description:
  Hi,

  I find it quite awkward that when I try to access some model which in
  not in the pool it fails silently giving None as a result. Instead it
  should give some proper error message that it failed to load the given
  model or the given model is invalid(check it giving something like
  self.pool.get('LOL')).

  Thanks and Regards!
  Vivek Poddar

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


References