Skip to content

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Mar 11, 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.

Forward-Port-Of: #201053
Forward-Port-Of: #200549

- 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
@robodoo
Copy link
Contributor

robodoo commented Mar 11, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 11, 2025

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 robodoo added the forwardport This PR was created by @fw-bot label Mar 11, 2025
@C3POdoo C3POdoo added the RD research & development, internal work label Mar 11, 2025
@jpp-odoo
Copy link
Contributor

@robodoo r+

@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 12, 2025

@jpp-odoo @aab-odoo child PR #201187 was modified / updated and has become a normal PR. This PR (and any of its parents) will need to be merged independently as approvals won't cross.

@robodoo robodoo closed this in 6c3dbb9 Mar 12, 2025
@jpp-odoo jpp-odoo deleted the 18.0-17.0-save_many2many_tags_dirty_wo_changes-jpp-421727-fw branch March 13, 2025 08:08
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

forwardport This PR was created by @fw-bot RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants