[IMP] account_usability_akretion : Replace error by warning in case a user try to reverse an already reversed account move

The goal is to allow multiple refund for a single invoice. It may happen to refund invoice partially and they refund again partially later.
This commit is contained in:
Florian da Costa
2024-08-28 15:26:33 +02:00
parent 3b5b64349b
commit c09e3a1108
4 changed files with 58 additions and 14 deletions

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_account_move_reversal" model="ir.ui.view">
<field name="model">account.move.reversal</field>
<field name="inherit_id" ref="account.view_account_move_reversal"/>
<field name="arch" type="xml">
<field name="residual" position="before">
<div
class="alert alert-warning"
role="alert"
attrs="{'invisible': [('already_reversed_warning', '=', False)]}"
>
You are about to reverse entries that have already been reversed or partially reversed (refund). Make sure it is intented.
Already reversed entries are the following :
<field
name="already_reversed_warning"
/>
</div>
</field>
</field>
</record>
</odoo>