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

Is this a bug in search method? [Closed]

By
René Schuster
on 12/13/13, 7:59 AM 462 views

The Question has been closed for reason: not relevant or out dated

by
René Schuster
on 06/26/2014 09:24:23

I'm doing something like this:

for tmp_p_line in self.pool.get('timesheet.project.line.wizard').browse(cr, uid, tmp_p_line_ids, context=context):
        p_line_id = p_lines.search(cr, uid, [('timesheet_line_id','=',line_id), ('project_id','=',tmp_p_line.project_id)]);
        . 
        .
        .

And get the following error:

Traceback (most recent call last):
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\netsvc.py", line 292, in  dispatch_rpc
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\service\web_services.py", line 626, in dispatch
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\osv.py", line 188, in execute_kw
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\osv.py", line 131, in wrapper
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\osv.py", line 197, in execute
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\osv.py", line 185, in execute_cr
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\openerp\addons\custom_timesheet\wizard\custom_timesheet_wizard.py", line 25, in save_project_lines
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\orm.py", line 2358, in search
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\orm.py", line 4857, in _search
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\orm.py", line 4688, in _where_calc
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\expression.py", line 1223, in to_sql
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\tools\misc.py", line 252, in flatten
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\tools\misc.py", line 250, in flatten
File "C:\Program Files (x86)\OpenERP 7.0-20131016-232725\Server\server\.\openerp\osv\orm.py", line 494, in __iter__
NotImplementedError: Iteration is not allowed on browse_record(project.project, 7)

Since I am not trying to iterate the return values of a browse method with just one selected id, I don't know what's wrong.
When I was trying to trace the error back, I came up with the assumption that there might be something wrong with expression.expression in _where_calc.

Is there any bug?

0

René Schuster

--René Schuster--
1560
| 5 5 8
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster
On 12/13/13, 8:09 AM

The second domain tuple has been wrong.

('project_id', '=', tmp_p_line.project_id.id)

solved it.

About This Community

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

Question tools

0 follower(s)

Stats

Asked: 12/13/13, 7:59 AM
Seen: 462 times
Last updated: 3/16/15, 8:10 AM