[19.0] web_m2x_options: system parameter + m2o options not working properly when no records

Open
#3,776 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@CristhianAC is already working on this.

Since Nov 2, 2026.

  • #3784 by @CristhianAC — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, python
Domain
backend, frontend

Research direction

Start in the web_m2x_options addon’s many2one option handling and trace how the system parameter web_m2x_options.create_edit and the field’s create_edit option are combined when the search has no results. Compare that empty result path with the path that shows “Search more” and permits creating a record. Done means the field option enables the create option even when the system parameter is false and no records exist; the issue does not name files or tests.

Written by the indexing model from the issue text.

Description

bug

Module

web_m2x_options

Describe the bug

Not showing create option when there is no record yet on a many2one field and setting web_m2x_options.create_edit to False + m2o field with options create_edit: True (field option should have priority over system parameter for that field). It shows No records instead, and no way to create one.

Image

To Reproduce

Affected versions: v19

Steps to reproduce the behavior:

  1. Set the system paremeter "web_m2x_options.create_edit" with value False
  2. Set a m2o field with options={'create_edit': True}
  3. Get to the master record with the m2o inside the form view
  4. Try to create a record within the m2o field

Expected behavior
It should display the create option

Additional context
If the master record has at least one previously created and related record, it shows the search more option and then you can create the record clicking on "New" record, but if there is no related record yet, it shows "No records" and no way to create it.

Dominant language
JavaScript
Stars
1.2k
Forks
2.2k
Avg merge
3d 15h
Merged PRs (30d)
30

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/web

All issues in OCA/web

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.