From f72a749350d10650a0cf534499d6505169fd034f Mon Sep 17 00:00:00 2001 From: "Thomas Lefebvre (thle)" <thle@odoo.com> Date: Mon, 19 Sep 2022 06:21:59 +0000 Subject: [PATCH] [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: Xavier Morel (xmo) <xmo@odoo.com> --- odoo/addons/base/rng/calendar_view.rng | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/addons/base/rng/calendar_view.rng b/odoo/addons/base/rng/calendar_view.rng index ee51acbde2e6..daf3fe4eb713 100644 --- a/odoo/addons/base/rng/calendar_view.rng +++ b/odoo/addons/base/rng/calendar_view.rng @@ -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"> -- GitLab