Odoo Help


This community 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.


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

Ash Muir
on 4/3/13, 9:00 AM 899 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)--
Tiny ERP Pvt Ltd
| 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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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