← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 845528] Re: invalid domain expression evaluation

 

Hello,

i'm still working with the last stable release (6.0.3) for which this
ticket applies. Indeed the code has been changed in the 6.1.

Regards,
fc

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/845528

Title:
  invalid domain expression evaluation

Status in OpenERP Server:
  Incomplete

Bug description:
  In bin/osv/expression.py:153, the left operand should be fargs[0], not
  "id", the resulting SQL query being otherwise incorrect.

      152                     if right == []:
      153                         self.__exp[i] = (fargs[0], '=', 0 )
      154                     else:
      155                         self.__exp[i] = (fargs[0], 'in', right)

  instead of:

      152                     if right == []:
      153                         self.__exp[i] = ( 'id', '=', 0 )
      154                     else:
      155                         self.__exp[i] = (fargs[0], 'in', right)

  test:
    * write a domain [('some_field.id','in',some_calculation_resulting_in_an_empty_array_at_runtime)]
    * actual result after parsing: [('id','=',0)] (SQL: id IS NULL)
    * expected result after parsing: [('some_field','=',0)] (SQL: some_field IS NULL)

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


References