mirror of
https://github.com/bringout/oca-ocb-security.git
synced 2026-04-19 21:12:01 +02:00
19.0 vanilla
This commit is contained in:
parent
20ddc1b4a3
commit
c0efcc53f5
1162 changed files with 125577 additions and 105287 deletions
|
|
@ -7,31 +7,24 @@
|
|||
<field name="inherit_id" ref="mail.view_email_server_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user" position="after">
|
||||
<field name="google_gmail_uri" invisible="1"/>
|
||||
<field name="google_gmail_refresh_token" invisible="1"/>
|
||||
<div attrs="{'invisible': [('server_type', '!=', 'gmail')]}"
|
||||
class="d-flex flex-row align-items-center" colspan="2">
|
||||
<span attrs="{'invisible': ['|', ('server_type', '!=', 'gmail'), ('google_gmail_refresh_token', '=', False)]}"
|
||||
<div invisible="server_type != 'gmail'"
|
||||
class="d-flex flex-row align-items-center" colspan="2"
|
||||
groups="base.group_system">
|
||||
<span invisible="server_type != 'gmail' or not google_gmail_refresh_token"
|
||||
class="badge text-bg-success">
|
||||
Gmail Token Valid
|
||||
</span>
|
||||
<button type="object"
|
||||
name="open_google_gmail_uri" class="btn-link px-0"
|
||||
attrs="{'invisible': ['|', '|', ('google_gmail_uri', '=', False), ('server_type', '!=', 'gmail'), ('google_gmail_refresh_token', '!=', False)]}">
|
||||
<i class="fa fa-arrow-right"/>
|
||||
invisible="server_type != 'gmail' or google_gmail_refresh_token">
|
||||
<i class="oi oi-arrow-right"/>
|
||||
Connect your Gmail account
|
||||
</button>
|
||||
<button type="object"
|
||||
name="open_google_gmail_uri" class="btn-link px-0 ms-2"
|
||||
attrs="{'invisible': ['|', '|', ('google_gmail_uri', '=', False), ('server_type', '!=', 'gmail'), ('google_gmail_refresh_token', '=', False)]}">
|
||||
invisible="server_type != 'gmail' or not google_gmail_refresh_token">
|
||||
<i class="fa fa-cog" title="Edit Settings"/>
|
||||
</button>
|
||||
<button class="alert alert-warning d-block mt-2 text-start"
|
||||
icon="fa-arrow-right" type="action" role="alert"
|
||||
name="%(base.res_config_setting_act_window)d"
|
||||
attrs="{'invisible': ['|', ('server_type', '!=', 'gmail'), ('google_gmail_uri', '!=', False)]}">
|
||||
Setup your Gmail API credentials in the general settings to link a Gmail account.
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</field>
|
||||
|
|
|
|||
|
|
@ -5,39 +5,31 @@
|
|||
<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 name="google_gmail_uri" invisible="1"/>
|
||||
<field name="google_gmail_refresh_token" invisible="1"/>
|
||||
<div attrs="{'invisible': [('smtp_authentication', '!=', 'gmail')]}"
|
||||
class="d-flex flex-row align-items-center" colspan="8">
|
||||
<span attrs="{'invisible': ['|', ('smtp_authentication', '!=', 'gmail'), ('google_gmail_refresh_token', '=', False)]}"
|
||||
<field name="smtp_ssl_private_key" position="after">
|
||||
<div invisible="smtp_authentication != 'gmail'"
|
||||
class="d-flex flex-row align-items-center"
|
||||
colspan="2"
|
||||
groups="base.group_system">
|
||||
<span invisible="smtp_authentication != 'gmail' or not google_gmail_refresh_token"
|
||||
class="badge text-bg-success">
|
||||
Gmail Token Valid
|
||||
</span>
|
||||
<button type="object"
|
||||
name="open_google_gmail_uri" class="btn-link px-0"
|
||||
attrs="{'invisible': ['|', '|', ('google_gmail_uri', '=', False), ('smtp_authentication', '!=', 'gmail'), ('google_gmail_refresh_token', '!=', False)]}">
|
||||
<i class="fa fa-arrow-right"/>
|
||||
invisible="smtp_authentication != 'gmail' or google_gmail_refresh_token">
|
||||
<i class="oi oi-arrow-right"/>
|
||||
Connect your Gmail account
|
||||
</button>
|
||||
<button type="object"
|
||||
name="open_google_gmail_uri" class="btn-link px-0 ms-2"
|
||||
attrs="{'invisible': ['|', '|', ('google_gmail_uri', '=', False), ('smtp_authentication', '!=', 'gmail'), ('google_gmail_refresh_token', '=', False)]}">
|
||||
invisible="smtp_authentication != 'gmail' or not google_gmail_refresh_token">
|
||||
<i class="fa fa-cog" title="Edit Settings"/>
|
||||
</button>
|
||||
<button class="alert alert-warning d-block mt-2 text-start"
|
||||
icon="fa-arrow-right" type="action" role="alert"
|
||||
name="%(base.res_config_setting_act_window)d"
|
||||
attrs="{'invisible': ['|', ('smtp_authentication', '!=', 'gmail'), ('google_gmail_uri', '!=', False)]}">
|
||||
Setup your Gmail API credentials in the general settings to link a Gmail account.
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
<field name="smtp_authentication_info" position="after">
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/general/email_communication/email_servers.html?highlight=outgoing email server#use-a-default-from-email-address"
|
||||
attrs="{'invisible': [('smtp_authentication', '!=', 'gmail')]}" target="_blank">
|
||||
Read More
|
||||
</a>
|
||||
<widget name="documentation_link" path="/applications/general/email_communication/email_servers.html?highlight=outgoing email server#use-a-default-from-email-address"
|
||||
invisible="smtp_authentication != 'gmail'" label="Read More"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.google_gmail</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="inherit_id" ref="mail.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_module_google_gmail" position="replace">
|
||||
<div class="row mt16" id="gmail_client_identifier">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<template id="google_gmail_oauth_error">
|
||||
<t t-call-assets="web.assets_frontend" t-js="false"/>
|
||||
<div class="py-5">
|
||||
<div class="alert alert-warning w-50 mx-auto" role="alert">
|
||||
<t t-out="error"/>
|
||||
<br/>
|
||||
<a t-att-href="redirect_url">
|
||||
Go back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue