Skip to Content
Menu
This question has been flagged
1 Reply
4711 Views

Domain and context in view do not work


<field name="automatic_backup_rule_ids" domain="['|', ('active', '=', False), ('active', '=', True)]" context="{'active_test': False}">
<tree decoration-muted="(not active)" domain="['|', ('active', '=', False), ('active', '=', True)]" context="{'active_test': False}">
<button icon="fa-file-o" type="object" name="show_rule_form"/>
<field name="active"/>
<field name="backup_type"/>
<field name="backup_destination"/>
<field name="nextcall"/>
<button name="check_settings" string="Check Settings" class="oe_highlight" type="object"/>
<button name="backup_btn" string="Backup" class="oe_highlight" type="object"/>
</tree>
</field>
Avatar
Discard
Best Answer

Hi,

Pass the context active_test:False inside the action of the menu and see.

<record id="res_lang_act_window" model="ir.actions.act_window">
<field name="name">Languages</field>
<field name="res_model">res.lang</field>
<field name="context">{'active_test': False}</field>
<field name="search_view_id" ref="res_lang_search"/>
</record>

Thanks

Avatar
Discard