← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 845528] Re: invalid domain expression evaluation

 

Hello,
Would you please check this again with latest trunk server code because I did not find the specified code in current expression.py file.
My trunk server revision is : 3659 al@xxxxxxxxxxx-20110926005444-a7vqjb05vep7xbvj

Thanks.

** Changed in: openobject-server
       Status: New => Incomplete

-- 
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