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

[10.0] [FIX] [web_timeline] Correct write when grouped by #678

Merged
merged 3 commits into from Aug 17, 2017

Conversation

JBF91
Copy link
Contributor

@JBF91 JBF91 commented Jul 20, 2017

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

@oca-clabot
Copy link

Hey @JBF91, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/website.cla
Here is a list of the users:

  • @JBF91 (login unknown in OCA database)

Appreciation of efforts,
OCA CLAbot

@pedrobaeza
Copy link
Member

Thanks for the patch. Please don't add extra blank lines. They don't add anything and make less clear the code read.

@pedrobaeza
Copy link
Member

And please sign the CLA.

@yajo yajo added this to the 10.0 milestone Jul 20, 2017
@@ -283,6 +284,7 @@ odoo.define('web_timeline.TimelineView', function (require) {
var self = this;
var data = [];
var groups = [];
this.grouped_by = group_bys
Copy link
Member

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){
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

; at the end.

@hbrunn hbrunn merged commit e17f516 into OCA:10.0 Aug 17, 2017
@oca-clabot
Copy link

Hey @JBF91,
We acknowledge that the following users have signed our Contributor License Agreement:

Appreciation of efforts,
OCA CLAbot

Maartincm pushed a commit to Maartincm/web that referenced this pull request Apr 13, 2018
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
mstuttgart pushed a commit to multidadosti-erp/web that referenced this pull request Apr 26, 2018
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
fmdl pushed a commit to fmdl/web that referenced this pull request May 1, 2018
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
yaniaular pushed a commit to vauxoo-dev/web that referenced this pull request May 14, 2018
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
yaniaular pushed a commit to vauxoo-dev/web that referenced this pull request May 14, 2018
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
tarteo pushed a commit to tarteo/web that referenced this pull request Oct 23, 2018
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
thoongnv pushed a commit to thoongnv/web that referenced this pull request Dec 30, 2019
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
Tardo pushed a commit to Tecnativa/web that referenced this pull request Mar 23, 2020
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
Tardo pushed a commit to Tecnativa/web that referenced this pull request Mar 30, 2020
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
Yoshiro009 pushed a commit to ecosoft-odoo/web that referenced this pull request Nov 17, 2020
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
Murtaza-OSI pushed a commit to ursais/web that referenced this pull request Mar 15, 2021
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
cesar-tecnativa pushed a commit to Tecnativa/web that referenced this pull request Jul 5, 2022
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
cesar-tecnativa pushed a commit to Tecnativa/web that referenced this pull request Jul 5, 2022
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
CarlosRoca13 pushed a commit to Tecnativa/web that referenced this pull request Aug 2, 2022
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
bvanjeelharia pushed a commit to bvanjeelharia/web that referenced this pull request Jan 2, 2023
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
bvanjeelharia pushed a commit to bvanjeelharia/web that referenced this pull request Jan 2, 2023
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
bvanjeelharia pushed a commit to bvanjeelharia/web that referenced this pull request Mar 1, 2023
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
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.

None yet

5 participants