When a an activity was already created, it is no longer to schedule it when we change the type to a call or a meeting. Step to reproduce the issue: 1. Create any activity (without scheduling it) on for example a Quotation 2. Edit this activity and change its type to meeting/call There are no longer a Open Calendar Button, thus we can't schedule it. Solution: The issue is simply that the Open Calendar button is only displayed when the activity is not yet created (and if we have the appropriate category). Instead of this condition, we should display this button if there are no event already created. opw-2824396 closes odoo/odoo#90028 X-original-commit: 1a66a3c4478c5b98951b658b6efbbd0b0d82166d Signed-off-by: Anh Thao PHAM <pta@odoo.com> Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
39 lines
2.2 KiB
XML
39 lines
2.2 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
|
|
<record id="mail_activity_view_form_popup" model="ir.ui.view">
|
|
<field name="name">mail.activity.form.inherit.calendar</field>
|
|
<field name="model">mail.activity</field>
|
|
<field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='date_deadline']" position="attributes">
|
|
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='user_id']" position="attributes">
|
|
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@id='mail_activity_schedule']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('activity_category', 'in', ['meeting', 'phonecall']), ('id', '!=', False)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@id='mail_activity_save']" position="attributes">
|
|
<attribute name="attrs">{'invisible': [('activity_category', '!=', 'phonecall'), ('id', '=', False)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_done']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('activity_category', '=', 'meeting'), ('chaining_type', '=', 'trigger')]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='note']" position="attributes">
|
|
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_close_dialog']" position="before">
|
|
<field name="calendar_event_id" invisible="1" />
|
|
<button string="Open Calendar"
|
|
attrs="{'invisible': ['|', ('activity_category', 'not in', ['meeting', 'phonecall']), ('calendar_event_id', '!=', False)]}"
|
|
name="action_create_calendar_event"
|
|
type="object"
|
|
class="btn-primary"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|