Commit 5669952
committed
[FIX] account_payment_pro: remove state from constraint on to_pay_move_line_ids
Allow resetting to draft when a payment has inconsistent 'to_pay_move_line_ids' that were previously modified.
Removing 'state' from the constraint dependencies prevents validation errors during the
'reset to draft' flow of an invoice.
This issue occurs when to pay move lines initially created with the payment's account are later modified to a different account.
By removing the state trigger, we avoid re-validating account consistency during state transitions
that don't involve line modifications.
Steps to Reproduce
1. Create and Post an Invoice:
2. Register a Payment with multiple To Pay move lines:
Click on Register Payment from the invoice.
3. Manually Modify an un-reconciled To Pay move line:
Exaple: Change the Account of this specific line to a different one (e.g., from "Receivable" to "Other Current Assets").
4.Go back to the original Invoice (the one reconciled with the payment).
5. Click the Reset to Draft button.
closes #967
Signed-off-by: Juan José Scarafía <jjs@adhoc.com.ar>1 parent c91be66 commit 5669952
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| 665 | + | |
665 | 666 | | |
666 | 667 | | |
667 | 668 | | |
| |||
0 commit comments