Skip to Content
Menu
This question has been flagged
4150 Views

I have brought a boolean field in general settings and need to bring a edit button only if that field is true.

Thanks!

Avatar
Discard
Author

Thank for sharing the link, I used to watch your videos in youtube and is't very informative.

Here in my case I need to get the button for all the list views for that

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

<t t-jquery="button.o_list_button_add" t-operation="after">

<button class="btn btn-primary oe_edit_button" type="button"

accesskey="f">Inline Edit</button>

</t>

i added a button like this.

I also added a field in general settings like this

<record id="res_config_settings_view_edit_form" model="ir.ui.view">

<field name="name">res_config_setting_edit</field>

<field name="model">res.config.settings</field>

<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>

<field name="arch" type="xml">

<xpath expr="//div[@id='companies']" position="after">

<div id="list_view">

<h2>List View Item</h2>

<div class="row mt16 o_settings_container" name="inline_edit_setting_container">

<div class="col-12 col-lg-6 o_setting_box" id="inline_edit_setting">

<div class="o_setting_left_pane">

<field name="editable"/>

</div>

<div class="o_setting_right_pane">

<label for="editable"/>

<div class="text-muted">

Inline edit for all list view

</div>

</div>

</div>

</div>

</div>

</xpath>

</field>

</record>

I need to make the button in list view only if i enable the field in general settings

we usually used to give a < t t-if condition before the button

but i don't know how to get the field value in general setting here

Thanks

Related Posts Replies Views Activity
1
Dec 20
5624
1
Nov 24
1487
1
Nov 24
1198
2
Oct 24
2238
2
Sep 24
1047