summaryrefslogtreecommitdiff
path: root/addons/board/static/src/js
AgeCommit message (Collapse)Author
2019-03-06[REF] board: 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-28[MERGE] forward port branch saas-12.1 up to f9d3b5b7dfeChristophe Simonis
2019-02-26[FIX] board: clicking on a pivot cell in dashboardAaron Bohy
Before this rev., it crashed when the user clicked on a pivot cell in the dashboard, whereas it should have performed a do_action to open the records in a list view. This was due to a leftover event handler (with the handler function being actually removed) in commit 38dc5c18b. Issue reported on the saas-12.1 migration pad. closes odoo/odoo#31367
2019-01-31[IMP] board: single column layout on mobilePierre Paridans
Improve the dashboard app on mobile by : - Hide the change layout button - Force one column view layout Task Id: 1904747
2018-12-07[REF] board: adapt code to search refactoringMathieu Duckerts-Antoine
This rev. adapts the code of the 'Add to Dashboard' entry of the Favotires menu, according to the large SearchView refactoring. It also does some tweaks for the dashboard app due to the move of the ControlPanel from the ActionManager to the controllers. Part of task 1893568
2018-11-29[MERGE] forward port branch 12.0 up to 82a1e1dcc33Christophe Simonis
2018-11-06[MERGE] forward port branch 12.0 up to dd70c684268Christophe Simonis
2018-11-06[FIX] board: use correct context in sub board viewsGéry Debongnie
Before commit 60f143c8e7b7ea2387031c968dfa0f31a288afb2, the dashboard parameters did not use the parameters from the action, so some important information could be lost. However, in this same commit, the action context overrides the context from the user defined views, which means that some information is lost. For example, customized group bys are ignored. This commit fixes the issue with some careful context manipulation. Some special care was done to remove the groupby from the action context if it is not empty, because that same logic is used in views.
2018-10-22[MERGE] forward port branch saas-11.4 up to 3c108977c1eChristophe Simonis
2018-10-16[MERGE] forward port branch 11.0 up to b29b545fe84Christophe Simonis
2018-10-16[FIX] board: translate custom views according to current userLucas Perais (lpe)
forward port of 62cbc5f Have a user in English, put a sale report as "favorite" (pinned to dashboard app) Change the user's language Before this commit, the pinned view was in English (because it was recorded that way) After this commit, the pinned view is in the user's language. OPW 1890664 closes #27799
2018-10-10[MERGE] forward port branch 11.0 up to a69f117bbf5Christophe Simonis
2018-10-12[FIX] board: translate custom views according to current userLucas Perais (lpe)
Have a user in English, put a sale report as "favorite" (pinned to dashboard app) Change the user's language Before this commit, the pinned view was in English (because it was recorded that way) After this commit, the pinned view is in the user's language. OPW 1890664 closes odoo/odoo#27574
2018-11-20[FIX] board: fix the domain of consecutive 'add to dashboard' operationslen-odoo
Add a search containing a domain to dashboard. Remove that domain. Do a new search with a different domain. Add that search to dashboard; the domain sent would be the concatenation of the two domains. We make it so that only the last domain is sent, with a test. opw 1907650 closes odoo/odoo#28843
2018-10-08[FIX] board: handle actions with no view_modeAaron Bohy
The view_mode attribute is automatically set to the 'action' nodes when the action is added to the dashboard using the 'Add to dashboard' button in the searchview. However, other dashboard views can be written by hand (see openacademy tutorial), and in this case, we don't want to hardcode action's params (like context or domain), as the dashboard can directly retrieve them from the action. Same applies for the view_type, as the first view of the action can be used, by default. Before this rev., the second usecase wasn't handled, and it crashed when no view_mode was specified. This rev. also ensure that the context and domain are correctly retrieved from the action. Closes #24088 closes odoo/odoo#27519
2018-10-08[FIX] board: handle actions with no view_modeAaron Bohy
The view_mode attribute is automatically set to the 'action' nodes when the action is added to the dashboard using the 'Add to dashboard' button in the searchview. However, other dashboard views can be written by hand (see openacademy tutorial), and in this case, we don't want to hardcode action's params (like context or domain), as the dashboard can directly retrieve them from the action. Same applies for the view_type, as the first view of the action can be used, by default. Before this rev., the second usecase wasn't handled, and it crashed when no view_mode was specified. This rev. also ensure that the context and domain are correctly retrieved from the action. Closes #24088 closes odoo/odoo#27517
2018-08-10[MERGE] forward port branch saas-11.4 up to edd586002e9Christophe Simonis
2018-08-06[MERGE] forward port branch saas-11.2 up to 932b2299416Christophe Simonis
2018-08-06[MERGE] forward port branch 11.0 up to b29e053436bChristophe Simonis
2018-08-06[FIX] board: fallback to default view when not found in actionChristophe Simonis
This can happen when action is modified after dashboard creation.
2018-07-19[MERGE] forward port branch saas-11.4 up to 1f7a39964b3Christophe Simonis
2018-07-18[MERGE] forward port branch saas-11.2 up to 02f38beffbbChristophe Simonis
2018-07-18[FIX] board: remove undesired attribute overwriteChristophe Simonis
Oversight of previous forward-port
2018-07-17[MERGE] forward port branch 11.0 up to 44b77d3702bChristophe Simonis
2018-07-13[FIX] board: open form view of given actionNicolas Lempereur
It is possible in a dashboard item to open a form view of a record. The view did not take into account the action used to display the item, so for example: from a customer invoice clicking on a record would display the "Vendor Bill" instead of "Customer Invoice" view. With this fix, when a view is being loaded to be displayed in the dashboard, we save a reference to a possible form view and if the form view is displayed, we use this reference. opw-1865454 closes #25718
2018-07-06[REF] *: rename web.pyeval into web.py_utilsGéry Debongnie
The pyeval name is quite confusing, given that there is already an eval and an evaluate function in py.js, and that the web.pyeval exports two evaluate functions. Since this file is more about odoo specific customization to py.js, it is renamed in py_utils to better express its intended use.
2018-06-15[MERGE] forward port branch saas-11.2 up to b170a753e18Christophe Simonis
2018-06-12[MERGE] forward port branch 11.0 up to e3658d6f568Christophe Simonis
2018-06-07[FIX] board: add extra infoNicolas Martinelli
When an element is added to the dashboard, it is unclear to the user that he needs to refresh the browser for the changes to take effect. opw-1853242
2018-04-27[FIX] board: action executed with option keepSearchViewAaron Bohy
Rev. 69c9500e recently added option 'keepSearchView' to doAction in the ActionManager. When set to true, the searchview of the current action is re-used by the executed action. This caused issues with the dashboard, as the wrong action id was used to save the current action to the dashboard (it was the one of the action for which the searchview was instantiated, not the one of the current action, executed with option keepSearchView set to true). For instance, go to Website (in enterprise), in the new dashboard (view) expand the graph view, try to add the graph action to the dashboard (board). Task 1835670.
2018-04-18[MERGE] forward port branch saas-11.2 up to fed775bc0c2Christophe Simonis
2018-04-18[MERGE] forward port branch 11.0 up to 8c64159b884Christophe Simonis
2018-04-17[FIX] board,web: edit custom views in placeAlexandre Kühn
Before this commit, whenever we do an operation on any of these custom views, such as folding it, the custom view was saved by creating a new one. This behaviour comes from a lost feature to undo operations on custom views. Since we do not have this feature anymore, it makes no sense to create new custom views on save, instead of applying the changes in place. With this commit, custom views are edited in place. Fixes #23712
2018-04-16[MERGE] forward port branch saas-11.2 up to 90f8f17fb4fChristophe Simonis
2018-04-16[MERGE] forward port branch 11.0 up to ad825b673b5Christophe Simonis
2018-04-13[FIX] board: stop the propagation of custom eventsAaron Bohy
Recently, rev. 5b3cb812b added a new custom event ('update_filters') handler to the ActionManager, and rev. 69c9500 added an option ('keepSearchView') to doAction (which can be called by triggering up event 'do_action'). Both events ('update_filters' and 'do_action') can be triggered by controllers, and when those controllers were in the dashboard, a crash occured when they triggered those events. In particular, they are triggered by the new 'web_dashboard' view, respectively when clicking on an aggregate and when clicking on the subview button to open it full screen. The crashes occurred because the events weren't intercepted by the dashboard, so they bubbled up to the ActionManager which couldn't handle the requests properly as it wasn't aware of those sub controllers. As there is no search view in the dashboard, the 'update_filters' event simply needs to be stopped (we can't handle such a request in the dashboard), and for the 'do_action' event, the 'keepSearchView' option must be forced to false as there is no search view to keep (we thus force the ActionManager to create a new one).
2018-04-13[REF] board: don't patch FormView in place anymoreAaron Bohy
Instead, create a new BoardView (in JS only) instead, referenced by specifying js_class="board" on the fly on the root node of the arch of the board view. This ensures that the dashboard addon doesn't impact the FormView, and this is necessary to ensure that the next commit doesn't break anything.
2018-04-11[FIX] web: graph rendering when in DOMAlexandre Kühn
Backported fixes: 1. [IMP] web: GraphView: remove hack to render in DOM - ref. 166319fa4a31c0105d786c1e8b8d0228ff45bd14 - fully backported. This commit backports the fix that removes the hack for rendering graphs (delay in a setTimeout), so that the graph is rendered when it is in the DOM. 2. [IMP] web: restore scroll position - ref. 4e204ed2233ccd36b2eb7d3e56bfa741b9cb3e14 - partially backported: only keeps `on_attach_callback` and `on_detach_callback` in the abstract_controller and in the abstract_renderer. This commit backports the use of the hooks methods `on_attach_callback` and `on_detach_callback` in abstract controller and renderer, so that the controller of any view warns the renderer when it has been attached in (or detach from) the DOM. Also, this commit adds `on_attach_callback` and `on_detach_callback` for the dashboard app, so that the graph view is correctly rendered. Fixes #24092
2018-02-16[FIX] web,*: various nocontent helper fixesAlexandre Kühn
* account, board, hr_holidays, mail, sale, website_sale Small fixes on nocontent onboarding screens. Initial commit: https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417 Details: - list: centered; - pivot/graph: centered + empty folder face; - Dashboard app with nocontent helper; - Discuss inbox/starred: centered without neutral/smiling faces; => no faces because it's too much with animated rainbow man when emptying the any of the boxes. - hr_holidays: fixed onboarding screens; - (technical) dropped obsolete 'o_view_nocontent_container' style; - manual reconciliation 'nothing to reconcile': centered + inside form sheet; => renamed account's o_view_nocontent to o_view_noreconciliation, so that it doesn't use the style of views.less. - kanban: nocontent helper above the columns (if any); - texts "no order to upsell"/"abandonned cart" paragraph split in two.
2018-02-01[IMP] dashboard: remove no content helperGéry Debongnie
In a recent commit, the kanban view was changed to display a nocontent help message, even when grouped. To do that, it was necessary to change the nocontent structure, and in particular, to position it absolutely. This totally breaks dashboards. Also, from a functional point of view, dashboards are used to see existing information, so it can be said that the nocontent helper is of a more limited use in this case. Therefore, I think that the best technical decision is to simply remove the nocontent helper in the dashboard, rather than fiddling with the css to try to make them work.
2018-01-18[IMP] core: menu tip ux/ui improvementAlexandre Kühn
We would like to make the "no item found" screens more appealing. Before this commit, it shows a small help tip in the top-left corner of the screen, just below the "Create" button. With this commit, these help tips have been replaced by onboarding screens, which consist of a picture and some text below, both of which are horizontally centered. The texts have been slightly changed, so that they are shorter and clearer. Considered modules: (A) account, account_asset, account_budget, account_test, account_voucher, analytic (B) barcodes, base, base_automation, board (C) calendar, contacts, crm (D) delivery (E) event (F) fleet (G) gamification, google_drive (H) hr, hr_attendance, hr_contract, hr_expense, hr_gamification, hr_holidays, hr_payroll, hr_recruitment, hr_timesheet (I) im_livechat (L) l10n_fr_sale_closing, link_tracker, lunch (M) mail, maintenance, mass_mailing, membership, mrp (N) note (P) payment, point_of_sale, post_mercury, pos_restaurant, product, project, purchase, purchase_requisition (R) rating, repair, resource (S) sale, sale_timesheet, sales_team, stock, stock_account, stock_landed_costs, stock_picking_batch, survey (U) utm (W) web, website, website_blog, website_customer, website_event_track, website_forum, website_quote, website_sale, website_sale_digital, website_slides
2018-01-16[REF] web,*: ActionManager/ViewManager refactoringAaron Bohy
This rev. is the first part (out of 3) of the refactoring of the ActionManager and ViewManager layer of the webclient. The main changes are: - there is no ViewManager anymore, its work is now handled by the ActionManager itself, but isolated in a specific file ; this eases a lot of things, as the breadcrumbs handling for example. - the ActionManager code is converted to the new coding principles and guidelines ; mainly, children widgets communicate with it by triggering events up, and not by function calls anymore. - the ActionManager layer is now testable, and a lot of tests have already been written. - the code in other addons has been adapted consequently. What's coming next: - introduce the 'AbstractAction' Widget, and make client actions and view controllers inherit from it ; this widget will implement a common API that could be used uniformly by the ActionManager (e.g. restore(), canBeLeft(), renderButtons(), getTitle()...). - move the ControlPanel handling from the ActionManager to the AbstractAction.
2017-11-28[MERGE] forward port branch 11.0 up to 8fb25e185bbChristophe Simonis
2017-11-28[MERGE] forward port branch saas-16 up to 3f66814a0d0Christophe Simonis
2017-11-23[REF] web,*: give evaluated contexts to load_viewsAaron Bohy
*board,sale_timesheet This rev. changes the API of load_views, as it now assumes that the given context has no longer to be evaluated. This is more convenient that way, as we can now call load_views with contexts that are dict, and not instances of the Context class.
2017-11-20[FIX] board: avoid crash for non-existing actionMartin Geubelle
After uninstalling an module, some actions specified in the dashboard may not exist anymore (the dashboard view isn't correctly cleaned up). This was causing a traceback because the dashboard was trying to load views corresponding to an non-existing action. Closes #19995
2017-11-08[FIX] board: manage modifiers on saveNicolas Lempereur
With da136d83 we have modifiers on every elements but when saving them for dashboard they have to be stringified to be used. Also a part of a previous code was still present that removed context and domain from a saved dashboard when modifying it. opw-779071 closes #20725
2017-08-02[MERGE] forward port branch saas-17 up to a445548f07fChristophe Simonis
2017-07-31[FIX] board: pass domain in view creationMartin Geubelle
In the dashboard, the domain wasn't passed to the view since the new views. The action in the dashboard and the one saved were thus different (ex: when saving 'Customer', you got all partners). This was also causing a traceback when editing a value in the grid view. This domain is now correctly passed.
2017-07-27[FIX] web,*: display dashboard panel if no contentAaron Bohy
*board,crm Before this rev., the dashboard panel (e.g. of the sales team dashboard) wasn't displayed when there were no record to display, whereas it should. Only the nocontent helper was displayed. This was a bug introduced with the new view: the views' controller was in charge to display the renderer (if there were data to display) xor the nocontent helper. As the dashboard panel was rendered by the renderer, it couldn't be displayed alongside the nocontent helper. This rev. moves this logic to the renderer. So now, the controller always contains the renderer, which decides what to render (the data or the nocontent helper). This way, the dashboards can display their panel and the nocontent helper.