Odoo Help


AttributeError: "Field 'coef' does not exist in object 'browse_record(school.matiere, 1)'"

on 6/19/13, 12:43 PM 3,010 views

Hi everyone i have this error when i try to add a new item: AttributeError: "Field 'coef' does not exist in object 'browse_record(school.matiere, 1)'"

any idea please

Class school_matiere(osv.osv):
''' matiere '''
_description ='Information sur les matieres'
_name = 'school.matiere'

_columns = {
    'name': fields.char('libelle matiere', size=64, required=True, select=1),
    'code': fields.char('Code matiere', size=20, required=True, select=1),
    'coef_mat': fields.integer('coefficient matiere'),
    'teacher_id': fields.many2one('hr.employee', 'Professeur'),


<record model="ir.ui.view" id="view_school_matiere_form">
        <field name="name">school.matiere.form</field>
        <field name="model">school.matiere</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Matiere" version="7.0">
                <group col="6" colspan="4">
                    <field name="teacher_id" domain="[('job_id.name','=','prof')]"/>
                    <field name="name" />
                    <field name="code" />
                     <field name="coef_mat"/>
     <record model="ir.ui.view" id="view_school_matiere_tree">
        <field name="name">school.matiere.tree</field>
        <field name="model">school.matiere</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="classe Information" editable="bottom">
                <field name="name" />
                <field name="code" />
        <record model="ir.ui.view" id="view_school_matiere_search">
        <field name="name">school.matiere.search</field>
        <field name="model">school.matiere</field>
        <field name="type">search</field>
        <field name="arch" type="xml">
            <search string="Search">
            <group col="10" colspan="4">
                <field name="name" select="1"/>
                <separator orientation="vertical"/>
                <field name="code" select="1"/>
            <group expand="0" string="Group By" colspan="12" col="10">
                <filter icon="terp-stock_symbol-selection" string="Matiere" help="Matiere"  context="{'group_by':'name'}"/>
                <separator orientation="vertical"/>
                <filter icon="terp-personal" string="Code" help="code" context="{'group_by':'code'}"/>
                <separator orientation="vertical"/>

    <!-- Niveau Information Action -->
    <record model="ir.actions.act_window" id="action_school_matiere_form">
        <field name="name">Matiere</field>
        <field name="res_model">school.matiere</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
 <menuitem name="matiere" action="action_school_matiere_form" id="matiere" parent="menu_base" />



| 5 4 7
Baarn, Netherlands
On 6/20/13, 4:59 PM

The message is about the module school_matiere not having a field called coef.

Your class school_matiere has defined the field 'coef_mat'. In all your code, I do not see coef.

Have you used coef in the past as field name? If so, reinstalling your module will fix this issue (what Ghanshyam Prajapati already said).

If you call some where else in a module the class school_matiere, have a look at that code.

Hi thank you for your reply,as i said to Ghanshyam Prajapati i updated my module and resolve the problem

on 6/20/13, 5:31 PM

Ghanshyam Prajapati

--Ghanshyam Prajapati--

| 4 4 8
Pune, India
--Ghanshyam Prajapati--
OpenERP Developer
Ghanshyam Prajapati
On 6/19/13, 1:44 PM

Hi, Oumaima

Please reinstall your module by command line like this :

-Go to your server path in command prompt(Terminal)

-Restart your server with following command for 7.0

python open-server --addons-path=your_addons_path -d database_name -u app_name

Hope this work for you.

Hi thank you for your reply; i tried this solution but it doesn't work.Finally i updated my module and get around the problem

on 6/20/13, 5:29 PM

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

0 follower(s)


Asked: 6/19/13, 12:43 PM
Seen: 3010 times
Last updated: 3/16/15, 8:10 AM