Thanks for the bug report. The fix is available in trunk at revision
3735 (revision-id: [email protected]).

** Changed in: openobject-server
       Status: Fix Committed => Fix Released

** Changed in: openobject-server
    Milestone: 6.0.2 => None

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

Title:
  [TRUNK 3330] Search on mixed conditions including one2many and
  active=False is wrongly interpreted

Status in OpenERP Server:
  Fix Released

Bug description:
  sample of condition

  [('category_id.code','=','PATIENT'),('active',=,False)]

  Description

  When server parse

  1 = search all partner with category code = patient , and add active =
  True

  2= search all partner active = False

  Result = Found nothing, because  active condiction not used in
  one2many search

  
  My solution (not the optimal solution, no time to do it)

  
  before line 111   (i = -1)

  add

      active = False
      for exp in self.__exp:
          if exp[0] == 'active':
              active = exp

  replace line 153 (right1 = table.search(cr, uid, [(fargs[0],'in',
  right)], context=context))

  by

                  if active:                        
                      right1 = table.search(cr, uid, [(fargs[0],'in', 
right),active], context=context)
                  else:
                      right1 = table.search(cr, uid, [(fargs[0],'in', right)], 
context=context)


  Note: in my example, Code is a field added in res.partner.category, so
  to test it, bmaybe use field name.

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

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to