[FIX] survey, base: show trigger icon immediately

Since the refactoring of the JS relational model (d4fe919d),
the list is not fully re-rendered after field updates,
such that a fixed narrow column width is added at first rendering
if there are no triggers shown on any row, and cannot be updated.

We need to override it by providing a `width`, which was already
a supported attribute but not declared in rng.

Task-3512604

closes odoo/odoo#135895

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
Florian Charlier
2023-12-08 15:57:41 +00:00
parent 96ad7f806f
commit 6f3fc4b173
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -79,7 +79,7 @@
invisible="not is_page"/>
<field name="triggering_question_ids" column_invisible="True"/>
<field name="triggering_answer_ids" column_invisible="True" widget="many2many_tags"/> <!-- widget to fetch display_name -->
<widget name="survey_question_trigger"/>
<widget name="survey_question_trigger" width="30px"/>
<button name="copy" type="object" icon="fa-clone" title="Duplicate Question"/>
<control>
<create name="add_question_control" string="Add a question"/>
+1
View File
@@ -412,6 +412,7 @@
<rng:element name="widget">
<rng:attribute name="name"/>
<rng:optional><rng:attribute name="options"/></rng:optional>
<rng:optional><rng:attribute name="width"/></rng:optional>
</rng:element>
</rng:define>