Skip to content

[18.0][FIX] fieldservice_stage_server_action#1537

Open
edescalona wants to merge 1 commit into
OCA:18.0from
BinhexTeam:18.0-fix-fieldservice_stage_server_action
Open

[18.0][FIX] fieldservice_stage_server_action#1537
edescalona wants to merge 1 commit into
OCA:18.0from
BinhexTeam:18.0-fix-fieldservice_stage_server_action

Conversation

@edescalona
Copy link
Copy Markdown

@BinhexTeam

T23058

Fixes stage server actions using stale active_ids from the previous context.

ir.actions.server.run() prioritizes active_ids over active_id. Since the current code only sets active_model and active_id, an inherited active_ids value can make the action run on the wrong record, causing MissingError.

This fix sets active_ids to the current FSM Order ID so active_model, active_id, and active_ids stay consistent.

Steps to reproduce

  1. Configure a server action on an FSM stage (Field service -> Configuration -> Stages).
image
  1. Open a Project Task.
  2. Click Create FSM Order from the task.
image
  1. Save the new FSM Order.
  2. Move the FSM Order to the stage configured in step 1.

If the task context is still present in active_ids, Odoo tries to run the server action on fsm.order(<project.task id>) and raises:

Missing Record

Record does not exist or has been deleted.
(Record: fsm.order(...), User: ...)

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @osi-scampbell, @max3903, @wolfhall, @brian10048,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:fieldservice Module fieldservice mod:fieldservice_subcontracting Module fieldservice_subcontracting mod:fieldservice_stage_server_action Module fieldservice_stage_server_action labels May 19, 2026
@edescalona edescalona force-pushed the 18.0-fix-fieldservice_stage_server_action branch from ee935f8 to 297db1a Compare May 19, 2026 15:57
@OCA-git-bot OCA-git-bot removed mod:fieldservice Module fieldservice mod:fieldservice_subcontracting Module fieldservice_subcontracting labels May 19, 2026
@edescalona edescalona force-pushed the 18.0-fix-fieldservice_stage_server_action branch from 297db1a to deec7e3 Compare May 19, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:fieldservice_stage_server_action Module fieldservice_stage_server_action series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants