How to reproduce: 1. Go to any course 2. Click on the button 'Add attendees' 3. Type the recipients name "Create and edit ..." should be displayed but is not. To reenable this feature, we remove the option no_create_edit on partner_ids of the slide_channel_invite_view_form form to enable the creation of partner when adding attendee to a course. As the support for the force_email context has been discontinued, we don't reenable the quick_create as it can create partner without email (if the user enter a non-valid email). But we reenable the "create edit" option with a view that force the user to enter an email: base.view_partner_simple_form (like done on some views in odoo/odoo#149806). Task-3868824 closes odoo/odoo#162190 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
57 lines
3.5 KiB
XML
57 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="slide_channel_invite_view_form" model="ir.ui.view">
|
|
<field name="name">slide.channel.invite.view.form</field>
|
|
<field name="model">slide.channel.invite</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Compose Email" class="o_mail_composer_form">
|
|
<div class="alert alert-warning text-center" role="alert" invisible="channel_published or not channel_id">
|
|
This course is not published. Attendees may not be able to access its contents.
|
|
</div>
|
|
<sheet>
|
|
<field name="channel_id" invisible="1"/>
|
|
<field name="channel_published" invisible="1"/>
|
|
<field name="channel_visibility" invisible="1"/>
|
|
<field name="enroll_mode" invisible="1"/>
|
|
<group col="1">
|
|
<group col="2" invisible="enroll_mode or channel_visibility != 'public'">
|
|
<field name="channel_invite_url" readonly="1" widget="CopyClipboardChar"/>
|
|
<field name="send_email" widget="boolean_toggle" options="{'autosave': False}"/>
|
|
</group>
|
|
<group col="2" invisible="not send_email">
|
|
<field name="partner_ids"
|
|
widget="many2many_tags_email"
|
|
placeholder="Add contacts..."
|
|
required="send_email"
|
|
options="{'no_quick_create': True}"
|
|
context="{'show_email': True, 'form_view_ref': 'base.view_partner_simple_form'}"/>
|
|
</group>
|
|
<group col="2" invisible="not send_email">
|
|
<field name="lang" invisible="1"/>
|
|
<field name="render_model" invisible="1"/>
|
|
<field name="subject" placeholder="Subject..."/>
|
|
</group>
|
|
<field name="can_edit_body" invisible="1"/>
|
|
<field name="body" class="oe-bordered-editor" options="{'style-inline': true}" invisible="not send_email" readonly="not can_edit_body" force_save="1"/>
|
|
<group invisible="not send_email">
|
|
<group>
|
|
<field name="attachment_ids" widget="many2many_binary"/>
|
|
</group>
|
|
<group>
|
|
<field name="template_id" label="Use template" context="{'default_model': 'slide.channel.partner'}"/>
|
|
</group>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
<footer>
|
|
<button string="Send" invisible="not send_email" name="action_invite" type="object" class="btn-primary" data-hotkey="q"/>
|
|
<button string="Close" invisible="send_email" class="btn-secondary" special="cancel" data-hotkey="x"/>
|
|
<button string="Cancel" invisible="not send_email" class="btn-secondary" special="cancel" data-hotkey="x"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|