broken search on fields.related for simple cases

Bug #1018497 reported by Florent
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

Hello,

when the related field is used as an alias of another field of the same object, the search is broken.
This is with branch 6.1.

This happens with following context:
 - field is "fields.related"
 - store=False
 - only 1 chained element (field is an alias of another field of the current model)

Example below:

(1) When using the search method with domain [('report_broken', '=', False)] it breaks
(2) with domain [('report_file', '=', False)] it succeeds

class TestRelated(osv.osv):
    _name = 'test.related.bug'

    _columns = {
        'report_rml': fields.char('Main report file path', size=256),
        'report_broken': fields.related('report_rml', type="char", size=256, string='Report file'),
        'report_file': fields.related('report_rml', type="char", size=256, string='Report file', store=True),
    }

TestRelated()

Related branches

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.