Skip to content
Snippets Groups Projects
Commit 0cf423db authored by Jorge Pinna Puissant's avatar Jorge Pinna Puissant
Browse files

[FIX] website_slides: immediately add content to new course


- Create a new course;
- Add content line;
- save.

Before this commit, Odoo raises an invalid field error on 'Course' which
is empty. If you try to select the newly created course, it is missing
in the list.

Now, the course is removed from the view when creating a new content
from a course. But it stays if the content is created directly from the
content menu.

opw-2210360

closes odoo/odoo#48534

X-original-commit: f0b61634
Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
parent 8b6592e4
Branches
Tags
No related merge requests found
......@@ -61,7 +61,7 @@
</div>
<notebook colspan="4">
<page name="content" string="Content">
<field name="slide_ids" colspan="4" nolabel="1" widget="slide_category_one2many" mode="tree,kanban" context="{'default_channel_id': active_id}">
<field name="slide_ids" colspan="4" nolabel="1" widget="slide_category_one2many" mode="tree,kanban" context="{'default_channel_id': active_id, 'form_view_ref' : 'website_slides.view_slide_slide_form_wo_channel_id'}">
<tree decoration-bf="is_category" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
......
......@@ -151,6 +151,18 @@
</field>
</record>
<record id="view_slide_slide_form_wo_channel_id" model="ir.ui.view">
<field name="name">slide.slide.form.wo.channel_id</field>
<field name="model">slide.slide</field>
<field name="inherit_id" ref="view_slide_slide_form"/>
<field name="priority" eval="50"/>
<field name="mode">primary</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="channel_id" position="replace"/>
</field>
</record>
<record id="slide_slide_view_kanban" model="ir.ui.view">
<field name="name">slide.slide.view.kanban</field>
<field name="model">slide.slide</field>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment