Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] web: list: tolerate editable"1" (only in stable) #162906

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 22, 2024

A few x2many list embedded in form views have the "editable" attr set to "1". Normally, the valid values for this attribute are "top" and "bottom". Regular list views are validated, but not list inside form views.

When set to "1", some features of the model aren't enabled. For instance, when the current page is full and the user adds a record, the limit isn't temporarilly increased for the added to be dusplayed on the current page, like it would be in editable="bottom" lists, so the user doesn't see the record he just added.

The issue can be observed in the stock move form view for instance.

This commit is only good for stable versions: we add a fallback on "bottom" s.t. if the editable attribute is set, it's always either "top" or "bottom".

In master, we'll probably rethink the API.

opw~3860903

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #162832

A few x2many list embedded in form views have the "editable" attr
set to "1". Normally, the valid values for this attribute are "top"
and "bottom". Regular list views are validated, but not lists
inside form views.

When set to "1", some features of the model aren't enabled. For
instance, when the current page is full and the user adds a record,
the limit isn't temporarilly increased for the added record to be
displayed on the current page, like it would be in editable="bottom"
lists, so the user doesn't see the record he just added.

The issue can be observed in the stock move form view for instance.

This commit is only good for stable versions: we add a fallback
on "bottom" s.t. if the editable attribute is set, it's always
either "top" or "bottom".

In master, we'll probably rethink the API.

opw~3860903

X-original-commit: bfffd2e
@robodoo
Copy link
Contributor

robodoo commented Apr 22, 2024

Pull request status dashboard.

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 22, 2024

This PR targets saas-17.1 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

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 22, 2024
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Apr 22, 2024
robodoo pushed a commit that referenced this pull request Apr 23, 2024
A few x2many list embedded in form views have the "editable" attr
set to "1". Normally, the valid values for this attribute are "top"
and "bottom". Regular list views are validated, but not lists
inside form views.

When set to "1", some features of the model aren't enabled. For
instance, when the current page is full and the user adds a record,
the limit isn't temporarilly increased for the added record to be
displayed on the current page, like it would be in editable="bottom"
lists, so the user doesn't see the record he just added.

The issue can be observed in the stock move form view for instance.

This commit is only good for stable versions: we add a fallback
on "bottom" s.t. if the editable attribute is set, it's always
either "top" or "bottom".

In master, we'll probably rethink the API.

opw~3860903

closes #162906

X-original-commit: bfffd2e
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
@robodoo robodoo closed this Apr 23, 2024
@fw-bot fw-bot deleted the saas-17.1-17.0-x2many-multi-page-add-aab-nWO_-fw branch May 7, 2024 09:46
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 OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants