Odoo Help


SQL error using custom module: ProgrammingError: operator does not exist: text = integer

Ash Muir
on 4/3/13, 9:00 AM 1,353 views

I've been developing a custom module which allows you to store data on multiple sites a company owns, and gas/electric meters installed at that location. When I try and save a new site record it throws the error. Not sure what I've done wrong.

error here pastebin.com/UzSGZmVG

code here pastebin.com/5MNMuBrF (I commented out the required=True to see if that was causing the issue).

view here pastebin.com/H7sSrQat


Priyesh Solanki (pso)

--Priyesh Solanki (pso)--

| 2 2 4
--Priyesh Solanki (pso)--
Priyesh Solanki (pso)
On 4/3/13, 9:35 AM

There is an issue with one2many/many2one definition of meter/site. site --> one2many --> meter meter --> many2one --> site

means in site object, meter_ref should be many2one of meter but it is defined as text field and that's why its throwing an error. You may also get the same for site --> partner relationship.

Hope it will help you.

Thanks, Priyesh Solanki

Thanks, I have fixed the error. But now I am more confused, I didn't add in an inverse field for site_owner, it just links to res.partner and shows the name field which is how I want it.

Code now. pastebin.com/mn10kdR4

This doesn't work entirely as desired, for instance MPAN is showing in the notebook listing instead of meter_ref and there's an unknown field (presumably the new many2one) when adding a new meter.

Ash Muir
on 4/3/13, 10:17 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/3/13, 9:00 AM
Seen: 1353 times
Last updated: 3/16/15, 8:10 AM