Do many2one fields have to be named like 'othermodel_id'?
I had a many2one field on my Course model to a Major model that I had named 'major,' and when I tried to select a major for my course (say Calculus for Mechanical Engineering) I got a generic validation error. And in my console I had the bad SQL update query where it failed:
2016-07-12 18:55:34,530 5484 INFO test openerp.sql_db: bad query: UPDATE
"aidentest_course" SET "major"=14,"write_uid"=1,"write_date"=(now() at time
zone 'UTC') WHERE id IN (6)
I renamed 'major' to 'major_id', upgraded my module and now I can add majors. Does the many2one have to be 'tomodel_id' and if so, why?