* Reorganize and reword some of the fields for the activity form type view
* The fields `force_next` from `mail.activity.type` and its related
field from `mail.activity` are removed.
Instead, a new field `chaining_type`, which is a `selection` will
improve the readability of the activity_type form. (It is made more
obvious that the user has to choose between 2 modes :
- 'Trigger Next Activity': used when the user wants to specify the type of the
next activity, which will be triggered once the current activity is done
- 'Suggest Next Activity': used when the user wants to recommend the
next activity for the user to schedule once the current activity is done
* To be consistent with this change :
- The field `default_next_type_id` is renamed `triggered_next_type_id`
- The field `next_type_ids` is renamed `suggested_next_type_ids`
* The field `default_description` is renamed `default_note` to better match the
`note` field from `mail.activity`
* About the specific case of activity_type.category = 'upload_file' :
An activity which has this type's category is automatically marked as done as soon as
the file is uploaded. This prevents the user from choosing a "next activity type".
As such, an activity_type with this category can only make use of the
chaining_type = "trigger", to be part of an automated process.
An activity_type with this chaining_type should have the
triggered_next_type_id set (usually required in the Form).
But, since it does not make sense to set suggested_next_type_ids in this case :
- chaining_type will stay hidden in the Form
- triggered_next_type_id will always be shown and is not marked as required in the Form
- if triggered_next_type_id is not set, chaining_type will be "suggest"
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
UPGRADE : https://github.com/odoo/upgrade/pull/2167
38 lines
2.0 KiB
XML
38 lines
2.0 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[@name='action_close_dialog']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('activity_category', '=', 'meeting'), ('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="//button[@special='cancel']" position="attributes">
|
|
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</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">
|
|
<button string="Open Calendar"
|
|
attrs="{'invisible': [('activity_category', '!=', 'meeting')]}"
|
|
name="action_create_calendar_event"
|
|
type="object"
|
|
class="btn-primary"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|