Skip to content
Snippets Groups Projects
Commit 53e83ae9 authored by Laurent Smet's avatar Laurent Smet
Browse files

[FIX] account: Fix the 'state' live-cycle of account.payment

Introduced by https://github.com/odoo/odoo/commit/ab483a3a6610a09391ec00e9c1c49489ca4a4f12


There was no way to exit the 'cancelled' state of an account.payment.
The new live-cycle is:
- draft -> posted -> sent -> reconciled -> cancelled
- action_draft to move the account.payment from ('cancelled', 'posted', 'sent', 'reconciled') -> 'draft'
- cancel to move the account.payment from 'draft' -> 'cancel'

closes odoo/odoo#40179

Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
parent ab7f501f
Branches
Tags
No related merge requests found
......@@ -124,8 +124,8 @@
<form string="Register Payment">
<header>
<button name="post" class="oe_highlight" states="draft" string="Confirm" type="object"/>
<button name="action_draft" class="btn btn-secondary" states="posted" string="Reset To Draft" type="object"/>
<button name="cancel" attrs="{'invisible': [('state', 'in', ('cancelled', 'posted'))]}" string="Cancel" type="object"/>
<button name="action_draft" class="btn btn-secondary" attrs="{'invisible': [('state', '=', 'draft')]}" string="Reset To Draft" type="object"/>
<button name="cancel" states="draft" string="Cancel" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted,reconciled,cancelled"/>
</header>
<sheet>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment