[FIX] mail: hide stat-buttons in activity popup form

Small oversight of: 4c6a010730

This commit simply hides the stat-buttons when the mail.activity is opened in
the popup form.

When in that popup form, you don't want to switch your context, especially
considering the only button currently available allows you to open the related
document (from which you just opened the activity popup form, creating a loop).

Task-2920490

closes odoo/odoo#96238

X-original-commit: 7b6e700d7e7c54cac0200e98b4eb04af9f115608
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Aurélien Warnon
2022-07-18 21:03:09 +02:00
parent e8c3d9f0c0
commit 9242c8fc5c
+4 -1
View File
@@ -99,7 +99,7 @@
<field name="arch" type="xml">
<form string="Log an Activity" create="false">
<sheet string="Activity">
<div class="oe_button_box" name="button_box">
<div class="oe_button_box" name="button_box" invisible="1">
<button name="action_open_document" string="Open Document"
type="object" class="oe_link" icon="fa-file-text-o"
attrs="{'invisible': ['|', ('res_model', '=', False), ('res_id', '=', 0)]}"/>
@@ -165,6 +165,9 @@
<field name="res_name" readonly="1" string="Document"/>
</field>
<footer position="replace"/>
<xpath expr="//div[hasclass('oe_button_box')]" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
</field>
</record>