← Back to team overview

openerp-india team mailing list archive

[Bug 948136] Re: search doesn't work for inactive (active=False) many2one

 

** Summary changed:

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

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/948136

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

Status in OpenERP Server:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/948136/+subscriptions


References