[FIX] calendar: hide res model name while creating an event from another model

Before this commit when you create an event from a lead, a button appears to jump back to the lead but while you're creating the record, it already appears but empty.
This commit hides the button in case the res_model_name is null, which happens while we are creating the event and before hitting save.

closes odoo/odoo#154956

Task: 3747059
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
This commit is contained in:
ahmad(alah)
2024-03-07 08:25:53 +00:00
parent 5439cfcc40
commit 8fd5c00ebd
+1 -1
View File
@@ -108,7 +108,7 @@
</div>
<sheet>
<div class="oe_button_box" name="button_box">
<button icon="fa-bars" type="object" name="action_open_calendar_event" invisible="not res_id">
<button icon="fa-bars" type="object" name="action_open_calendar_event" invisible="not (res_id and res_model_name)">
<field name="res_model_name"/>
</button>
</div>