Files
odoo_source/addons/account/views/res_currency.xml
T
oco-odoo 31e1322b40 [IMP] account: don't always allow modifying the decimal places of a currency
If accounting entries have already been generated by this currency, we now forbid setting it a lesser number of decimal places (so, higher rounding factor). We also display a warning when increasing the number of decimal places, to make sure the user is aware of the impact it'll have.

closes odoo/odoo#42017

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-05 11:53:45 +00:00

21 lines
1011 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_currency_form_inherit" model="ir.ui.view">
<field name="name">res.currency.form.inherit</field>
<field name="model">res.currency</field>
<field name="inherit_id" ref="base.view_currency_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet" position="before">
<field name="display_rounding_warning" invisible="1"/>
<div class="alert alert-warning" role="alert" attrs="{'invisible': [('display_rounding_warning', '=', False)]}">
<strong>This currency has already been used to generate accounting entries.</strong> <br/>
Changing its rounding factor now will not change the rounding made on previous entries; possibly causing an inconsistency with the new ones.
</div>
</xpath>
</field>
</record>
</data>
</odoo>