[19.0] web_m2x_options: system parameter + m2o options not working properly when no records
Maintainers usually reply within 1 day
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
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
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.
To Reproduce
Affected versions: v19
Steps to reproduce the behavior:
- Set the system paremeter "web_m2x_options.create_edit" with value False
- Set a m2o field with options={'create_edit': True}
- Get to the master record with the m2o inside the form view
- 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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OCA/web
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[19.0] web_timeline: ValueError "Invalid field 'date_start:month'" when grouping by a date fieldPossibly taken @stferraro claimed this today. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Migration to version 20.0Possibly taken A pull request linked to this issue is open or already merged. Openhelp wanted no stale work in progress
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
Similar issues
-
bug package:workers-shared
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/workers-sdk#16924 · 1 comment ·
Maintainers usually reply within 1 day
-
dashboard
Difficulty 2/5 Half a day Newbie friendliness 78/100
damodharg6/payledger#9 ·
-
parse: child keys like `007`, `1e3`, `0x1f`, `-1` make the parent an empty array and hide the valueOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area/mobile area/ui good first issue
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
natemoo-re/ultrahtml#102 ·