Files
odoo_source/addons/calendar/wizard/mail_activity_schedule_views.xml
T
Maryam Kia e6097043b9 [FIX] calendar: restore schedule call activity without event
Since PR #137969, the `save` button is no longer available in schedule activity
 wizard.
This PR makes `schedule` button available for call activities like other
activities (except meeting), so user can create a call activity without going to
 calendar view.
Also, we have to consider `has_error` in creating activity so if there is an
error, user couldn't access to `schedule` button. This field is correctly placed
in `mail.mail_activity_schedule_view_form` view but not in the inherited view
in `calendar`.

task-3668732

closes odoo/odoo#152893

Signed-off-by: Maryam Kia (maki) <maki@odoo.com>
2024-02-14 18:32:04 +00:00

32 lines
1.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="mail_activity_schedule_view_form" model="ir.ui.view">
<field name="name">mail.activity.schedule.inherit.calendar</field>
<field name="model">mail.activity.schedule</field>
<field name="inherit_id" ref="mail.mail_activity_schedule_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date_deadline']" position="attributes">
<attribute name="invisible">activity_category == 'meeting'</attribute>
</xpath>
<xpath expr="//field[@name='activity_user_id']" position="attributes">
<attribute name="invisible">activity_category == 'meeting'</attribute>
</xpath>
<xpath expr="//button[@name='action_schedule_activities']" position="attributes">
<attribute name="invisible">has_error or activity_category == 'meeting' or id</attribute>
</xpath>
<xpath expr="//field[@name='note']" position="attributes">
<attribute name="invisible">activity_category == 'meeting'</attribute>
</xpath>
<xpath expr="//button[@name='action_schedule_activities']" position="before">
<button string="Open Calendar"
invisible="activity_category not in ('meeting', 'phonecall')"
name="action_create_calendar_event"
type="object"
class="btn-primary"/>
</xpath>
</field>
</record>
</data>
</odoo>