Odoo Help

Welcome!

This community 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.

0

problem fetching all record_ids from table [Closed]

By
remi mores
on 7/19/13, 8:06 AM 804 views

The Question has been closed for reason: duplicate question

by
Ray Carnes
on 07/20/2013 01:56:56

i have a problem fetching existing rows in a table, (i checked with pgadmin)

agreement_model = self.pool.get('account.periodical_invoicing.agreement')
agreement_model.search(cr,uid,[])

Returns an empty list??? From a table with existing records???

>

agreement_model = self.pool.get('account.periodical_invoicing.agreement')
agreement_model.browse(cr,uid,[1]):

When i specify an existing id i effectively get a browse record?

How can that be if search(cr,uid,[]) returns an empty list?

how is it possible that search returns no id's, but browse() decides to return a record (if i explicitly specify an id)?

I read this in the documentation:

search(cr, user, args, offset=0, limit=None, order=None, context=None, count=False)

args -- list of tuples specifying the search domain [('field_name', 'operator', value), ...].

Pass an empty list to match all records.

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/19/13, 8:06 AM
Seen: 804 times
Last updated: 3/16/15, 8:10 AM