PURPOSE Required fields are annoying, notably when dealing with tests or xml-based data to create in concurrent modules. For example ModuleA adds a required field on Model. ModuleB that does not depend on ModuleA tries to create a data of Model. Currently it crashes as field is required but default is not provided if ModuleA is not loaded in registry. SPECIFICATIONS Field activity_user_type on ir.actions.server model in mail is currently required. This field is however not really required as its use is limited to actions linked to activities. Remove the hard required and put it only in views. If no value is given due to some bad configuration no responsible will be set. Followup of odoo/odoo@7309981426 LINKS Task ID-2367655 closes odoo/odoo#61769 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
55 lines
3.1 KiB
XML
55 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
|
|
<record model="ir.ui.view" id="view_server_action_form_template">
|
|
<field name="name">ir.actions.server.form</field>
|
|
<field name="model">ir.actions.server</field>
|
|
<field name="inherit_id" ref="base.view_server_action_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//page[@name='page_object']" position="after">
|
|
<page string="Activity" name="next_activity" autofocus="autofocus" attrs="{'invisible': [('state', '!=', 'next_activity')]}">
|
|
<group>
|
|
<group>
|
|
<field name="activity_type_id" options="{'no_create': True, 'no_open': True}" attrs="{'required': [('state', '=', 'next_activity')]}"/>
|
|
<field name="activity_summary" placeholder="e.g. Discuss proposal"/>
|
|
</group>
|
|
<group>
|
|
<label for="activity_date_deadline_range"/>
|
|
<div class="o_row">
|
|
<field name="activity_date_deadline_range"/>
|
|
<field name="activity_date_deadline_range_type" attrs="{
|
|
'required': [('state', '=', 'next_activity'), ('activity_date_deadline_range', '>', 0)]
|
|
}"/>
|
|
</div>
|
|
<field name="activity_user_type" attrs="{
|
|
'required': [('state', '=', 'next_activity')]
|
|
}"/>
|
|
<field name="activity_user_field_name" attrs="{
|
|
'invisible': [('activity_user_type', '=', 'specific')],
|
|
'required': [('state', '=', 'next_activity'), ('activity_user_type', '=', 'generic')]
|
|
}"/>
|
|
<field name="activity_user_id" attrs="{
|
|
'invisible': [('activity_user_type', '=', 'generic')],
|
|
'required': [('state', '=', 'next_activity'), ('activity_user_type', '=', 'specific')]
|
|
}"/>
|
|
</group>
|
|
</group>
|
|
<field name="activity_note" placeholder="Log a note..."/>
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="//field[@name='link_field_id']" position="after">
|
|
<field name="partner_ids" widget="many2many_tags"
|
|
attrs="{'invisible': [('state', '!=', 'followers')]}"/>
|
|
<field name="channel_ids" widget="many2many_tags"
|
|
attrs="{'invisible': [('state', '!=', 'followers')]}"/>
|
|
<field name="template_id"
|
|
attrs="{'invisible': [('state', '!=', 'email')],
|
|
'required': [('state', '=', 'email')]}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|