Skip to content
Snippets Groups Projects
Commit f72a7493 authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[FIX] base: calendar for new model with studio

Version:
V14 only

Steps to reproduce:
install Studio app (web_studio module);
inside an app create a new model with Studio;
choose the "Date & Calendar" feature for the new model;
create the model.

Issue:
An error occurs "Invalid view Default calendar view for x_modelName definition in False".

Causes:
Server log:
`odoo.tools.view_validation: <string>:1:0:ERROR:RELAXNGV:RELAXNG_ERR_INVALIDATTR: Invalid attribute edit for element calendar`
`odoo.tools.view_validation: Invalid XML: Get RNG validator and validate RNG file.`

Explanation:
".xml" files must be verified with the grammar inside the ".rng" files. The "edit" attribute is missing in the calendar tag grammar (calendar_view.rng file). This attribute is added during the validation's process of a view when it is created.

Link of the function which add the attribute: https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/models/ir_ui_view.py#L899-L912



Solutions:
Add the "edit" attribute inside the "calendar_view.rng".

opw-2972415

closes odoo/odoo#100456

Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent 6d6ff5ea
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
<rng:optional><rng:attribute name="hide_date"/></rng:optional>
<rng:optional><rng:attribute name="create"/></rng:optional>
<rng:optional><rng:attribute name="delete"/></rng:optional>
<rng:optional><rng:attribute name="edit"/></rng:optional>
<rng:optional><rng:attribute name="scales"/></rng:optional>
<rng:optional>
<rng:attribute name="mode">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment