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

[17.0][MIG] web_widget_open_tab: Migration to 17.0 #2671

Merged
merged 21 commits into from
May 18, 2024

Conversation

moitabenfdz
Copy link

No description provided.

@moitabenfdz moitabenfdz mentioned this pull request Nov 16, 2023
26 tasks
@legalsylvain
Copy link
Contributor

/ocabot migration web_widget_open_tab

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Nov 16, 2023
@jcdrubay
Copy link

I got an "Odoo Client Error" when testing on Runboat

image

UncaughtClientError > TypeError
Uncaught Javascript Error > Cannot read properties of undefined (reading 'writeText')
TypeError: Cannot read properties of undefined (reading 'writeText')
    at ClientErrorDialog.onClickClipboard (http://oca-web-17-0-pr2671-b735f29c7038.runboat.odoo-community.org/web/assets/97c98b1/web.assets_web.min.js:2329:48)
    at Object.mainEventHandler (http://oca-web-17-0-pr2671-b735f29c7038.runboat.odoo-community.org/web/assets/97c98b1/web.assets_web.min.js:1551:77)
    at HTMLButtonElement.listener (http://oca-web-17-0-pr2671-b735f29c7038.runboat.odoo-community.org/web/assets/97c98b1/web.assets_web.min.js:726:15)
    ```


How to reproduce:

- install the app contact
- From the tree view of partners, update the tree view and change the line for the field parent_id to `<field name="parent_id" readonly="1" widget="open_tab"/>` or  `<field name="parent_id" widget="open_tab"/>`


Also, when opening the list of users from the general Settings page, the breadcrumbs was lost.

Note: I also wanted to test the breadcrumbs was kept when adding the field write_uid to the list of Contact I ll try that next.

@moitabenfdz
Copy link
Author

@jcdrubay I think that 2 things were not in v16 either (or I couldn't make it work). I only was able to use that widget in an id field. I think it will be good improvements but maybe you should create an issue to ask for enhancement of this module.

@@ -13,7 +13,7 @@ export class OpenTabWidget extends Component {
var url = window.location.href;
var searchParams = new URLSearchParams(url.split("#")[1]);
searchParams.set("view_type", "form");
searchParams.set("id", this.props.value);
searchParams.set("id", this.props.record.data.id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might be the problem with the change suggested. By doing this, this will only work with id field

Copy link
Contributor

@CRogos CRogos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like to merge these two commits to trigger a rebuild of the database?

Code review LGTM.

image

@CRogos
Copy link
Contributor

CRogos commented Apr 18, 2024

@moitabenfdz are you still working on this?

Copy link
Contributor

@CRogos CRogos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code + functional review LGTM

Copy link

@MohamedOsman7 MohamedOsman7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functional & code review LGTM

@dreispt
Copy link
Sponsor Member

dreispt commented May 18, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-2671-by-dreispt-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d3a8f98 into OCA:17.0 May 18, 2024
3 of 5 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9caf999. Thanks a lot for contributing to OCA. ❤️

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.