-
Notifications
You must be signed in to change notification settings - Fork 30.1k
[FW][FIX] web: save a dirty record without changes #201160
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
Closed
fw-bot
wants to merge
1
commit into
odoo:18.0
from
odoo-dev:18.0-17.0-save_many2many_tags_dirty_wo_changes-jpp-421727-fw
Closed
[FW][FIX] web: save a dirty record without changes #201160
fw-bot
wants to merge
1
commit into
odoo:18.0
from
odoo-dev:18.0-17.0-save_many2many_tags_dirty_wo_changes-jpp-421727-fw
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Open a record (e.g., a project task); - Add a tag to a `many2many_tags` field; - Remove the previously added tag; - The record should be dirty (the save icon should be visible); - Click on the save icon/or click to pager next. Before this commit, the UI does nothing. It doesn't save, or it doesn't go to the next record if you click on the pager next. This is because even if the record is considered dirty, because some changes have been made (adding and removing tags), there are no changes. And a condition prevents to call the `web_save` RPC from being called if there are no changes. If the `web_save` RPC is not called, we do nothing. In this commit, we change this condition so that if the `web_save` RPC is not called, we mark the record as not dirty. When we move to another record (pager next), we do not need to mark the current record as not dirty, but the next record is loaded. X-original-commit: 43fb8a4
This PR targets 18.0 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 r+ |
gamarino
pushed a commit
to numaes/numa-public-odoo
that referenced
this pull request
Mar 17, 2025
- Open a record (e.g., a project task); - Add a tag to a `many2many_tags` field; - Remove the previously added tag; - The record should be dirty (the save icon should be visible); - Click on the save icon/or click to pager next. Before this commit, the UI does nothing. It doesn't save, or it doesn't go to the next record if you click on the pager next. This is because even if the record is considered dirty, because some changes have been made (adding and removing tags), there are no changes. And a condition prevents to call the `web_save` RPC from being called if there are no changes. If the `web_save` RPC is not called, we do nothing. In this commit, we change this condition so that if the `web_save` RPC is not called, we mark the record as not dirty. When we move to another record (pager next), we do not need to mark the current record as not dirty, but the next record is loaded. closes odoo/odoo#201160 X-original-commit: 43fb8a45ac629c1883ca9521a8879cf19ca7538b Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
omar-sherif9992
pushed a commit
to odoo-dev/odoo
that referenced
this pull request
Mar 26, 2025
- Open a record (e.g., a project task); - Add a tag to a `many2many_tags` field; - Remove the previously added tag; - The record should be dirty (the save icon should be visible); - Click on the save icon/or click to pager next. Before this commit, the UI does nothing. It doesn't save, or it doesn't go to the next record if you click on the pager next. This is because even if the record is considered dirty, because some changes have been made (adding and removing tags), there are no changes. And a condition prevents to call the `web_save` RPC from being called if there are no changes. If the `web_save` RPC is not called, we do nothing. In this commit, we change this condition so that if the `web_save` RPC is not called, we mark the record as not dirty. When we move to another record (pager next), we do not need to mark the current record as not dirty, but the next record is loaded. closes odoo#201160 X-original-commit: 43fb8a4 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
many2many_tags
field;Before this commit, the UI does nothing. It doesn't save, or it doesn't go to
the next record if you click on the pager next. This is because even if the
record is considered dirty, because some changes have been made (adding and
removing tags), there are no changes. And a condition prevents to call the
web_save
RPC from being called if there are no changes. If theweb_save
RPC is not called, we do nothing.
In this commit, we change this condition so that if the
web_save
RPC is notcalled, we mark the record as not dirty. When we move to another record (pager
next), we do not need to mark the current record as not dirty, but the next
record is loaded.
Forward-Port-Of: #201053
Forward-Port-Of: #200549