17.0-20240627: [FIX] *_expense: update approval_state and forbids unrealistic case when
osimallen
released this
27 Jun 16:18
·
1741 commits
to 17.0
since this release
refusing expense sheet * = hr_expense, project_sale_expense -STEP TO REPRODUCE: Create an expense sheet , submit then approve it as well, go to Pg admin or update the view manually to see the field 'approval_state'. The 'approval_state' is now approved. After that try to refuse the sheet, 'approval_state' still approved while it should be consider 'cancel' (Refuse) -Solution is to forbids unrealistic case where we shouldn't allow user to cancel when it linked to a journal entry and also update approval state as well-> Therefore some test in 'test_project_profitability' need to adapt closes odoo/odoo#168430 Signed-off-by: Antoine Dupuis (andu) <[email protected]>