0
File "/home/bellvantage/Documents/openerp-7.0/openerp-7.0/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: ...=1,write_date=(now() at time zone 'UTC') where id IN (false)
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

I tried to override the write function. in that i need to update another model's (bpl.company.define) column also.so i used the write() method.but its give above error & need to sort it. please advice me and explaint which parameters need to pass for the write() method (except cr,uid).

I upload my model class here. & view class here.

Line number 100 in bpl.py

Ok its sorted friend.issue with my entered data in database.the data which is going to read is null.so thats return false and error comes like that :-)

5
  • 1
    id IN (false) looks incorrect. id is probably integer, and false is boolean. Commented Apr 11, 2013 at 4:34
  • 1
    plz provice information when you got this error? Commented Apr 11, 2013 at 5:08
  • 1
    yes as user@AnomA said, division_id get false instead of id , so when going to browse with false record it generate error.You have to check first is division_id exits or not then go to browse. Commented Apr 11, 2013 at 5:14
  • 1
    post edited.then how to write correct write() method. need to update records in another table at create() method calling time Commented Apr 11, 2013 at 5:21
  • 1
    you need to check first, if there is a valid id is getting.you are doing wrong. why you want to write the employe number to division each time when you save the record?if the user change the division id then only you have to write the employee id.you need to add a check condition whether the divisionid is false or not Commented Apr 11, 2013 at 5:30

2 Answers 2

1

I think in the create function in the file bpl.py, division_id you get is false and you try to browse the record which is a none type object and then trying to write to it. Please check whether you a correct id for division_id.

Sign up to request clarification or add additional context in comments.

1 Comment

Ok its sorted friend.issue with my entered data in database.the data which is going to read is null.so thats return false and error comes like that :-)
1

The "now() at time zone .........." looks suspiciously like SQL which should be a Python string enclosed in double quotes and not bare words.

1 Comment

thanks its sorted. issue with I'm refer null value (because called list hasn't records yet )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.