odoo/odoo#277883
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: (runtime 1096s)
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 3s)
- ci/documentation: (runtime 1054s)
- ci/design-theme: (runtime 1885s)
- label
- odoo-dev:19.0-18.0-expense-guard-1-549199-fw
- head
- 8a7aba4829bbcc6f79ea3e41874b54583608430c
- merged
- 5 days ago by Accounting, Julien Alardot (jual)
| odoo/odoo | |
|---|---|
| 18.0 | #277423 |
| saas-18.3 | #277737 |
| saas-18.4 | #277863 |
| 19.0 | #277883 |
| saas-19.1 | #277894 |
| saas-19.2 | #277903 |
| saas-19.3 | #277920 |
| saas-19.4 | #277938 |
| master | #278016 |
[FIX] hr_expense: protect the journal and memo of expense payments
Before this commit, the journal and the memo of a payment linked to a company-paid expense report could be modified although such payments must be kept consistent with their expense report: a missing comma in the set of protected fields merged 'journal_id' and 'ref' into a single meaningless entry. The memo was also left editable because the set still referred to 'ref', which was renamed to 'memo'.
Steps to reproduce:
- submit, approve and post an expense paid by company
- open the payment created for the expense report
- edit the memo or the journal and save, then try to edit the date
Editing the date is refused with "You cannot do this modification since the payment is linked to an expense report", while the memo and journal changes are silently accepted.
Solution:
Restore the missing comma and protect the renamed memo field.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr