70 lines
3.9 KiB
XML
70 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="res_config_settings_view_form_google_review" model="ir.ui.view">
|
|
<field name="name">res.config.settings.view.form.inherit.google.map.review</field>
|
|
<field name="model">res.config.settings</field>
|
|
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//form" position="inside">
|
|
<div class="app_settings_block" data-string="Google Reviews"
|
|
string="Google Reviews" data-key="google_map_review">
|
|
|
|
<h2>Google Business Reviews</h2>
|
|
<p class="text-muted">
|
|
Configure your Google Cloud OAuth2 credentials to enable
|
|
automated review crawling from the Google Business Profile API.
|
|
Obtain the refresh token by running <code>authorize.py</code>
|
|
from the standalone google_map_review project on any machine
|
|
with a browser, then copy the value from <code>token.json</code>.
|
|
</p>
|
|
|
|
<div class="row mt16 o_settings_container">
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<div class="o_setting_left_pane"/>
|
|
<div class="o_setting_right_pane">
|
|
<label for="google_map_review_client_id" string="Client ID"/>
|
|
<div class="text-muted">
|
|
OAuth2 Client ID from Google Cloud Console →
|
|
APIs & Services → Credentials.
|
|
</div>
|
|
<field name="google_map_review_client_id"
|
|
placeholder="xxxx.apps.googleusercontent.com"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<div class="o_setting_left_pane"/>
|
|
<div class="o_setting_right_pane">
|
|
<label for="google_map_review_client_secret" string="Client Secret"/>
|
|
<div class="text-muted">
|
|
OAuth2 Client Secret for your project.
|
|
</div>
|
|
<field name="google_map_review_client_secret"
|
|
password="True"
|
|
placeholder="GOCSPX-…"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-12 col-lg-12 o_setting_box">
|
|
<div class="o_setting_left_pane"/>
|
|
<div class="o_setting_right_pane">
|
|
<label for="google_map_review_refresh_token" string="Refresh Token"/>
|
|
<div class="text-muted">
|
|
Long-lived OAuth2 refresh token. Run
|
|
<code>authorize.py</code> once, then copy
|
|
<code>refresh_token</code> from <code>token.json</code>.
|
|
</div>
|
|
<field name="google_map_review_refresh_token"
|
|
password="True"
|
|
placeholder="1//0g…"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|