Odoo Help


self.pool.get('product.category') is none

lam a bao
on 11/14/13, 12:08 AM 2,015 views

from openerp.osv import osv, fields

class cvs_quotations(osv.osv): _name = "cvs.quotations"

def GetDataDoorssystem(self, cr, uid, context=None):
    product_category_obj = self.pool.get('product.category')
    ids = product_category_obj.search(cr, uid, [])
    datas = product_category_obj.read(cr, uid, ids, ['id', 'name'], context)
    return [(r['id'], r['name']) for r in datas]

_columns = {
    "saleordercode": fields.char("Sale order Code", translate=True),
    "doorsystem": fields.selection(GetDataDoorssystem, "Chọn hệ cửa", translate=True),


when i execute this class ,it error : 'NoneType' object has no attribute 'search' .Because self.pool.get('product.category') is none .Can you help me ?

Thanks hungnt skype:lamabao_lovely

Julien Laloux
On 11/14/13, 8:59 AM

Does your __openerp__.py contains the dependency on product module?


lam a bao
on 11/20/13, 4:45 AM

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 11/14/13, 1:24 AM

Hello lam a bao,

I guess you didn't install product module. Make sure product module is installed if not then install it and then try your code.


Serpent Consulting Services.

but I have installed the product module

lam a bao
on 11/14/13, 3:13 AM
lam a bao
On 11/14/13, 3:12 AM


But I have installed the product module

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 11/14/13, 12:08 AM
Seen: 2015 times
Last updated: 3/16/15, 8:10 AM