Activity creation without model_id

Open
#340 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@parabol123654 is already working on this.

Since Nov 9, 2026.

  • #346 by @parabol123654 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

The failure is in action_notify_team in mail_activity.py, around line 207, where the check activity.res_id not in classified[activity.res_model]["record_ids"] runs for activities with no model. Reproduce by creating a mail activity without a res_model or res_id and saving it. Done means that save succeeds without error. Pull request #346 already targets this, so review it before starting new work.

Written by the indexing model from the issue text.

Description

bug

Module

mail_activity_team

Describe the bug

When we create an activity from scratch without a model (purchase or sale ordre, project, ...), an error occurs because of a clause if : "if activity.res_id not in classified[activity.res_model]["record_ids"]:" (line 207 in action_notify_team, in mail_activity.py.

Errorwhileactivitycreationwithoutmodel_id-ee2f700c-245f-4205-8d91-b5.pdf

Errorwhileactivitycreationwithoutmodel_id-ee2f700c-245f-4205-8d91-b5.pdf

To Reproduce

Affected versions: V19 (not tested on other versions)

Steps to reproduce the behavior:

  1. Create an activity from scratch
  2. Save the activity
Dominant language
Python
Stars
36
Forks
180
Avg merge
4d 2h
Merged PRs (30d)
14

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OCA/mail

All issues in OCA/mail

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.