Skip to content

[FIX] hr_expense: protect the journal and memo of expense payments#277883

Closed
fw-bot wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-18.0-expense-guard-1-549199-fw
Closed

[FIX] hr_expense: protect the journal and memo of expense payments#277883
fw-bot wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-18.0-expense-guard-1-549199-fw

Conversation

@fw-bot

@fw-bot fw-bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

Forward-Port-Of: #277737
Forward-Port-Of: #277423

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.

closes odoo#277423

Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
X-original-commit: e562afb
@robodoo

robodoo commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Jul 22, 2026
@fw-bot

fw-bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

This PR targets 19.0 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants