[FIX] google_spreadsheet: add a related field to generate a google_drive_uri code

As the field was displayed twice on the General Settings form by specification, we need to add a related field.
This commit is contained in:
Akash Bhavsar
2017-01-06 10:09:30 +01:00
committed by Yannick Tivisse
parent 450bdd95da
commit 95d823d9db
3 changed files with 12 additions and 1 deletions
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base_config_settings
import google_drive
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class BaseConfigSettings(models.TransientModel):
_inherit = "base.config.settings"
google_drive_uri_copy = fields.Char(related='google_drive_uri', string='URI', help="The URL to generate the authorization code from Google")
@@ -13,7 +13,7 @@
<field name="google_drive_authorization_code"/>
</div>
<a type="button" class="btn-link" target="_blank"><i class="fa fa-fw fa-arrow-right"/>
<field name="google_drive_uri" widget="url" text="Generate Code"/>
<field name="google_drive_uri_copy" widget="url" text="Generate Code"/>
</a>
</div>
</xpath>