Commit Graph
26 Commits
Author SHA1 Message Date
Christophe Simonis 0c42dcfc22 [FIX] board: adapt test. 2018-07-19 14:32:26 +02:00
Christophe Simonis e5fab318d9 [MERGE] forward port branch saas-11.2 up to 02f38beffb 2018-07-18 17:59:23 +02:00
Christophe Simonis 5b9a51bb1d [MERGE] forward port branch 11.0 up to 44b77d3702 2018-07-17 17:48:34 +02:00
Nicolas Lempereur 8c1c7ec23e [FIX] board: open form view of given action
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-13 11:42:15 +02:00
Aaron Bohy 3628014abd [FIX] board: action executed with option keepSearchView
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-27 13:40:35 +02:00
Christophe Simonis c309ccd7b3 [MERGE] forward port branch saas-11.2 up to fed775bc0c 2018-04-18 18:30:35 +02:00
Christophe Simonis fed775bc0c [MERGE] forward port branch 11.0 up to 8c64159b88 2018-04-18 18:20:40 +02:00
Alexandre Kühn b15e805b5a [FIX] board,web: edit custom views in place
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-17 17:28:49 +02:00
Géry Debongnie 6d04faf6c2 [FIX] board: adapt test broken after forward port
Forward ports sucks...
2018-04-17 09:33:22 +02:00
Christophe Simonis 74033eb007 [MERGE] forward port branch saas-11.2 up to 90f8f17fb4 2018-04-16 19:50:50 +02:00
Christophe Simonis 5f2d080cf8 [MERGE] forward port branch 11.0 up to ad825b673b 2018-04-16 18:34:56 +02:00
Aaron Bohy b096915dc8 [FIX] board: stop the propagation of custom events
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 12:09:01 +02:00
Aaron Bohy 1d92bb410d [REF] board: don't patch FormView in place anymore
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-13 12:09:01 +02:00
Alexandre Kühn ea25036c14 [FIX] web: graph rendering when in DOM
Backported fixes:

    1. [IMP] web: GraphView: remove hack to render in DOM

        - ref. 166319fa4a
        - 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. 4e204ed223
        - 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-04-11 14:52:56 +02:00
Alexandre Kühn aa8745f1a8 [FIX] web,*: various nocontent helper fixes
* 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-16 10:23:01 +01:00
Géry Debongnie f99969cddd [IMP] dashboard: remove no content helper
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-02-01 15:48:09 +01:00
Christophe Simonis a98b46b8f5 [MERGE] forward port branch saas-11.1 up to fa1f2132e7 2018-01-22 18:44:05 +01:00
Christophe Simonis 2f95cfb8ed [MERGE] forward port branch saas-16 up to f99c4f2b48 2018-01-19 12:43:58 +01:00
Lucas Perais (lpe) 56052dee60 [FIX] web,board: a kanban button action should trigger that action
Before this commit, when having a kanban within a dashboard and clicking on an action button,
the action was not triggered, instead, the board form view triggered 'save' on the board model
leading to a server side traceback

After this commit, the action button triggers the demanded one and only this one.

OPW 805707

closes #22191
closes #22371
2018-01-19 11:26:52 +01:00
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
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-18 21:43:29 +01:00
Christophe Simonis 5851a69aa3 [MERGE] forward port branch saas-16 up to 3f66814a0d 2017-11-28 15:12:31 +01:00
Martin Geubelle 4de48320ca [FIX] board: avoid crash for non-existing action
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-20 17:50:25 +01:00
qsm-odoo 489db80101 [REF] web: better mock images routes
Before this commit, only the routes which began by '/web/image' were
mocked (simply ignored). This forgot the case were it is a full URL
(http://www.test.com/web/image). Now, also mock the static images
routes (for .png and .jpg).
2017-09-05 12:13:55 +02:00
Martin Geubelle c66fbed5c6 [FIX] board: pass domain in view creation
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-31 15:02:36 +02:00
Aaron Bohy 38dfe6c51d [FIX] board: properly render with twice same action
Before this rev., the dashboard wasn't rendered correctly when
the same action (same action id) was several times in the
dashboard.

For instance, if the dashboard contained the list and kanban view
of an action, both views were rendered in the same block, leaving
the other one empty. Moreover, (un)foldeing one automatically
(un)folded the other one.

This was because the action id was used to identify each view, but
this id is not unique in the dashboard. We now use a generated id
instead, which is unique.
2017-05-24 08:25:22 +02:00
Géry Debongnie 3deac18485 [REF] board: update dashboards to new js framework
With the new views, we totally broke the dashboard.  This commit
rewrites all the code to comply with our new coding guidelines, and make
sure it works, with some tests.

Note that a big change is that we don't instantiate an action manager
and a view manager, we directly instantiate the views.

Also, this is not the best way to organize the dashboard.  I think that
it should be a client action, not a form view, so we don't have to
overload all the form view classes and we don't depend on form view
behaviour/view caches/...
2017-04-11 19:44:38 +02:00