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] figure,chart: Enforce unicity of figure ids #2166

Closed
wants to merge 1 commit into from

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented Mar 4, 2023

Description:

The issue of duplicated chart ids was first addressed in PR #2102 by
trying to defined chart ids per sheet (just like figures)
Unfortunately, the fix was not appropriate for several reasons:

  1. Some commands in Odoo were not dispatching the sheetId along with the
    chartId, making the mapping sheetId, chartId hazardous
  2. There was absolutely 0 verification that the commands targeting a
    chartId were also providing a sheet Id that matched. So the said
    commands cannot be trusted either

This commit is exploring the other solution that is forcing the unicity
of a figure id. The data are adapted so that figures with a duplicated
id well have the latter updated to ensure unicity.

This commit also tries to solve the wrong sheetId parameter in
UPDATE_CHART by simply ignoring it in the commands. It's not necesarry
since we now have the unicity of figure ids.
15.0-fix-charts-rar (#2157)
description of this task, what is implemented and why it is implemented that way.

Odoo task ID : TASK_ID

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_lt("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

Forward-Port-Of: #2165
Forward-Port-Of: #2157

@robodoo
Copy link
Collaborator

robodoo commented Mar 4, 2023

@fw-bot
Copy link
Collaborator Author

fw-bot commented Mar 4, 2023

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

@fw-bot
Copy link
Collaborator Author

fw-bot commented Mar 4, 2023

@rrahir @pro-odoo ci/runbot failed on this forward-port PR

@rrahir rrahir force-pushed the saas-16.1-15.0-fix-charts-rar-m2p0-fw branch from 3670e37 to 6be3c6d Compare March 4, 2023 15:40
@rrahir
Copy link
Collaborator

rrahir commented Mar 4, 2023

@robodoo r+

@fw-bot
Copy link
Collaborator Author

fw-bot commented Mar 4, 2023

@rrahir @pro-odoo this PR was modified / updated and has become a normal PR. It should be merged the normal way (via @robodoo)

The issue of duplicated chart ids was first addressed in PR #2102 by
trying to defined chart ids per sheet (just like figures)
Unfortunately, the fix was not appropriate for several reasons:
1. Some commands in Odoo were not dispatching the sheetId along with the
   chartId, making the mapping sheetId, chartId hazardous
2. There was absolutely 0 verification that the commands targeting a
   chartId were also providing a sheet Id that matched. So the said
   commands cannot be trusted either

This commit is exploring the other solution that is forcing the unicity
of a figure id. The data are adapted so that figures with a duplicated
id well have the latter updated to ensure unicity.

This commit also tries to solve the wrong `sheetId` parameter in
`UPDATE_CHART` by simply ignoring it in the commands. It's not necesarry
since we now have the unicity of figure ids.

X-original-commit: f56c6eb
@rrahir rrahir force-pushed the saas-16.1-15.0-fix-charts-rar-m2p0-fw branch from 6be3c6d to ef56cf9 Compare March 5, 2023 19:27
@rrahir
Copy link
Collaborator

rrahir commented Mar 5, 2023

@robodoo r+

robodoo pushed a commit that referenced this pull request Mar 5, 2023
The issue of duplicated chart ids was first addressed in PR #2102 by
trying to defined chart ids per sheet (just like figures)
Unfortunately, the fix was not appropriate for several reasons:
1. Some commands in Odoo were not dispatching the sheetId along with the
   chartId, making the mapping sheetId, chartId hazardous
2. There was absolutely 0 verification that the commands targeting a
   chartId were also providing a sheet Id that matched. So the said
   commands cannot be trusted either

This commit is exploring the other solution that is forcing the unicity
of a figure id. The data are adapted so that figures with a duplicated
id well have the latter updated to ensure unicity.

This commit also tries to solve the wrong `sheetId` parameter in
`UPDATE_CHART` by simply ignoring it in the commands. It's not necesarry
since we now have the unicity of figure ids.

closes #2166

X-original-commit: f56c6eb
Signed-off-by: Pierre Rousseau (pro) <[email protected]>
Signed-off-by: Rémi Rahir (rar) <[email protected]>
@robodoo robodoo temporarily deployed to merge March 5, 2023 19:40 Inactive
@robodoo robodoo closed this Mar 5, 2023
@fw-bot fw-bot deleted the saas-16.1-15.0-fix-charts-rar-m2p0-fw branch March 19, 2023 19:46
Topdev97 added a commit to Topdev97/o-spreadsheet that referenced this pull request Nov 18, 2024
The issue of duplicated chart ids was first addressed in PR #2102 by
trying to defined chart ids per sheet (just like figures)
Unfortunately, the fix was not appropriate for several reasons:
1. Some commands in Odoo were not dispatching the sheetId along with the
   chartId, making the mapping sheetId, chartId hazardous
2. There was absolutely 0 verification that the commands targeting a
   chartId were also providing a sheet Id that matched. So the said
   commands cannot be trusted either

This commit is exploring the other solution that is forcing the unicity
of a figure id. The data are adapted so that figures with a duplicated
id well have the latter updated to ensure unicity.

This commit also tries to solve the wrong `sheetId` parameter in
`UPDATE_CHART` by simply ignoring it in the commands. It's not necesarry
since we now have the unicity of figure ids.

closes odoo/o-spreadsheet#2166

X-original-commit: f56c6eb8c7f88599ae49e17f137079ca3b925aa4
Signed-off-by: Pierre Rousseau (pro) <[email protected]>
Signed-off-by: Rémi Rahir (rar) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants