Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Cannot get project.issue from pool

by
Wolfgang Pichler
- 09/12/2014 05:23:36
Hi,

just a guess - but maybe project.task is already loaded at this time, and project.issue not ?

What does _logger.debug('Current Pool: %r', pool) say ?

br,
Wolfgang


2014-09-12 11:18 GMT+02:00 Maxim Litnitskiy <litnimaxster@gmail.com>:
Hi all!
Spent hours trying to trace this issue but no results.
This works:

    def __init__(self, pool, cr):                                                                                                                                       
        print pool['project.task']                                                                                                                                        


This does not work:
    def __init__(self, pool, cr):                                                                                                                                       
        print pool['project.issue']                                                                                                                                        

Error:
  File "/srv/odoo/openerp/modules/registry.py", line 101, in __getitem__
    return self.models[model_name]
KeyError: 'project.issue'

_name = 'project.issue'

Please advise. I am stuck.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe