Commit Graph
235 Commits
Author SHA1 Message Date
Pierre Paridans ffc359dc5c [IMP] web,*: CP's CogMenu rework to add misc items from favorite
Part-of: odoo/odoo#116641
2023-05-12 22:59:17 +02:00
Pulinckx Pierre (PIPU) 608e90e998 [REF] *: Replace underscore functions by native JS
Replace _.map(), _.flatten(), _.delay(), _.contains(), _.pluck(), _.isUndefined(), _.isEmpty(), _.isString(), _.isEqual(), _.isBoolean(), _.memoize(), _.invoke(), _.bind(), _.escape(), _.debounce(),
_.str.sprintf(), _.str.repeat(), _.str.startswith(), _.str.trim(),
_.str.escapeHTML(), _.str.escapeRegExp(), _.str.startsWith(), _.str.include()

closes odoo/odoo#118012

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-04-20 11:57:29 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Victor Piryns (pivi) 0a755b9a43 [FIX] board: not crash on views with domains and custom layout
Current behaviour:
If you export a view with a (some) filters and you set a custom
layout in the dashboard, you will get a traceback, preventing
you for accessing your newly exported dashboard.

Expected behaviour:
Should not crash when trying to view your exported view,
even with a custom domain.

Steps to reproduce:
- Install Dashboard, Sales
- Export from Sales > List View with a filter Creation Date before
  XX:XX (date is irrelevant)
- Go to Dashboard > My Dashboard > Change Layout to something else
- Exit the page and retry to reopen it, a stacktrace is shown.

Reason for the problem:
When preprocessing the arch of the view in the dashboard, which is an
xml string, there is the domain included, which contains symbols that
are unparsable by `etree` unless escaped (like `<`).

Fix:
Escape the domain client side before being sent and saved in the database,
so when requesting it we don't have a parsing error. Then we unescape it when
the clients reads the domain from the server. The unescaping before
escaping is to avoid problem of double escaping when changing subsequently
the layout of the board view.

Affected versions:
- 16.0
- saas-16.1
- master

opw-3130117

closes odoo/odoo#112334

X-original-commit: bfadb8e491fe2acda63a79f9577eaaec8a1c8d9c
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-02-09 19:07:08 +01:00
Ivan Yelizariev 910cacd262 [FIX] board: use correct tree view id
`board` module allows adding current tree view to My Dashboard menu. It copies
some settings (context, domain, etc.), but not the list view id. Because of
that, default list view is used. However, the default list view might be
different from what user sees in original menu. For example, there are two tree
views for `purchase.order`:

`purchase_order_tree`
https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/purchase/views/purchase_views.xml#L535

`purchase_order_view_tree`
https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/purchase/views/purchase_views.xml#L599

But only one of them has field `receipt_status`
https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/purchase_stock/views/purchase_views.xml#L91

So, that field wasn't available in the Dashboard, which is quite annoying.

Fix it by forcing `viewId`.

STEPS:
- Click on Purchase App > Go to 'Purchase Orders'
- enable all the columns to show in listview (from that 2 arrows of listview on right side corner)
- Once you enable visibility of all columns in listview for Purchase orders list. Just Go to Favourites -> Save to Dashboard, give any name
- Reload the browser.
- Open Dashboard , go to My Dashboard
- Now see the customer dashboard which you create with certain columns is not visible in this Dashboard listview. and no way to make it visible even.

opw-3130088

closes odoo/odoo#111913

X-original-commit: 7e41555d86a9e91176dc024c6e95ec1e748a08f7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-03 19:49:15 +01:00
Aaron Bohy af948c6acf [FIX] board: better display graphs in dashboard
In the legacy implementation of the dashboard action, there was a
scss rule that set the height of the canvas of graph views inside
the dashboard to 300px. During the conversion to owl, this rule has
been lost. As a consequence, graphs in the dashboard look squashed.
This commit restores the scss rule to fix the issue.

Bug reported in the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110352

X-original-commit: 833f7394ecd88825990eb7d1b338e21bfbab55b5
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 09:13:17 +01:00
Walid HANNICHE (waha) 7f3a4fbb2d [FIX] board: dashboard darkmode
Steps to reproduce:
- add elements to dashboard
- enter dashboard and enable darkmode

Bug:
titles are unreadable because background is white

Fix:
remove CSS property

closes odoo/odoo#110201

X-original-commit: 5b56f1891d618008678d70ad125ad1393abe352b
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-18 13:25:51 +01:00
Walid HANNICHE (waha) bcd8081cb4 [FIX] board: prevent add to dashboard with no actionID
Steps to reproduce:
- Go to Purchase -> Reporting -> Dashboard
- click on the "expand" arrows of the pivot view
- favorites - add to dashboard

Bug:
adding a view with no actionID causes the dashboard to crash on load
this [commit] prevents adding a view with no actionID

Fix:
added a default value of False to add_to_dashboard actionId
only display the option to add_to_dashboard for views that have actionId

opw-2965036

[commit]:https://github.com/odoo-dev/odoo/commit/7180d948f084d4f68d1660cb884c95aaf41288fa

closes odoo/odoo#106093

X-original-commit: ff926a5b4390b38db339440c18dd2d5380df7d61
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-18 19:42:14 +01:00
FrancoisGe e50bee88c4 [FIX] web: touch a record in a x2m
Before this commit, if a touchstart event is performed on a row in an
x2many, then a crash is displayed.

We also use this commit to rename the hasSelector props to allowSelector.
allowSelector is true if checkboxes can be present.

How to reproduce:
- go to a form view in mobile mode with an x2many field
- touch a row in the x2many (trigger an event touchstart)

Before this commit:
    An error is displayed

After this commit:
    Nothing happens.

closes odoo/odoo#98893

Related: odoo/enterprise#30773
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-30 03:44:56 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Mathieu Duckerts-Antoine fb5815edfd [FIX] web,board: remember list orderBy
When adding a (new) list view to the Dashboard app, the list orderBy (if
any) was lost. We fix that.

Part-of: odoo/odoo#92475
2022-06-30 09:29:51 +02:00
Géry Debongnie 3c782440ab [REF] board: rewrite board action in owl
This commit rewrites the board action in owl. Legacy actions are
still supported inside this new board thanks to a compatibility
layer.

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
Lucas Perais (lpe) 2cafc7be88 [REF] web, base, website_sale_loyalty: remove unnecessary flags on action
action act_window can have a "flags" field which contains tweaking parameter for the views.
A little inventory:
- ation_buttons: if true displays on List and Kanban the buttons that trigger action
  in the control-panel bottom left area. It is true by default in JS.
- withControlPanel: whether to display the ControlPanel as a whole. True by default.
- search_view: not used or dealt with.
- mode ("readonly"|"edit") whether to initiate a form view in that mode.
  (used and practical -- but will be outdated when the edit mode by default is implemented)

This commit removes the occurences of those flags keys that are useless

closes odoo/odoo#94078

Related: odoo/enterprise#28620
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-06-22 14:28:43 +02:00
Achraf (abz) cfccd028b3 [FIX] board, project: Allow user to add project_graph to dashboard
If we add the graph view of project in the dashboard
And we access the dashboard a traceback appears

Cause: Unable to evaluate the context because the following information
is missing: "active_id" which is used in the domain

https://github.com/odoo/odoo/blob/4d864c05dfa8f9be25d41bbae318f75a61d0cde2/addons/board/static/src/legacy/js/board_view.js#L254

the solution is to add `globalContext` to the `contextToSave`

https://github.com/odoo/odoo/blob/7e77bb74bfa1bfef92c6d385dedc2d89e0040780/addons/board/static/src/add_to_board/add_to_board.js#L37-L43

`View` is `undefined` because the `project_graph` view is made with OWL
and board is still in legacy

https://github.com/odoo/odoo/blob/4d864c05dfa8f9be25d41bbae318f75a61d0cde2/addons/board/static/src/legacy/js/board_view.js#L274

Since https://github.com/odoo/odoo/pull/84864

The solution is to add a legacy version of the `project_graph`

Apply the same fix for `project_pivot`

opw-2791672

closes odoo/odoo#87883

X-original-commit: 8999277e668f666bc650d508384c4a07ea6c711e
Signed-off-by: Achraf <abz@odoo.com>
2022-04-04 14:45:26 +02:00
Michael (mcm) b81861233d [REF] *: use LegacyComponent
This commit replaces Component by LegacyComponent when the component
uses removed features from owl 1 like getting its `el` or `trigger` an event.
It also adds `useService("rpc")` when component needs it.

closes odoo/odoo#85389

Related: odoo/enterprise#24745
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-01 09:57:39 +00:00
Audric Onockx (auon) 73f873ab4c [FIX] board : drag task between personnal stages in dashboard
Steps :
Install Project and Dashboard.
Project > My task > Favorites (search zone) > Add to Dashboard.
Notice you can drag task between stages.

Issue :
Dashboard > Notice you cannot.

Cause :
m2m groupby normally (in kanban_renderer.js) does not allow drag.
project_kanban overrides its _setState() method to allow it for parsonnal
stages, because they "become m2o" with a user.
Yet, in the dashboard, we pass through the default method, because the
wrong view is created.

Fix :
Take into account the js_class in the arch to create the view.

opw-2752072

closes odoo/odoo#85033

X-original-commit: 4d864c05dfa8f9be25d41bbae318f75a61d0cde2
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-02-26 09:18:51 +00:00
+2 318cdcc0b8 [REF] *: adapt code to owl 2
Owl 2 changelog: https://github.com/odoo/owl/blob/a9f29c4caad4f32d06be1ec4780572825781cd9b/CHANGELOG.md

Part-of: odoo/odoo#80156
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-02-10 07:46:13 +00:00
Aaron Bohy f3e71d01ee [REF] web: rework env.config
The motivation of this commit comes from breadcrumbs.

Breadcrumbs work as follows: for each controller in the stack of
the ActionService, there is an entry in the breadcrumbs. Except
for the last entry (which corresponds to the currently displayed
controller), the value to display is computed by the ActionService
and stored in this.env.config.breadcrumbs. For the last entry,
we use the displayName set in this.env.config.

When a view wants to update its displayName (e.g. the form view
when we switch to another record), it updates the displayName in
the config, which thus correctly updates the breadcrumbs. However,
this doesn't change the internal values in the ActionService, so if
another controller is stacked over the current one, the penultimate
entry is wrong. To update the internal state of the ActionService,
the event 'controller-title-updated' must be triggered as well,
which is cumbersome. Note that we don't really face the issue yet
because among already converted views, none of them need to update
its displayName in the breadcrumbs.

This commit aims at uniformizing the way the (n-1) first entries
and the last one behave, by making the "breadcrumbs" key encode
all breadcrumbs entries (the n-1 first ones, and the last, current
one). We also replace the "displayName" key by "getDisplayName"
such that it uses a single source of truth, located in the
ActionService, and we provide a function "setDisplayName" to update
it. Finally, this commit introduces the notion of "default config"
which ensures that standalone views, or views in tests, have a
valid config with expected keys.

closes odoo/odoo#81031

Related: odoo/enterprise#22799
Signed-off-by: Géry Debongnie <ged@odoo.com>
2021-12-13 12:24:50 +00:00
Mathieu Duckerts-Antoine 64c8e4eadd [FIX] board: graph height
The commit 3862d5aae1df72d3585f915e8a2a2626322e74ad has changed the class
set on the root node of the graph renderer but has not adapted a css rule
used in the board app to ensure that the graph views have the correct
height. We fix that situation.

closes odoo/odoo#80047

X-original-commit: b08bc57d5ba2e0da17a452189d584574fb2f9832
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-23 06:46:52 +00:00
Mathieu Duckerts-Antoine e0cbf4739d [FIX] board: save correct domain
Since 40f1ae87e1436192a70a8a7432eb72d379cfa6dc, a view added to the board application would not
have the correct domain:
    - the action domain was not kept in the saved domain
    - the saved domain was kept dynamic, leading to possible crashes
      e.g. a condition like ("user_id", "=", uid) in the saved domain
      would make crash the dashboard app.
We fix the problem and add a test.

X-original-commit: 7e77bb74bfa1bfef92c6d385dedc2d89e0040780
Part-of: odoo/odoo#80047
2021-11-23 06:46:52 +00:00
Mathieu Duckerts-Antoine b87448356b [FIX] board: keyboard navigation
During the refactoring of the legacy control panel done in d679cd0d8ba9a2420e81a42a698763e9be2327e1,
the method "_addToBoard" was renamed as "addToBoard", but a call to _addToBoard
was left, breaking the keyboard navigation. We fix that situation.

X-original-commit: 6aa10e8c9118eba3c19563431c57912108fe12b9
Part-of: odoo/odoo#80047
2021-11-23 06:46:52 +00:00
b63ee52552 [FIX] *: remove scss 'extend' from dropdown components
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.

Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.

In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.

Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.

// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
  <button class="dropdown-item" type="button">Action</button>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
  <li class="o_dropdown_item">
     <span>Action</span>
  </li>
  <li class="o_dropdown_item">
     <a href="#">Another action</a>
  </li>
</ul>

// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
  <span class="dropdown-item">Action</span>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)

closes odoo/odoo#77649

X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2021-10-04 07:57:00 +00:00
Julien Mougenot 53f9b5f235 [REF] *: adapt modules to action and view contexts
This commit handles the adaptation of any component using the search
model's 'action' and/or 'view' key, now replaced by the environment
keys 'actionContext' and 'viewContext'.

Affected modules are:
- base_import
- board
- crm
- google_spreadsheet
- project

X-original-commit: 40f1ae87e1436192a70a8a7432eb72d379cfa6dc
Part-of: odoo/odoo#77463
2021-09-30 10:38:30 +00:00
36988d0edc [IMP] *: use new dropdown in legacy too
This commit replaces the control panel dropdowns with the new <Dropdown/> component, in order to get consistent through the new/legacy views (because the current Odoo version is in a state where some views uses the new infrastructure and some others are still not converted - see odoo/odoo#73311).

The diff seems massive, but it is mostly due to tests adaptations.

closes odoo/odoo#77001

X-original-commit: d679cd0d8ba9a2420e81a42a698763e9be2327e1
Related: odoo/enterprise#21077
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2021-09-23 07:17:43 +00:00
Lucas Perais (lpe) 56dda82a5f [REF] web, *: legacy: lazy loading of legacy reporting views
Since commit 0134495ba5 the reporting
views pivot, graph, cohort are written in full new framework.

Some applications still need the legacy ones, so this commit just implements
the lazy loading of those views.

In stock, report_stock_forecasted has been adapted in order to avoid having
a GraphView override: we now modify the canvas' height in pure JS.

*: board, stock

closes odoo/odoo#76931

Related: odoo/enterprise#21054
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-22 12:22:46 +00:00
Aaron Bohy 6e4790ad66 [REF] web,board: rename some useSetupAction params
exportLocalState -> getLocalState
exportGlobalState -> getGlobalState
saveParams -> getContext

Moreover, the last one no longer returns an object with a "context"
key, but rather directly returns the context itself.

closes odoo/odoo#76576

X-original-commit: 12111f114c096c50adbb87cea9f1dd97dc16c47d
Related: odoo/enterprise#20894
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-15 15:22:25 +00:00
Jorge Pinna Puissant d9303a8448 [FIX] web: fix multiple display errors
This commit will fix some display errors :
 - The margin space between two btn-group on the control panel was too big;
-  The "Group By" menu was lacking an option to add the "fa-caret-down" to looks like other
    Dropdowns;
- The "Group By" menu on the graph view, when used as a subview, has been place in its own
    btn-group to behave exactly as the "Measures" menu;
- The background of the headers on the pivot table wasn't always gray;
- Some borders of the pivot table were missing.

closes odoo/odoo#76529

X-original-commit: 0ffe18927c2f086529de168b5665766a1b9261f7
Related: odoo/enterprise#20872
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-09-15 06:35:00 +00:00
Mathieu Duckerts-Antoine b7502e6ce6 [REF] web: search param: domains --> comparison
The search param "domains" of type Array was not satisfactory for
several reasons:
 - useless for non reporting views
 - too close from the search param "domain"
 - a key "fieldName" was put on the value (resulting in a loss of
   information in case of stringification)

We change it for a search param "comparison" of type null or Object.

closes odoo/odoo#76340

X-original-commit: 4f867099846c4214a74a7b0222ac0941537bbe29
Related: odoo/enterprise#20772
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-10 15:00:55 +00:00
aeb8e49972 [IMP] web,*: view infrastructure
We refactor the action service and allow the legacy and new views to share
a global state within a same action.

We introduce two new components View and WithSearch along with
the search infrastructure: ControlPanel, FilterMenu,...

Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2021-09-07 10:04:35 +00:00
Julien Mougenot b98637e19c [REF] board: Move legacy files
This commit moves the content of the static board files to a dedicated
`legacy` folder to mark the transition with the new Owl environment.

Part-of: odoo/odoo#73311
2021-09-07 10:04:35 +00:00
Samuel Degueldre a3c69db9ef [FIX] board: replace include on ActionManager with override on view
When opening the dashboard in form view, some of the view options should
always have a certain value (in particular, the target should be inline,
and the form view should not have action menus or a control panel).

Previously, this was done through an override on the action manager when
executing a window action. In wowl, the action manager has been replaced
with an action service and its methods cannot be overriden.

This commit solves the same problem with a different approach, by
overwriting these options before trying to extract the view params from
the action.
2021-06-18 21:31:27 +02:00
Nicolas Martinelli 6d810c6004 [FIX] board: incorrect type in action.views
- Install the `board` module
- Go to Accounting / Customer / Invoices
- Go to the Pivot view
- Add the view to the Dashboard
- Go to Dashboard
- Click on a cell of the pivot view to open the list view

The list view is the supplier list view instead of the customer list
views.

The root cause of the issue is that in the case of the Dashboard, we
receive an Array of Array, while in the regular access we receive an
Array of Dict. In the former case, the `_findView` returns `false` for
all views despite the fact that the correct list is already provided.

Since the views are `false`, `load_views` chooses the default views for
the model, which are in this case the supplier views.

In the Dashboard, the view is created in:
https://github.com/odoo/odoo/blob/1bdd0cc247d36c869ffdee7d501cb65d36be47a6/addons/board/static/src/js/board_view.js#L267-L274

When switching view, the action is set in:
https://github.com/odoo/odoo/blob/1bdd0cc247d36c869ffdee7d501cb65d36be47a6/addons/web/static/src/js/chrome/action_manager_act_window.js#L895

and the view is created in:
https://github.com/odoo/odoo/blob/1bdd0cc247d36c869ffdee7d501cb65d36be47a6/addons/web/static/src/js/chrome/action_manager_act_window.js#L235

The assumption that a list of dicts is received is used is several
places:
https://github.com/odoo/odoo/blob/7a35515e495d4fb8edbaf252988c8c3c144f4442/addons/web/static/src/js/views/calendar/calendar_view.js#L131
https://github.com/odoo/odoo/blob/7a35515e495d4fb8edbaf252988c8c3c144f4442/addons/web/static/src/js/views/pivot/pivot_view.js#L131
https://github.com/odoo/enterprise/blob/05a78e94073aea88b2314918cadc478a367afef0/web_cohort/static/src/js/cohort_view.js#L93
https://github.com/odoo/enterprise/blob/05a78e94073aea88b2314918cadc478a367afef0/web_grid/static/src/js/grid_view.js#L79-L84

opw-2387417

closes odoo/odoo#62689

X-original-commit: 5fc81820de49b78f70d471d0f9cc99afc874a550
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-12-01 14:02:54 +00:00
Achraf (abz) 2355300b9c [FIX] board: Custom name not shown
Issue

    - Install 'Dashboard'
    - Try to add something to the dashboard via 'Add to my dashboard'
    - Enter custom name
    - Click on 'Add'

Cause

    The name of the action was taken instead the input content

Solution

    Take the input content

opw-2363000

closes odoo/odoo#60352

X-original-commit: 933ef22ede27280d34ccf4ce2e172c8207ca2074
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-10-20 10:03:58 +00:00
Julien Mougenot db41d41739 [REF] board,stock: adaptation to graph Owl
To reflect the changes on the graph renderer, some class names have been
adapted and the graph views in stock reports are now properly
instantiated.
2020-10-12 07:43:43 +00:00
Hardik Prajapati 31bf0fda8f [FIX] board: remove uppercase under Favorites
this commit removes unnecessary uppercase used under the favorites menu

task - 2325684

X-original-commit: 2522dd4b1be98d3b353dcd76a7f24f256094f5fd
2020-09-09 07:30:47 +00:00
jvm-odoo 876b77af2c [FIX] board: fix graphs height
Issue

	- Install Projects, Dashboard
	- Project > All tasks > Graph view
	- Add to dashboard
	- Refresh & go to dashboard

	The graph is small and it's
	hard to read it

Cause

	We have no min-height & chartJS computes
	a height which is too small

	Already fixed in previous versions with
	9214d78152 but now the class `o_graph_svg_container`
	seems to be used nowhere

Solution

	Change the class name & adjust height a bit

OPW-2303224

closes odoo/odoo#55218

X-original-commit: 80a46b9249bd6dada4d462cd7a11a406eb1ceba5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-07-30 15:20:06 +00:00
Julien MougenotandMathieu Duckerts-Antoine bb3bc7c9e4 [IMP] *: adapt modules to Owl search panel
Adaptation of the rest of the environment to the changes regarding the
refactored search panel and model.

This commit includes the following changes:

- Since the control panel model is now part of the search model, the
view widget is responsible of its instantiation with the appropriate
API; creating an ActionModel holding the required model extensions.

- The controller is now importing/exporting the state of the entire
search model as well as the current state of the search panel (given
throught its props). Changes have been made to adapt to this behaviour.

- The multiple components linked to the control panel model have been
adapted to reflect the changes brought to it (they will now listen to
the "searchModel" instead of the "controlPanelModel").

- The `test_utils_create` methods have also been adapted to properly
instantiate a searchModel

Part of task 2228968

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-07-23 08:21:10 +00:00
Mathieu Duckerts-AntoineandJulien Mougenot fed0b52dd5 [IMP] board: adapt board to comparison menu
The "board" module has been adapted accordingly to the recently
introduced comparison menu.

Task ID: 2245719

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-04 19:32:52 +00:00
Nicolas Lempereur 3d7ed0e74b [FIX] board: map view shown in dashboard
Before this change the map view (the fix could also be in web_map module
but currently all dashboard fixes are at the same location) would have
a zero height so it was not shown at all in dashboard even if it was
loaded.

With this changeset, we set a 100vh height (total height of viewport).

opw-2257146
closes #51610

closes odoo/odoo#51631

X-original-commit: c5bd63f60c8e34d8a947a6e4118ce707a2a894a6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-20 14:53:11 +00:00
jvm-odoo 0028cf7174 [FIX] board: fix creating wrong controllers
Issue

	- Install Dashboard & Sales
	- Add a graph & a list to the dashboard
	- Go in the dashboard

	Rendering ok

	- Click on a list item
	- Go back with the breadcrumb

	Traceback

Cause

	When going back with the breadcrumb
	we retrieve the previous view controller.

	https://github.com/odoo/odoo/blob/9400059073d7401789eb1a60d6a0ec6f58dfc66b/addons/web/static/src/js/chrome/action_manager_act_window.js#L457

	By restoring the board controller, we
	restore all the subcontrollers too.

	But the actual board renderer is re-creating
	controllers. This creates inconsistencies
	with the view.

Solution

	Remove the restored controllers

OPW-2232713

closes odoo/odoo#49728

X-original-commit: 4f3d818052d689da762d8afbf1789daaa3d39821
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-04-17 16:24:38 +00:00
jerome hanke (jhk) 5eccc6a7df [FIX] board: calendar view height is not zero
Steps to reproduce:
- install calendar and dashboard
- go to calendar > favorites > add to my dashboard
- go to dashboard

Previous behavior:
the calendar view in the dashboard does not show the main widget
because height is 0px (because the structure is different that normal
calendar view where view height is restricted based on viewport).

Current behavior:
calendar views are properly displayed in dashboard

opw-2226565

closes odoo/odoo#49709

X-original-commit: d1218004aa0b4a1840c99346baef73bc5fbb90a1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-04-17 10:14:57 +00:00
Julien MougenotandMathieu Duckerts-Antoine e68d3bb09d [REF] *: Adapt all modules to new control panel
Adaptation of the code throughout all modules to properly instantiate the newly
refactored control panel and update it accordingly.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
fw-bot 65e04f304f [FIX] board: Beautiful button
💇 for that button.

closes odoo/odoo#37801

X-original-commit: bdb4896fb310920195ed6a1f13322f91f94d3350
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 15:12:15 +00:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
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
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
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
Christophe Simonis 06898fac3c [MERGE] forward port branch saas-12.1 up to f9d3b5b7df 2019-02-28 13:47:09 +01:00