Purpose ======= A field `use_google_gmail_service` has been used in stable to define a mail server which use Gmail authentication. But now that the fields `smtp_authentication` exists, we want to use it to simplify the mail server form view. For the incoming mail server, the field `server_type` will be used for the same purpose. Add a new field to have the option to install `google_gmail` in the main settings page. Task-2170676 closes odoo/odoo#83413 Related: odoo/upgrade#3199 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
31 lines
1.7 KiB
XML
31 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="ir_mail_server_view_form" model="ir.ui.view">
|
|
<field name="name">ir.mail_server.view.form.inherit.gmail</field>
|
|
<field name="model">ir.mail_server</field>
|
|
<field name="inherit_id" ref="base.ir_mail_server_form"/>
|
|
<field name="arch" type="xml">
|
|
<field name="smtp_user" position="after">
|
|
<field string="Authorization Code" name="google_gmail_authorization_code" password="True"
|
|
attrs="{'required': [('smtp_authentication', '=', 'gmail')], 'invisible': [('smtp_authentication', '!=', 'gmail')]}"/>
|
|
<field name="google_gmail_uri"
|
|
class="fa fa-arrow-right oe_edit_only"
|
|
widget="url"
|
|
text=" Get an Authorization Code"
|
|
attrs="{'invisible': ['|', ('smtp_authentication', '!=', 'gmail'), ('google_gmail_uri', '=', False)]}"
|
|
nolabel="1"/>
|
|
<div class="alert alert-warning" role="alert"
|
|
attrs="{'invisible': ['|', ('smtp_authentication', '!=', 'gmail'), ('google_gmail_uri', '!=', False)]}">
|
|
Setup your Gmail API credentials to link a Gmail account.
|
|
</div>
|
|
</field>
|
|
<field name="smtp_user" position="attributes">
|
|
<attribute name="attrs">{'invisible' : [('smtp_authentication', '!=', 'login'), ('smtp_authentication', '!=', 'gmail')]}</attribute>
|
|
</field>
|
|
<field name="smtp_pass" position="attributes">
|
|
<attribute name="attrs">{'invisible' : [('smtp_authentication', '=', 'gmail')]}</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
</odoo>
|