summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph
AgeCommit message (Collapse)Author
2021-05-31[FIX] account, mail: link attachments to invoiceAdrien Widart
When using the "Send & Print" functionality, if the user adds an attachment, the latter won't be linked to the record. To reproduce the error: 1. Open a posted invoice 2. Send & Print 3. Attach a file > Select a file on your device 4. Send the email Error: The invoice's PDF is added to record's attachments, but not the other file (from step 3). When the module selects the attachments that need to be linked to the invoice, it only keeps the ones currently linked to `mail.compose.message`: https://github.com/odoo/odoo/blob/6441ab71cb68648aa735057952bf757677a20ee3/addons/mail/models/mail_thread.py#L1719-L1725 This is correct when the user creates a message directly in the chatter. However, when the mail is created thanks to `Send & Print` functionality, the attachment is linked to `account.invoice.send`. Another flow have a similar issue: from invoices list, select few ones, Action > Send & Print: the generated PDF won't be attached to their invoice. In such a situation, here is the source of the problem: https://github.com/odoo/odoo/blob/05ad6c477f7da2a495e5baf5b4629323b9d11fa0/addons/mail/wizard/mail_compose_message.py#L363-L367 There isn't any information about the invoice, therefore it is not possible to linked the attachment to it. OPW-2438457 closes odoo/odoo#71425 X-original-commit: e87f599d4eb22250b628d650b9f59b54db8d043c Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-01-04[FIX] web: translate report buttonMartin Trigaux
The button "Group By" and "Measures" were untranslated opw-2421769 closes odoo/odoo#63977 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-18[IMP] web: manage invisible fields in graph and pivot viewJérémy Hennecart
PURPOSE Be able to remove some measures from graph / pivot views. Currently fields are automatically added but some of them make no sense. SPECIFICATIONS Add the possibility to not display some fields in the measures dropdown for the graph and pivot views. When a field is not displayed in the measures of a pivot views we remove them also from the list of groupable fields. LINKS Task ID-2288381 Community PR #54774 Enterprise PR odoo/enterprise#11970 Upgrade PR odoo/upgrade#1519
2020-08-14[IMP] web: support action helper on gantt viewDhruv Patel
Currently, only List and Kanban view supports the action helper and display the folder icon with the helper text. With this commit we have also provided the action helper support for other views. The logic for no content helper has been moved in abstract_renderer.js so that it can be accessed by all views. This was done mainly to give the action helper to the gantt view. closes odoo/odoo#53902 Task: 2284779 Related: odoo/enterprise#11563 Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-08-12[IMP] web: sample data in graph viewMathieu Duckerts-Antoine
A previous commit has paved the way for displaying sample data in the reporting views. The present commit brings the required changes to have sample data in graph views. Task ID: 2282196 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-08-10[FIX] web: MEASURES button disappearing when switching back to graphHarpritsinh Sisodiya
before this commit, when change view from graph view to pivot view or any other view and come back to graph view, Measures button disappear, it's only appearing if we refresh the page. after this commit, restore previous view state when switching back to graph view, this was because measures button is rendered in fragment and when switching between views, as graph view element was destroyed and re-rendered so measures button will be mounted in fragment as update method of ComponentWrapper will render it from previous mountArgs, so to avoid this issue push measures element in DOM. task-2250051 closes odoo/odoo#55666 X-original-commit: 40c709fb0abe7721d1650af9bd1d17dc8453895a Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-06-22[IMP] web: disable keyboard navigation with sample dataJulien Mougenot
Previous commit introduces the sample data feature in list and kanban views. When sample data is displayed, most parts of the renderers can't be clicked on, to prevent the user from interacting with sample records (e.g. to open a sample record in form view from the list). This commit disables keyboard navigation as well, as those sample records could still be accessed with the keyboard. To do so, several refactorings have been done in views: - _giveFocus function added on controllers (so that we can hook on the moment where we want to focus the renderer, and prevent it in sample mode), it kind of replaces giveFocus of ActionMixin which wasn't use from the outside - updateRendererState -> _updateRendererState as it is private - _setState function added on controllers, to have a hook when we set a new state (already existed, but only in kanban) - _renderView function moved from Basic to AbstractRenderer, so that we have a proper hook to deactivate clickable elements in sample mode Task 2232801 X-original-commit: 4482a03fe2f083f4f44fc6eb76d90ae22afbff91
2020-06-22[IMP] web: add support of "sample" attribute in viewsJérémy Hennecart
With this commit, it is now possible to display sample (fake) data in empty views, in the hope of easing user onboarding. This can be enabled (in list and kanban views) with attribute sample="1" on the arch root element. In this case, if there is no data to display, sample data will be generated based on heuristics (depending on field types and names). This can be used in addition to the no content helper. Task 2232801 X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Jérémy Hennecart <jeh@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-04[IMP] web: Comparison menuMathieu Duckerts-Antoine
This commit replaces the "time range menu" in the control panel by a new component: the "comparison menu". Its purpose is roughly the same: compare a period of data in a reporting view with the previous period or the previous year. Its implementation is a bit simpler: it will only appear if at least one date filter is selected in the search view, and will suggest to compare each selected date option with the previous period or the previous year. Task ID: 2245719 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-05-28[IMP] web: cursor pointer on hover graph legendMohammed Shekha
Before this commit: hovering on graph legend shows cursor default here hovering on legend should display cursor pointer, so user can easily understand it is clickable element After this commit, hovering on graph legend will display cursor pointer. task-2263703 closes odoo/odoo#52030 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-19[IMP] web: graph: add bar/line chart sortingPriyanka Kakadiya
PURPOSE Currently, reporting views such as the bar and line charts have their x-axis sorted either alphabetically or according to a sequence. When reporting, the user would be interested in sorting the x-axis values by their measure. SPECIFICATIONS Add 'ascending' and 'descending' options in graph view for bar and line charts Task 2070103 closes odoo/odoo#49970 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-03-31[IMP] web: graph: drill down to records in bar/pie chartsDhruv Patel
After this commit, in the graph view, when the user clicks on parts of the bar and pie charts, it opens the list view of the concerned records (like what was already done in the pivot view). This is the default behavior, but it can be deactivated by setting the attribute 'disable_linking' to true in the view. Task 2198461 closes odoo/odoo#47796 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-03-18[FIX] web: graph view ignores duplicate labelsjerome hanke (jhk)
Steps to reproduce: - install recruitment - go to recruitment > configuration > job positions > duplicate a job and keep the exact same name as the original > change the department - add any application to the newly created job position - go to recruitment > applications > all applications > select the graph view > group by job Previous behavior: you only see one of the two jop positions with the same name the graph view does not handle multiple labels with the same name and only keeps the latest values when rendering Current behavior: duplicate labels are suffixed to prevent the view from confusing them opw-2214284 closes odoo/odoo#47948 X-original-commit: a77086f8bcb4498361d1183ba8af3d0663cd031b Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-03-13[REF] web: Adapt views/actions to new control panelJulien Mougenot
Some web actions/controllers/viewsl have been adapted to properly instantiate the newly refactored control panel and update it accordingly. We needed to adapt the starting mechanism of actions and controllers to ensure that the control panel instantiation did not delay the loading of any widget. Part of task 2196029 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-02-25[FIX] web: Regroup and order date groupby optionsMathieu Duckerts-Antoine
A previous commit makes the graph view render only the finer interval option for each date/datetime field. The fact is that in the control panel, different options can be selected in any order along with other groupbys. This can lead to situations like 'Foo > Date: Day > Bar > Date: Month' and becomes unreadable. For that reason we choose to regroup and order options. For the previous situation, this leads to the following global groupby 'Foo > Date: Month > Date: Day > Bar'. Our choice also make more sense in a list view for instance. Task ID: 2198846 closes odoo/odoo#46269 X-original-commit: 59afc869233165e21ef94f485b91d33ac4543b24 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-25[FIX] web: graph renders only finer date groupby optionMathieu Duckerts-Antoine
Rendering a graph view with several options selected for a given date groupby can take too much time and block the page. Since grouping on the same date/datetime field several times barely makes sense in a graph view, we choose to use only the finer option, e.g. 'week' is prefered to 'quarter'. Task ID: 2198846 X-original-commit: 7e36bee14e18ca17e15de1bacb7ff26010d0b372
2020-01-28[IMP] timesheet: Improve timesheet reportjbm-odoo
Some small improvements in timesheet report view. In measures of graph, take string attribute into account. closes odoo/odoo#41348 Taskid: 2149371 Related: odoo/enterprise#7041 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09[REV] web: reverts update to fontawesome 5.11.2Kevin Baptiste
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e. closes odoo/odoo#41480 X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc Related: odoo/enterprise#7110 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28[IMP] web: update to fontawesome 4.7.0 to 5.11.2Kevin Baptiste
FontAwesome 5 introduced new names for some icons as described on https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes This commit replaces the old names to the new ones. closes odoo/odoo#35826 Taskid: 2050241 Related: odoo/enterprise#5180 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20[FIX] web: always show the graph view button "Stacked"Mathieu Duckerts-Antoine
With the actual code, some computations are done in the graph renderer to determine if it is worth to show the "Stacked" button in the graph view control panel for the data on hand. It turns out that that problem is not satisfactorily addressed and is quite hard from a usability perspective. We prefer to restore the old behavior as long as we don't have better ideas. closes odoo/odoo#37188 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-13[MERGE] forward port branch saas-12.4 up to fe59754c520Christophe Simonis
closes odoo/odoo#36721 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11[MERGE] forward port branch saas-12.3 up to 50e571acf7cChristophe Simonis
closes odoo/odoo#36491 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30[MERGE] forward port branch 12.0 up to 52f6e38cea8Christophe Simonis
2019-08-29[MERGE] forward port branch saas-11.3 up to ede253f1b2eChristophe Simonis
2019-08-29[MERGE] forward port branch 11.0 up to d61873ac4a3Christophe Simonis
2019-08-22[FIX] web: graph: id not in groupbyLucas Perais (lpe)
Before this commit, when having the field "id" in the graph view it was selected to group by on it. This doesn't really make sense, and triggers an sql error anyway After this commit, we filter out that field from the groupbys OPW 2053444 closes odoo/odoo#35958 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-08[MERGE] forward port branch saas-12.3 up to 752b2553c6fChristophe Simonis
2019-08-14[MERGE] forward port branch saas-12.4 up to 98a55917a60Christophe Simonis
2019-08-08[FIX] web: avoid graph flickering on firefoxMathieu Duckerts-Antoine
The way in which graph tooltips were created and positioned used to make the graph flicker on firefox. This fix solves that problem by choosing a fixed initial position for the tooltip before recompute it (when the necessary information to choose a correct position is available). closes odoo/odoo#35552 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-16[FIX] web: no forced date matching in pie chartsMathieu Duckerts-Antoine
In a graph view in mode 'pie', a matching of dates was attempted each time a comparison and a grouping of data using the same date/datetime field was done. Unfortunately, since the read groups results are ordered using the order of groupbys, the matching was not sensible in case the date/datetime field was not the first groupby. We thus restrict the matching to the sole case where it is sensible. More work should be done to have sensible matchings in all situations. closes odoo/odoo#34379 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-16[FIX] web: style chart elements in graph views only locallyMathieu Duckerts-Antoine
The elements style was set globally and thus used to modify the style of any chart in Odoo after the first loading of a graph view. For instance, the charts drawn in sale_subscription_dashboard are not the same before and after the first loading of a graph view. This is fixed by this commit.
2019-07-16[FIX] web: fix Groupby menu style in embedded graph viewsThomas Werland
2019-07-30[IMP] web: graph legend always on topMathieu Duckerts-Antoine
2019-07-30[IMP] web: fill area for unique line chart groupMathieu Duckerts-Antoine
2019-07-30[REF] web: fix graph view code typos and formattingVincent Schippefilt
2019-07-30[IMP] web: make sure all non zero datasets are visible in graph viewsMathieu Duckerts-Antoine
2019-07-30[REF] web: review inline doc of graph rendererMathieu Duckerts-Antoine
2019-07-30[IMP] web: tooltips on graph view legend itemsMathieu Duckerts-Antoine
Graph view legend items are shortened when ther are too long. Here we add tooltips on hover to allow the user to see the full text of items that were cut. We also improve a bit the way items are shortened. Co-Authored-By: Thomas Werland <twe@odoo.com>
2019-07-30[IMP] web: bar charts not stacked if not enough datasetsMathieu Duckerts-Antoine
Co-Authored-By: Thomas Werland <twe@odoo.com>
2019-07-30[IMP] web: custom tooltips in graph viewMathieu Duckerts-Antoine
Co-Authored-By: Thomas Werland <twe@odoo.com>
2019-07-19[IMP] base,web*: searchpanel in all multi record viewsLucas Perais (lpe)
Before this rev. the searchpanel could only be activated in kanban views (and it was specified in the kanban arch). From now on, the searchpanel can be activated in any multi record view. It's arch is moved to the search view arch (inside the <searchpanel> tag). Task 1985921 Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-07-17[REF] web: factorize no content helperAaron Bohy
Different templates were defined for graph, pivot and cohort views for the no content helper. Those templates were similar (only the message sometimes slighlty changed). This rev. creates one generic template used by those three views. closes odoo/odoo#34916 Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2019-05-28[IMP] web: unify the use of GROUPABLE_TYPESMartin Trigaux
cf discussion on #31789 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-01[IMP] web: use Chart.js in graph viewMathieu Duckerts-Antoine
It has been decided to use Chart.js instead of nvd3 to render charts. In this commit the graph view has been largely rewritten to benefit from the options offered by Chart.js. Task ID: 1946138
2019-04-01[IMP] web: graph view improvementsMathieu Duckerts-Antoine
This commit extends the support of comparison mode for the graph view and refine the tooltips and rendering in line mode. The graph view code has also been slightly refactored. Task ID: 1946138
2019-03-06[REF] web: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-26[MERGE] forward port branch saas-12.2 up to fcb972db9dcChristophe Simonis
2019-02-21[MERGE] forward port branch 12.0 up to b2db72c9d13Christophe Simonis
2019-02-21[MERGE] forward port branch 12.0 up to 84143a34b31Christophe Simonis
2019-02-21[FIX] web: several columns in line chart tooltips for large dataHiral Bhavsar
Currently tooltip goes out off the screen when the graph view (in line mode) presents a large number of groups. The present commit splits the tooltip content in three columns when the number of groups exceeds 20. This split is not done in mobile mode because it is not an appropriate in that situation. Co-authored-by: Mohammed Shekha <msh@openerp.com> Related to Task: 1917958 closes odoo/odoo#30288