Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4546 Widoki

i'm using <t t-if="widget.modelName == 'model.model'">

how to target multi model name?
to be precise :


            <button t-if="widget.is_action_enabled('edit')" type="button"

            class="btn btn-primary btn-sm o_form_button_edit" accesskey="a">

                <t t-if="widget.modelName == 'model.name'">

                    Input your data before submit

                </t>

                <t t-if="widget.modelName !== 'model.name'">

                    Edit

                </t>

            </button>


I have to target 3 models to user so they notice that they have to input/edit data before submit

also the code only works if i directly hack base.xml from web modul

if extend from :

<templates id="template" xml:space="preserve">

    <t t-extend="FormView.buttons">

        <t t-jquery="button.o_form_button_edit" t-operation="replace">

            <button t-if="widget.is_action_enabled('edit')" type="button"

            class="btn btn-primary btn-sm o_form_button_edit" accesskey="a">

                <t t-if="widget.modelName == 'model.name'">

                    Disposisi

                </t>

                <t t-if="widget.modelName !== 'model.name'">

                    Edit

                </t>

            </button>

        </t>

    </t>

</templates>


this does not work, how to update this?

thank you

Awatar
Odrzuć
Najlepsza odpowiedź

what other attributes that can be used with widget......i want to show it in model but only in specific view, i have 3 views of same model

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
sie 20
5150
1
maj 17
5379
1
kwi 23
111
2
mar 22
5054
1
cze 20
5863