Odoo Help

Welcome!

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.

0

Error in school module

By
Merlin TecSol Pvt. Ltd.
on 4/9/13, 4:27 AM 871 views

I am trying to install School Module of tecnoba in OpenERP 6 but I am getting this error message:

typeerror int() argument must be a string or a number not 'built in function or method'

I checked the XML (school_base_demo.xml) but could not understand as to what to change.

The XML code is:

<record id="school_course_line_0" model="school.course.line">
            <field eval="ref('school_course_0')" name="course_id"/>
            <field eval="ref('school_offer_0')" name="offer_id"/>
            <field name="needly">required</field>
            <field name="weekly_hours" eval="4" />
        </record>

Any ideas as to how to solve this?

TIA

1

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 4/9/13, 5:27 AM

The message you receive is about python error.

The function int() expects to get a string or a number, but somehow it is given a 'built in function or method'.

In the XML code you use the function eval, which will run python code. You pass it a ref('school_course_0'), which is a function. This will cause the function eval to generate the error, because the field course_id is int4.

It looks like you want to store the school_course_0 in the field course_id, this is possible when school_course_0 is an ID of the course. Than you do not have to use eval, just assign it (maybe use school_course_o.id instead of school_course_0).

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

2 follower(s)

Stats

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