|
10 | 10 | <field name="use_google_gmail_service" string="Gmail" attrs="{'readonly': [('state', '=', 'done')]}"/> |
11 | 11 | </field> |
12 | 12 | <field name="user" position="after"> |
13 | | - <field string="Authorization Code" name="google_gmail_authorization_code" password="True" |
14 | | - attrs="{'required': [('use_google_gmail_service', '=', True)], 'invisible': [('use_google_gmail_service', '=', False)], 'readonly': [('state', '=', 'done')]}" |
15 | | - style="word-break: break-word;"/> |
16 | | - <field name="google_gmail_uri" |
17 | | - class="fa fa-arrow-right oe_edit_only" |
18 | | - widget="url" |
19 | | - text=" Get an Authorization Code" |
20 | | - attrs="{'invisible': ['|', ('use_google_gmail_service', '=', False), ('google_gmail_uri', '=', False)]}" |
21 | | - nolabel="1"/> |
22 | | - <div class="alert alert-warning" role="alert" |
23 | | - attrs="{'invisible': ['|', ('use_google_gmail_service', '=', False), ('google_gmail_uri', '!=', False)]}"> |
24 | | - Setup your Gmail API credentials in the general settings to link a Gmail account. |
| 13 | + <field name="google_gmail_uri" invisible="1"/> |
| 14 | + <field name="google_gmail_refresh_token" invisible="1"/> |
| 15 | + <div></div> |
| 16 | + <div attrs="{'invisible': [('use_google_gmail_service', '=', False)]}"> |
| 17 | + <span attrs="{'invisible': ['|', ('use_google_gmail_service', '=', False), ('google_gmail_refresh_token', '=', False)]}" |
| 18 | + class="badge badge-success"> |
| 19 | + Gmail Token Valid |
| 20 | + </span> |
| 21 | + <button type="object" |
| 22 | + name="open_google_gmail_uri" class="btn-link px-0" |
| 23 | + attrs="{'invisible': ['|', '|', ('google_gmail_uri', '=', False), ('use_google_gmail_service', '=', False), ('google_gmail_refresh_token', '!=', False)]}"> |
| 24 | + <i class="fa fa-arrow-right"/> |
| 25 | + Connect your Gmail account |
| 26 | + </button> |
| 27 | + <button type="object" |
| 28 | + name="open_google_gmail_uri" class="btn-link px-0" |
| 29 | + attrs="{'invisible': ['|', '|', ('google_gmail_uri', '=', False), ('use_google_gmail_service', '=', False), ('google_gmail_refresh_token', '=', False)]}"> |
| 30 | + <i class="fa fa-cog"/> |
| 31 | + Edit Settings |
| 32 | + </button> |
| 33 | + <div class="alert alert-warning" role="alert" |
| 34 | + attrs="{'invisible': ['|', ('use_google_gmail_service', '=', False), ('google_gmail_uri', '!=', False)]}"> |
| 35 | + Setup your Gmail API credentials in the general settings to link a Gmail account. |
| 36 | + </div> |
25 | 37 | </div> |
26 | 38 | </field> |
27 | 39 | <field name="password" position="attributes"> |
|
0 commit comments