Hi,
I am a beginnier and i am working on the online tutorial to learn how to build a module:
"Technical training - Backend developement ---- Build an Odoo Module';
but for some reasons i can't see my model 'Course' in my module.... I tried to write again from the beginning all the models.py and the openacademy.xml but it's not working...
I asked to one of my developer friend, but he can't find the problem....
-----
Edit :
More informations:
- I use Odoo 13 and deploy on Odoo.sh
- My module is installed and upgrade
-xml is called in __manifest__ 'data'
- models is imported in __init__
- The problem seems to come from my xml cause i found my model in settings/technical/models
------
If somebody can help me please, here is my files :
openacademy.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<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="responsible_id"/>
</group>
<notebook>
<page string="Description">
<field name="description"/>
</page>
<page string="Sessions">
<field name="session_ids">
<tree string="Registered sessions">
<field name="name"/>
<field name="instructor_id"/>
</tree>
</field>
</page>
<page string="About">
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="course_tree_view">
<field name="name">course.tree</field>
<field name="model">openacademy.course</field>
<field name="arch" type="xml">
<tree string="Course Tree">
<field name="name"/>
<field name="responsible_id"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="course_search_view">
<field name="name">course.search</field>
<field name="model">openacademy.course</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="description"/>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="course_list_action">
<field name="name">Courses</field>
<field name="res_model">openacademy.course</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="nocontent">Create the first course
</p>
</field>
</record>
<menuitem id="main_openacademy_menu" name="Open academy"/>
<menuitem id="openacademy_menu" name="Open Academy"
parent="main_openacademy_menu"/>
<menuitem id="courses_menu" name="Courses" parent="openacademy_menu"
action="openacademy.course_list_action"/>
<record model="ir.ui.view" id="session_form_view">
<field name="name">session.form</field>
<field name="model">openacademy.session</field>
<field name="arch" type="xml">
<form string="Session Form">
<sheet>
<group>
<group string="General">
<field name="course_id"/>
<field name="name"/>
<field name="instructor_id"/>
<field name="active"/>
</group>
<group string="Schedule">
<field name="start_date"/>
<field name="duration"/>
<field name="seats"/>
<field name="taken_seats" widget="progressbar"/>
</group>
<label for="attendee_ids"/>
<field name="attendee_ids"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="session_tree_view">
<field name="name">session.tree</field>
<field name="model">openacademy.session</field>
<field name="arch" type="xml">
<tree string="Session Tree" decoration-info="duration<5" decoration-danger="duration>15">
<field name="name"/>
<field name="course_id"/>
<field name="duration" invisible="1"/>
<field name="taken_seats" widget="progressbar"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="session_list_action">
<field name="name">Sessions</field>
<field name="res_model">openacademy.session</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="session_menu" name="Sessions"
parent="openacademy_menu"
action="session_list_action"/>
</odoo>
Hope these tips will help you: https://sites.google.com/view/thinkincode/erp/odoo13