-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[10.0] [FIX] [web_timeline] Correct write when grouped by #678
Conversation
Hey @JBF91, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
Thanks for the patch. Please don't add extra blank lines. They don't add anything and make less clear the code read. |
And please sign the CLA. |
@@ -283,6 +284,7 @@ odoo.define('web_timeline.TimelineView', function (require) { | |||
var self = this; | |||
var data = []; | |||
var groups = []; | |||
this.grouped_by = group_bys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
at the end
@@ -404,7 +406,9 @@ odoo.define('web_timeline.TimelineView', function (require) { | |||
time.auto_date_to_str(start, self.fields[self.fields_view.arch.attrs.date_start].type); | |||
data[self.fields_view.arch.attrs.date_stop] = | |||
time.auto_date_to_str(end, self.fields[self.fields_view.arch.attrs.date_stop].type); | |||
data[self.fields_view.arch.attrs.default_group_by] = group; | |||
if(self.grouped_by){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space between if
and the expression
@@ -404,7 +406,9 @@ odoo.define('web_timeline.TimelineView', function (require) { | |||
time.auto_date_to_str(start, self.fields[self.fields_view.arch.attrs.date_start].type); | |||
data[self.fields_view.arch.attrs.date_stop] = | |||
time.auto_date_to_str(end, self.fields[self.fields_view.arch.attrs.date_stop].type); | |||
data[self.fields_view.arch.attrs.default_group_by] = group; | |||
if(self.grouped_by){ | |||
data[self.grouped_by[0]] = group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
at the end.
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
* [FIX] Correct write when grouped by * Remove blank lines * Minor changes
When you are working with the timeline view and you have grouped your items, you can extend or reduce the time duration of each item, but also change the group they belong, by dragging up or down the record.
I think that changing the group does not work as it should, since is writing the record but having as reference the "default_group_by" defined in the view attrs, instead of the current "group_by" condition defined in the search view box.
I've made a fix and tested myself but just for a while. Hope is useful