I have installed Odoo 10 on Ubuntu and it works fine
I'm following the tutorial 'building a module' from the Odoo website
https://www.odoo.com/documentation/10.0/howtos/backend.html#build-an-odoo-module
I have created an empty module with the the command:
odoo-bin scaffold openacademy addons
but when I try to import a module in to the xml file openacademy.xml I get the following error:
Model not found: openacademy.course
Error context:
View `course.form`[view_id: 4867, xml_id: n/a, model: openacademy.course, parent_id: n/a]None" while parsing /opt/odoo/odoo-10.0/addons/openacademy/views/openacademy.xml:6, near<record model="ir.ui.view" id="course_form_view"> <field name="name">course.form</field> <field name="model">openacademy.course</field> <field name="arch" type="xml"> <form string="Course Form"> <sheet> <group> <field name="name"/> <field name="description"/> </group> </sheet> </form> </field> </record>
here is my files:
openacademy.xml:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="course_form_view">
<field name="name">course.form</field>
<field name="model">openacademy.course</field>
<field name="arch" type="xml">
<form string="Course Form">
<sheet>
<group> <field name="name"/> <field name="description"/> </group>
</sheet>
</form>
</field>
</record>
</data>
</odoo>
models.py
from odoo import models, fields, api
class Course(models.Model):
_name = 'openacademy.course'
name = fields.Char(string="Title", required=True)description = fields.Text()
__init__.py
from . import models
where is your models.py file residing path? I mean inside models folder or outside?
inside models folder