Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Here's my model :
from openerp import models, fields, api, tools class Searches(models.Model): _name = 'user.search' search = fields.Char('Searches made by users',required=True) nb_searches = fields.Integer('Number of searches for this phrase',required=True) def a_function(sef,cr,uid,context=None): return None
And when I try to search in it :
self.search(cr, uid, )
I've got the following error :
AttributeError: 'user.search' object has no attribute '_ids'
What's wrong ? The user_search table have an 'id' attribute ... I don't what what I did wrong.
Now Seach function returns directly a RecordSet:
ids = self.search()
You can do a search using env:
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 4/30/15, 5:51 AM|
|Seen: 5933 times|
|Last updated: 5/3/15, 2:21 PM|