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] sale_project: editable views for action_view_task #163594
Closed
Closed
Conversation
This file contains 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
Steps to reproduce ================== - Install sale_project,industry_fsm,web_studio - Open quotation S00023 - Click on the Tasks stat button - Open studio - Go to views - Enable the gantt view => Unable to complete the operation: duplicate key value violates unique constraint "act_window_view_unique_mode_per_action" Cause of the issue ================== The [action record] already contains the gantt view, but it is replaced inside the python [action]. In [previous] version, the user was entering this condition and thus had no problem editing the views Solution ======== Instead of replacing the entire action['views'], we can remap the view ids to the ones we want. One side effect of this though is that the `gantt,activity,map` views will be available by default. --- [action record]: https://github.com/odoo/enterprise/blob/1df090289f3c45c200d133734989a6d9a8073145/project_enterprise/views/project_task_views.xml#L227 [action]: https://github.com/odoo/odoo/blob/1a9302dc3a9b0d9323612c10e0f3a91300bb89fd/addons/sale_project/models/sale_order.py#L154 [previous]: https://github.com/odoo/odoo/blob/8dbcd3d955e7270fc26a6141e8fce751029e5a4b/addons/sale_project/models/sale_order.py#L133-L141 opw-3800071 X-original-commit: e331798
This PR targets 17.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
pushed a commit
that referenced
this pull request
Apr 27, 2024
Steps to reproduce ================== - Install sale_project,industry_fsm,web_studio - Open quotation S00023 - Click on the Tasks stat button - Open studio - Go to views - Enable the gantt view => Unable to complete the operation: duplicate key value violates unique constraint "act_window_view_unique_mode_per_action" Cause of the issue ================== The [action record] already contains the gantt view, but it is replaced inside the python [action]. In [previous] version, the user was entering this condition and thus had no problem editing the views Solution ======== Instead of replacing the entire action['views'], we can remap the view ids to the ones we want. One side effect of this though is that the `gantt,activity,map` views will be available by default. --- [action record]: https://github.com/odoo/enterprise/blob/1df090289f3c45c200d133734989a6d9a8073145/project_enterprise/views/project_task_views.xml#L227 [action]: https://github.com/odoo/odoo/blob/1a9302dc3a9b0d9323612c10e0f3a91300bb89fd/addons/sale_project/models/sale_order.py#L154 [previous]: https://github.com/odoo/odoo/blob/8dbcd3d955e7270fc26a6141e8fce751029e5a4b/addons/sale_project/models/sale_order.py#L133-L141 opw-3800071 closes #163594 X-original-commit: e331798 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
@hubvd @xavierbol staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/build/61927995) |
robodoo retry |
willylohws
pushed a commit
to willylohws/odoo
that referenced
this pull request
May 1, 2024
Steps to reproduce ================== - Install sale_project,industry_fsm,web_studio - Open quotation S00023 - Click on the Tasks stat button - Open studio - Go to views - Enable the gantt view => Unable to complete the operation: duplicate key value violates unique constraint "act_window_view_unique_mode_per_action" Cause of the issue ================== The [action record] already contains the gantt view, but it is replaced inside the python [action]. In [previous] version, the user was entering this condition and thus had no problem editing the views Solution ======== Instead of replacing the entire action['views'], we can remap the view ids to the ones we want. One side effect of this though is that the `gantt,activity,map` views will be available by default. --- [action record]: https://github.com/odoo/enterprise/blob/1df090289f3c45c200d133734989a6d9a8073145/project_enterprise/views/project_task_views.xml#L227 [action]: https://github.com/odoo/odoo/blob/1a9302dc3a9b0d9323612c10e0f3a91300bb89fd/addons/sale_project/models/sale_order.py#L154 [previous]: https://github.com/odoo/odoo/blob/8dbcd3d955e7270fc26a6141e8fce751029e5a4b/addons/sale_project/models/sale_order.py#L133-L141 opw-3800071 closes odoo#163594 X-original-commit: e331798 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by: Hubert Van De Walle <huvw@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.
Steps to reproduce
=> Unable to complete the operation: duplicate key value violates unique constraint "act_window_view_unique_mode_per_action"
Cause of the issue
The action record already contains the gantt view, but it is replaced inside the python action.
In previous version, the user was entering this condition and thus had no problem editing the views
Solution
Instead of replacing the entire action['views'], we can remap the view ids to the ones we want.
One side effect of this though is that the
gantt,activity,map
views will be available by default.opw-3800071
Forward-Port-Of: #163170