[IMP] l10n_ch: adds a res.config.setting field for config parameter

commit 68dafa0620 introduced a solution to hide the Swiss QR code by default, by conditionning its display on the existence of an ir.config.parameter that one could manually add.
This commits creates the ir.config.parameter and relates it with a field in the accounting settings for more convenience for when we'd need to enable it

closes odoo/odoo#28654
This commit is contained in:
qdp-odoo
2018-11-14 08:38:42 +00:00
parent ce611ae439
commit 3c36745672
2 changed files with 10 additions and 0 deletions
@@ -18,3 +18,4 @@ class ResConfigSettings(models.TransientModel):
related="company_id.l10n_ch_isr_scan_line_left", readonly=False)
l10n_ch_isr_scan_line_top = fields.Float(string='Vertical offset',
related="company_id.l10n_ch_isr_scan_line_top", readonly=False)
l10n_ch_print_qrcode = fields.Boolean("Print Swiss QR Code", config_parameter='l10n_ch.print_qrcode')
@@ -8,6 +8,15 @@
<field name="arch" type="xml">
<xpath expr="//div[@id='invoicing_settings']" position="inside">
<div class="col-12 col-lg-6 o_setting_box" id="l10n_ch-isr_print_bank">
<div class="o_setting_left_pane">
<field name="l10n_ch_print_qrcode"/>
</div>
<div class="o_setting_right_pane">
<label for="l10n_ch_print_qrcode"/>
<div class="text-muted">
Append the QR Code ISR at the end of customer invoices for Swiss customers
</div>
</div>
<div class="o_setting_left_pane">
<field name="l10n_ch_isr_print_bank_location"/>
</div>