Community mailing list archives

community@mail.odoo.com

Re: Key Error

by
Camptocamp SA, Yannick Vaucher
- 02/05/2015 10:55:08
It might be

_inherit = "mrp_repair"

Try this instead

_inherit = "mrp.repair"


Yannick Vaucher
Business Solutions Software Developer

Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 30
Office: +41 21 619 10 10

On Thu, Feb 5, 2015 at 4:52 PM, Guido Schaidl <guidoscha@arcor.de> wrote:
Hello everyone,

I tryed wo write my first application for Odoo an i got an error i can't 
get solved. The application extends the mrp_repair module. I tried to 
reduce the code to find the error but didn't get it.

Here are my files:


mrp_repair_update.xml:


  
     
         
         
             mrp_repair.update
             mrp.repair.form
             
             
                 
                     
                         
                             
                             
                         
                     
                 
             
         

     





__init__.py:

# -*- coding: utf-8 -*-
import controllers
import mrp_repair_update




__openerp__.py:

# -*- coding: utf-8 -*-
{
     'name': "mrp_repair_update",

     'summary': """
         Add new fields to mrp_repair form
         apps.openerp.com""",

     'description': """
         Long description of module's purpose
     """,

     'author': "G",
     'website': "http://www.yourcompany.com",

     # Categories can be used to filter modules in modules listing
     # Check 
https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml
     # for the full list
     'category': 'Uncategorized',
     'version': '0.1',

     # any module necessary for this one to work correctly
     'depends': ['base'],

     # always loaded
     'data': [
         # 'security/ir.model.access.csv',
         'templates.xml', 'views/mrp_repair_update.xml',
     ],
     # only loaded in demonstration mode
     'demo': [
         'demo.xml',
     ],
}


mrp_repair_update.py:



# -*- coding: utf-8 -*-


from openerp.osv import fields, osv


class mrp_repair_update(osv.osv):
     _inherit = "mrp_repair"
     Kommission = fields.char(string="Kommission", required=True)
     freigabe_durch1 = fields.char(string="Freigabe durch")


The Error is KeyError:'mrp_repair'. Google says that it has something to 
do with the import of files. But the view and the py file are already 
imported.

Can someone help me out?

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe