Skip to content
Snippets Groups Projects
Commit e27b5297cef4 authored by Axel Prel's avatar Axel Prel
Browse files

add redner integration config

parent 36d9f92d05b7
No related branches found
No related tags found
1 merge request!89add redner integration config
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
18.0.1.7.0 18.0.1.7.0
---------- ----------
Res config: add redner integration parameters (server_url, account, api_key)
Template locale is by default user locale, not fr_FR Template locale is by default user locale, not fr_FR
Update Redner config parameter names in the README Update Redner config parameter names in the README
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
"views/redner_template.xml", "views/redner_template.xml",
"views/mail_template.xml", "views/mail_template.xml",
"views/ir_actions_report.xml", "views/ir_actions_report.xml",
"views/res_config_settings_view.xml",
"views/menu.xml", "views/menu.xml",
], ],
"assets": { "assets": {
......
...@@ -4,4 +4,5 @@ ...@@ -4,4 +4,5 @@
redner_report, redner_report,
redner_substitution, redner_substitution,
redner_template, redner_template,
res_config_settings,
) )
##############################################################################
#
# Redner Odoo module
# Copyright © 2016 XCG Consulting <https://xcg-consulting.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
redner_server_url = fields.Char(
string="Redner Server URL",
config_parameter="redner.server_url",
)
redner_account = fields.Char(
string="Redner Account Name",
config_parameter="redner.account",
)
redner_api_key = fields.Char(
string="Redner API Key",
config_parameter="redner.api_key",
)
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.base.setup</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="0" />
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//block[@name='integration']" position="inside">
<setting id="redner_setting" string="Redner">
<div class="content-group">
<div class="row mt16">
<label for="redner_server_url" class="col-lg-3" />
<field name="redner_server_url" string="Server URL" />
</div>
<div class="row mt16">
<label for="redner_account" class="col-lg-3" />
<field name="redner_account" string="Account Name" />
</div>
<div class="row mt16">
<label for="redner_api_key" class="col-lg-3" />
<field name="redner_api_key" string="API Keys" />
</div>
</div>
</setting>
</xpath>
</field>
</record>
</odoo>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment