Last active
January 10, 2021 12:25
-
-
Save Hidenmy/67e3ed89575b5a24ec9aa3c75338f7f8 to your computer and use it in GitHub Desktop.
the icon is loaded in the database, but is not displayed in the interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
settings.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<odoo> | |
<data> | |
<record id="res_config_settings_google_map_view_form" model="ir.ui.view"> | |
<field name="name">Google Map Settings</field> | |
<field name="priority" eval="200"/> | |
<field name="model">res.config.settings</field> | |
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/> | |
<field name="arch" type="xml"> | |
<xpath expr="//div[@name='integration']" position="after"> | |
<div name="google_map_configs"> | |
<h2>Google Maps Configs</h2> | |
<div class="row mt16 o_settings_container"> | |
<div class="col-xs-12 col-md-6 o_setting_box"> | |
<div class="o_setting_right_pane"> | |
<div class="content-group"> | |
<div class="mt16"> | |
<label for="google_maps_view_api_key" string="Api key"/> | |
<field name="google_maps_view_api_key"/> | |
</div> | |
<div class="mt16"> | |
<label for="google_maps_marker_icon" string="Marker icon"/> | |
<field name="google_maps_marker_icon" widget='image'/> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</xpath> | |
</field> | |
</record> | |
</data> | |
</odoo> | |
models.py | |
class ResConfigSettings(models.TransientModel): | |
_inherit = 'res.config.settings' | |
google_maps_view_api_key = fields.Char( | |
string='Google Maps View Api Key', | |
config_parameter='smart_light.api_key') | |
google_maps_marker_icon = fields.Image() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment