Skip to content
Snippets Groups Projects
Commit 3931edcf2fe4 authored by Etienne Ferriere's avatar Etienne Ferriere
Browse files

Corrected a bug, when seeking if analytic codes are required in a form or tree

view. If the associated analytic structures were defined with a model name,
which did not match the original model technical name, the system was unable to
determine, if the analytic codes were wanted as required.
parent 6ea1a5ccf907
Branches branch/13.0
No related tags found
1 merge request!4Topic/11.0/leyton purchase
Pipeline #15460 passed
......@@ -219,7 +219,14 @@
self.env["analytic.structure"]
.search(
[
("model_name", "=", self._name.replace(".", "_")),
(
"model_name",
"=",
self._analytic
if hasattr(self, "_analytic")
and isinstance(self._analytic, str)
else self._name.replace(".", "_"),
),
("required", "=", True),
]
)
......
......@@ -2,6 +2,16 @@
Changes
=======
.. _10.0.1.1.0:
10.0.1.1.0
----------
Corrected a bug, when seeking if analytic codes are required in a form or tree
view. If the associated analytic structures were defined with a model name,
which did not match the original model technical name, the system was unable to
determine, if the analytic codes were wanted as required.
.. _10.0.1.0.0:
10.0.1.0.0
......
......@@ -350,7 +350,12 @@
# Now we can insert the fields in the view's architecture.
model_map = {
model._name.replace(".", "_"): model._name
(
model._analytic
if hasattr(model, "_analytic")
and isinstance(model._analytic, str)
else model._name.replace(".", "_")
): model._name
for name, model in iter(self.env.registry.items())
}
required = self.env[
......
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