I try to write my first App and it works as long as i don't restart the server. The window stays blank or i get an internal server error. Log says Key Error: mrp.repair.
Here is my code (shorted already for tracking the issue):
__init__.py
# -*- coding: utf-8 -*-
import controllers
import models
import mrp_repair_update
__openerp__.py
# -*- coding: utf-8 -*-
{
'name': "mrp_repair_update",'summary': """
Short (1 phrase/line) summary of the module's purpose, used as
subtitle on modules listing or apps.openerp.com""",'description': """
Long description of module's purpose
""",'author': "G. S.",
'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_view.xml',
],
# only loaded in demonstration mode
'demo': [
'demo.xml',
],
}
mrp_repair_update.py
# -*- coding: utf-8 -*-
from openerp import fields, models
class mrp_repair_update(models.Model):
_inherit = "mrp.repair"
Kommission = fields.Char(string="Kommission", required=True)
mrp_update_view.xml
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- Add instructor field to existing view -->
<record model="ir.ui.view" id="mrp_repair_update_form">
<field name="name">mrp_repair.mrp_repair_update</field>
<field name="model">mrp.repair</field>
<field name="inherit_id" ref="mrp_repair.view_repair_order_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Base">
<group>
<field name="Kommission"/>
</group>
</page>
</notebook>
</field>
</record></data>
</openerp>
hey guido, Just add mrp_repair module to dependency module list of __openerp__.py file just like this, 'depends': ['base' , 'mrp_repair']