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

[18.0][MIG] sale_timesheet_line_exclude: Migration to 18.0 #728

Open
wants to merge 26 commits into
base: 18.0
Choose a base branch
from

Conversation

BhaveshHeliconia
Copy link

No description provided.

alexey-pelykh and others added 22 commits January 2, 2025 17:08
* [FIX] sale_timesheet_line_exclude: fix manifest
* [FIX] sale_timesheet_task_exclude: fix manifest
Currently translated at 100.0% (5 of 5 strings)

Translation: timesheet-15.0/timesheet-15.0-sale_timesheet_line_exclude
Translate-URL: https://translation.odoo-community.org/projects/timesheet-15-0/timesheet-15-0-sale_timesheet_line_exclude/fr/
@BhaveshHeliconia BhaveshHeliconia mentioned this pull request Jan 2, 2025
7 tasks
Copy link

@JessBrandl JessBrandl left a comment

Choose a reason for hiding this comment

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

Code looks good, I ran it in runboat and it worked as intended except the following:
I came across an error that was already present in previous versions after some testing; If you go to Timesheets, then Reporting>By Billing Type it will throw an error I cannot place.
image

UncaughtPromiseError > OwlError Uncaught Promise > The following error occurred in onWillStart: "Cannot read properties of undefined (reading 'type')" OwlError: The following error occurred in onWillStart: "Cannot read properties of undefined (reading 'type')" Error at wrapError (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:10180:23) (/web/static/lib/owl/owl.js:2631) at onWillStart (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:10224:29) (/web/static/lib/owl/owl.js:2675) at WithSearch.setup (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:75487:9) (/web/static/src/search/with_search/with_search.js:43) at new ComponentNode (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:9928:28) (/web/static/lib/owl/owl.js:2379) at https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:13524:28 (/web/static/lib/owl/owl.js:5975) at View.template (eval at compile (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:13248:20), <anonymous>:22:12) (/web/static/lib/owl/owl.js:5699) at Fiber._render (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:9278:38) (/web/static/lib/owl/owl.js:1729) at Fiber.render (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:9270:18) (/web/static/lib/owl/owl.js:1721) at ComponentNode.initiateRender (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:9950:23) (/web/static/lib/owl/owl.js:2401) Caused by: TypeError: Cannot read properties of undefined (reading 'type') at SearchArchParser.visitField (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:71007:49) (/web/static/src/search/search_arch_parser.js:126) at https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:70959:26 (/web/static/src/search/search_arch_parser.js:78) at visit (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:42466:41) (/web/static/src/core/utils/xml.js:51) at visitChildren (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:42462:21) (/web/static/src/core/utils/xml.js:47) at SearchArchParser.visitSearch (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:71148:9) (/web/static/src/search/search_arch_parser.js:267) at https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:70948:26 (/web/static/src/search/search_arch_parser.js:67) at visit (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:42466:41) (/web/static/src/core/utils/xml.js:51) at visitXML (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:42473:5) (/web/static/src/core/utils/xml.js:58) at SearchArchParser.parse (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:70945:9) (/web/static/src/search/search_arch_parser.js:64) at PivotSearchModel.load (https://c4a8.odoo.com/web/assets/debug/web.assets_web.js:72457:78) (/web/static/src/search/search_model.js:297)

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-sale_timesheet_line_exclude branch from 0b76d81 to 8417693 Compare February 7, 2025 10:23
@sbidoul
Copy link
Member

sbidoul commented Feb 14, 2025

Can you pick the commits from #707 ?

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-sale_timesheet_line_exclude branch from 8417693 to 9fb186c Compare February 18, 2025 12:05
We don't copy the field by default, because it breaks the
OE timesheet grid for users in the security group that hides
the field.

Functionally, it also makes sens to not copy this field,
because it is better to consider the new line not excluded
by default.
@BhaveshHeliconia
Copy link
Author

BhaveshHeliconia commented Feb 18, 2025

@sbidoul , yes.it's done.

Copy link

@JessBrandl JessBrandl left a comment

Choose a reason for hiding this comment

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

Works fine, except that the user is not by default given access to the non-billable field; see #719 .

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-sale_timesheet_line_exclude branch from 88ddc62 to e33f08b Compare February 21, 2025 04:38
@BhaveshHeliconia
Copy link
Author

@JessBrandl, Please let me know if I've missed anything based on your comment.

@JessBrandl
Copy link

@JessBrandl, Please let me know if I've missed anything based on your comment.

@HeliconiaSolutions Currently the user still does not have the rights to the non-billable field by default. There is a PR available that fixes that problem. It still needs a review so maybe you can have a look and then possibly cherry pick it for this mig issue?
#741

@BhaveshHeliconia
Copy link
Author

@JessBrandl, Please Review.It's Done.

Copy link

@JessBrandl JessBrandl left a comment

Choose a reason for hiding this comment

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

Tested in Runboat and works as intended now, code also LGTM.

Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

I have compared this to #719, and there are several differences I can't explain.

Some asserts removed from tests, a compute method renamed, etc.

I think this PR should be re-done when #719 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.