search doesn't work for inactive (active=False) many2one

Bug #948136 reported by Ronald Portier (Therp)
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

It proves impossible to search for records that have a value in a many2one field that refers to an inactive record.

This is totally counter_intuitive!!

Example:

I have a list with questions handled by certain users.

The model 'questions' contains this:
_columns = {
.....
    'user_id': fields.many2one(
            'res.users', 'User', select=True, required=True),
.... },

When I display the list of questions withouth entering search criteria I can see any and all questions wether from active of from
inactive users. However when I want to filter the list to find all questions delegated to a now inactive user, I will not find ANY question by these users, even though they are visible in the full list.

This appears to be the default for any search view.

I can create a work-around by adding the following ridiculous domain to the user field in the search view:

<field name="user_id" select="1" string="User" domain="['|',('active','=',False),('active','=',True)]" />

I can understand that when entering fields in a form, it is desirable not to show inactive records. That is what inactive means: do not use for new values / table rows. But making it - except for the workaround described above - impossible to find table rows that refer to inactive records is IMHO plain wrong.

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
Amit Parik (amit-parik)
summary: - search on inactive many2one
+ search doesn't work for inactive (active=False) many2one
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.