From acc94d74c3332e75dc005dcb51774bb5a423549e Mon Sep 17 00:00:00 2001 From: CarlosRoca13 Date: Tue, 2 Aug 2022 14:31:54 +0200 Subject: [PATCH] [FIX] web_timeline: Allow groupby m2m fields --- web_timeline/README.rst | 23 ++++-- web_timeline/__manifest__.py | 6 +- web_timeline/readme/ROADMAP.rst | 6 ++ web_timeline/static/description/index.html | 22 ++++-- .../static/src/js/timeline_controller.js | 33 +++++---- .../static/src/js/timeline_renderer.js | 72 +++++++++++++++---- web_timeline/static/src/js/timeline_view.js | 1 + 7 files changed, 123 insertions(+), 40 deletions(-) diff --git a/web_timeline/README.rst b/web_timeline/README.rst index 4c1dd19fa..fb91d6451 100644 --- a/web_timeline/README.rst +++ b/web_timeline/README.rst @@ -14,13 +14,13 @@ Web timeline :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github - :target: https://github.com/OCA/web/tree/14.0/web_timeline + :target: https://github.com/OCA/web/tree/15.0/web_timeline :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_timeline + :target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_timeline :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/162/14.0 + :target: https://runbot.odoo-community.org/runbot/162/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -152,6 +152,12 @@ Known issues / Roadmap * Implement a more efficient way of refreshing timeline after a record update; * Make `attrs` attribute work; * Make action attributes work (create, edit, delete) like in form and tree views. +* When grouping by m2m and more than one record is set, the timeline item appears only + on one group. Allow showing in both groups. +* When grouping by m2m and dragging for changing the time or the group, the changes on + the group will not be set, because it could make disappear the records not related + with the changes that we want to make. When the item is showed in all groups change + the value according the group of the dragged item. Bug Tracker =========== @@ -159,7 +165,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -180,14 +186,17 @@ Contributors * Laurent Mignon * Adrien Peiffer -* Pedro M. Baeza * Leonardo Donelli * Adrien Didenot * Dennis Sluijk * Thong Nguyen Van -* Alexandre Díaz * Murtaza Mithaiwala * Ammar Officewala +* `Tecnativa `_: + + * Pedro M. Baeza + * Alexandre Díaz + * César A. Sánchez Maintainers ~~~~~~~~~~~ @@ -210,6 +219,6 @@ Current `maintainer `__: |maintainer-tarteo| -This module is part of the `OCA/web `_ project on GitHub. +This module is part of the `OCA/web `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_timeline/__manifest__.py b/web_timeline/__manifest__.py index 540d297ec..393e161ed 100644 --- a/web_timeline/__manifest__.py +++ b/web_timeline/__manifest__.py @@ -16,7 +16,6 @@ "license": "AGPL-3", "website": "https://github.com/OCA/web", "depends": ["web"], - "qweb": ["static/src/xml/web_timeline.xml"], "data": [], "maintainers": ["tarteo"], "application": False, @@ -29,6 +28,9 @@ "web_timeline/static/src/js/timeline_controller.js", "web_timeline/static/src/js/timeline_model.js", "web_timeline/static/src/js/timeline_canvas.js", - ] + ], + "web.assets_qweb": [ + "web_timeline/static/src/xml/web_timeline.xml", + ], }, } diff --git a/web_timeline/readme/ROADMAP.rst b/web_timeline/readme/ROADMAP.rst index 350beff62..dfe2feb51 100644 --- a/web_timeline/readme/ROADMAP.rst +++ b/web_timeline/readme/ROADMAP.rst @@ -1,3 +1,9 @@ * Implement a more efficient way of refreshing timeline after a record update; * Make `attrs` attribute work; * Make action attributes work (create, edit, delete) like in form and tree views. +* When grouping by m2m and more than one record is set, the timeline item appears only + on one group. Allow showing in both groups. +* When grouping by m2m and dragging for changing the time or the group, the changes on + the group will not be set, because it could make disappear the records not related + with the changes that we want to make. When the item is showed in all groups change + the value according the group of the dragged item. diff --git a/web_timeline/static/description/index.html b/web_timeline/static/description/index.html index 8170e6dfa..9e6069187 100644 --- a/web_timeline/static/description/index.html +++ b/web_timeline/static/description/index.html @@ -3,7 +3,7 @@ - + Web timeline