Commit Graph
216 Commits
Author SHA1 Message Date
Christophe Simonis e145f2b0c8 [MERGE] forward port branch saas-12.2 up to 2694174b41 2019-04-10 15:10:24 +02:00
Christophe Simonis c9e1deb496 [MERGE] forward port branch saas-12.1 up to af313858b4 2019-04-09 20:48:01 +02:00
Christophe Simonis af313858b4 [MERGE] forward port branch 12.0 up to c1c322dd40 2019-04-09 20:43:35 +02:00
Christophe Simonis 3f95b074e9 [MERGE] forward port branch saas-12.2 up to f2be461f09 2019-04-05 18:46:10 +02:00
Lucas Perais (lpe) cdc150d0a3 [FIX] board: fixed height for graph svg container
Commit 9214d78152 is a bit old and made
huge white spaces between graphs

Commit 89931d1749 introduces
a dedicated svg container, on which we can set a fixed height

The 250 px comes from what is being done in the web_dashboard app
with commit odoo/enterprise@1638e5d481

OPW 1944857

closes odoo/odoo#32522

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-09 10:32:19 +00:00
Christophe Simonis f2be461f09 [MERGE] forward port branch saas-12.1 up to f2d0995362 2019-04-05 10:50:56 +02:00
Christophe Simonis d29e8cf423 [MERGE] forward port branch 12.0 up to 7e4b0350c3 2019-04-04 19:01:12 +02:00
Julien Castiaux fde76dd9b8 [FIX] board: action domain
The board created out of a tree view wasn't taking the default domain of
the view.

opw-1958349

closes odoo/odoo#32240

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-04 08:29:08 +00:00
Aaron Bohy 2be28d4d03 [IMP] web,board: enable pagination in grouped lists
With this rev., when there are a lot of groups in a grouped list
view, groups are displayed under several pages, whereas they were
all displayed in the same page before.

This is especially interesting with the new 'expand' attribute, to
ensure that we don't read records for a large number of groups.

By default, the groups limit is set to 80 (like records), and to 10
is the 'expand' attribute is set to true. This limit can be
overriden with the 'groups_limit' attribute.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Christophe Simonis 06898fac3c [MERGE] forward port branch saas-12.1 up to f9d3b5b7df 2019-02-28 13:47:09 +01:00
Aaron Bohy a76a958ca8 [FIX] board: clicking on a pivot cell in dashboard
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-02-26 08:28:17 +00:00
f833f88d9e [REF] board: adapt code after jQuery update
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-03-06 20:07:17 +01:00
Romain Estievenart 873ea984a5 [FIX] board: dashboard app mobile layout
Follow-up of task 1904747

closes odoo/odoo#30853
2019-02-14 10:32:12 +00:00
Pierre Paridans de26abf214 [IMP] board: single column layout on mobile
Improve the dashboard app on mobile by :

- Hide the change layout button
- Force one column view layout

Task Id: 1904747
2019-01-31 11:30:54 +00:00
Mathieu Duckerts-Antoine 38dc5c18b4 [REF] board: adapt code to search refactoring
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-12-07 13:16:10 +00:00
Christophe Simonis ce4cc24621 [MERGE] forward port branch 12.0 up to 82a1e1dcc3 2018-11-29 20:06:16 +01:00
Géry Debongnie abf32b8b21 [REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.strictEqual(form.$('.o_form_editable'), 1, "msg");
        -> assert.containsOnce(form, '.o_form_editable');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.
2018-11-19 11:24:28 +00:00
Christophe Simonis b106b7ce0b [MERGE] forward port branch 12.0 up to dd70c68426 2018-11-06 16:40:07 +01:00
Géry Debongnie 6e9c1d92d7 [FIX] board: use correct context in sub board views
Before commit 60f143c8e7, 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-11-06 09:17:05 +00:00
Christophe Simonis b81c2bce84 [MERGE] forward port branch saas-11.4 up to 3c108977c1 2018-10-22 16:59:51 +02:00
Christophe Simonis e9ae419fca [MERGE] forward port branch saas-11.3 up to 0de06a4132 2018-10-17 10:54:19 +02:00
Christophe Simonis 0de06a4132 [FIX] board: remove duplicated test 2018-10-16 20:43:49 +02:00
Christophe Simonis e21ce71927 [FIX] board: use defined variable in newly added test
Oversight of previous forward-port
2018-10-16 19:14:19 +02:00
Christophe Simonis 41bf8ce6d9 [MERGE] forward port branch 11.0 up to b29b545fe8 2018-10-16 17:53:26 +02:00
Lucas Perais (lpe) a7732bb839 [FIX] board: translate custom views according to current user
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-16 08:12:48 +02:00
Christophe Simonis c8633bcc16 [FIX] board: correct test definition
Oversight of previous forward-port.
2018-10-10 18:05:22 +02:00
Christophe Simonis 7415f40fbd [MERGE] forward port branch 11.0 up to a69f117bbf 2018-10-10 14:40:01 +02:00
Lucas Perais (lpe) 62cbc5f240 [FIX] board: translate custom views according to current user
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-10-12 08:36:19 +00:00
len-odoo 7d2fd1d1b4 [FIX] board: do not display the no_content_create div
That div has been given an absolute position, which does not work inside another
div on the dashboard.
If there are other dashboard elements below, there are unusable since they are
covered by the no_content_create div.
Moreover, there is no create button on the dashboard, so we shouldn't even see
it.
It also spares us from seeing that hideous clippy-inspired smiling paper sheet.

opw 1907650

closes odoo/odoo#29076
2018-11-27 15:08:34 +00:00
len-odoo fff6c93830 [FIX] board: fix the domain of consecutive 'add to dashboard' operations
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-11-20 13:44:56 +00:00
Aaron Bohy 60f143c8e7 [FIX] board: handle actions with no view_mode
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 09:21:39 +00:00
Aaron Bohy a69f117bbf [FIX] board: handle actions with no view_mode
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-10-08 09:19:21 +00:00
Christophe Simonis 7499b47ffa [MERGE] forward port branch saas-11.4 up to edd586002e 2018-08-10 13:37:21 +02:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
Christophe Simonis 32dce83618 [MERGE] forward port branch saas-11.3 up to ff80efd71e 2018-08-06 19:59:53 +02:00
Christophe Simonis 427f717d18 [MERGE] forward port branch saas-11.2 up to 932b229941 2018-08-06 13:44:01 +02:00
Christophe Simonis 932b229941 [MERGE] forward port branch 11.0 up to b29e053436 2018-08-06 11:46:10 +02:00
Christophe Simonis efb896f915 [FIX] board: fallback to default view when not found in action
This can happen when action is modified after dashboard creation.
2018-08-06 10:24:31 +02:00
Priyanka KakadiyaandNimesh Jethva c7eae6552e [REM] various: remove index.html for apps.
Several applications have an index.html file that is used to fill the html
description of the module. However those descriptions are generally not
up to date: they contain outdated screenshots, feature descriptions are
not maintained, ...

Instead we just rely on the discover button that redirects on the application
website. It has more chance being up to date. Moreover updating a website
is easier than updating the index.html of a module.

This commit is related to task ID 47179 and 1861544. Related PR are #22689
and #25556. First one is about classic applications while second one is about
website applications.

Co-Authored-By: Nimesh Jethva <nje@odoo.com>
2018-08-03 14:54:42 +02:00
qsm-odoo 1c1c0897e8 [REF] *: BS4, adapt dropdowns and carets
- The dropdown structure was simplified, allowing to get rid of the
  3-levels structure induced by <ul/> elements and dropdowns can now
  contain anything. The class 'dropdown-item' is now mandatory for
  each dropdown clickable element. The class 'dropdown-item-text' can
  be used to add same padding and style but without making the element
  have a clickable look.

- Dividers now use the class 'dropdown-divider'

- The way dropdowns are opened and hidden also changed (before the
  'open' class was added on the `.dropdown-menu` parent, now the
  'show' class is added on both the `.dropdown-menu` parent and the
  `.dropdown-menu` itself).

- JS-wise, no click event handlers can be put on `.dropdown-toggle`
  elements anymore (instead, use handlers for dropdown events).

- Carets are automatically put on `.dropdown-toggle` elements, so this
  commit replaces the `.caret` elements with this. This feature was
  possible to disable but would prevent us from adding a caret with
  scss. Also, this simplifies the DOM. The 'o-no-caret' class was also
  introduced to allow using the 'dropdown-toggle' class on non-caret
  elements.

- Also adapt the scss to use $caret-width instead of $caret-width-base
2018-07-27 12:36:54 +02:00
qsm-odoo 81f359c81c [REF] *: BS4, remove the use of btn-sm
Odoo made the bad choice of using the 'btn-sm' class for every button
instead of configuring the padding for default 'btn' to be smaller.
In BS4, the style of btn-sm is actually more complex, lowering the
font-size too. Also, btn-xs was removed so we would not have the
possibility to display smaller button than our default ones.

This commit removes btn-sm wherever it was used. Unfortunately, this
might remove it at some places where it made sense but this can be
restored in a second time.
2018-07-27 12:36:54 +02:00
lejeune quentin 384647e583 [IMP] all_module : Modify "Sales Channel" by "Sales Teams" 2018-07-25 15:41:31 +02:00
Christophe Simonis 49f634e472 [MERGE] forward port branch saas-11.4 up to 1f7a39964b 2018-07-19 16:36:03 +02:00
Christophe Simonis 1f7a39964b [MERGE] forward port branch saas-11.3 up to 0c42dcfc22 2018-07-19 15:36:54 +02:00
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 2eb8d06149 [FIX] board: remove undesired attribute overwrite
Oversight of previous forward-port
2018-07-18 15:10:21 +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
qsm-odoo 2c966909e2 [FIX] *: fix some side-effects of https://github.com/odoo/odoo/commit/9de1bc0eef6f5bfaa2a8d745431caa361ae91548
- JS Modals were not correctly built anymore, their .modal-body element
  was duplicated and many without-effect JS lines were introduced (as a
  side effect, the form view design was broken when inside modals)

- Tests were changed to make bugs go unnoticed. For example, the media
  dialog functionnality was entirely broken because the .modal-dialog
  element was not receiving the correct class anymore.

- The JS translation function is _t, not _

- Do not use the <title/> tag as a regular DOM element, it is meant to
  be unique, in the <head/> section

- CSS rules were added to the utils.scss file, which is meant to contain
  functions and mixins, otherwise, the rule is duplicated in every asset

- Some icons were still broken, as missed by https://github.com/odoo/odoo/commit/f90cf060a3cfeb37a67bec83264c0aaab8892b56

- Tests were changed to use [role="dialog"]/footer/header in their
  selectors without any reason, this commit restores some of that to
  avoid rebase conflicts with the BS4 work.

- ...

Note: other elements should still be discussed, like the direct use of
the 'o_form_label' class in views definition... but those do not cause
direct problems.
2018-07-09 11:59:30 +02:00