Commit Graph
58 Commits
Author SHA1 Message Date
jash-odoo 0c50cbe18c [IMP] spreadsheet_dashboard: Create a Dashboards / Admin security group
Introduces a new group called "Dashboards / Admin within the
spreadsheet_dashboard module, replacing the existing
"Administration / Settings" group for Improved Dashboard Management

taskID = 3373509

closes odoo/odoo#125708

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-07-05 10:12:48 +02:00
Elisabeth Dickinson d70da05100 [FIX] spreadsheet_dashboard: fix lost margins on dropdowns
During the Milk revamp, the dropdown items in the Dashboard's header
lost their horizontal margins. These have been put back by setting a gap
property to the parent.
When in the dashboard view under Sales > Product, the dropdowns had an
awkward spacing between them despite the fix. Another fix was to set
`w-100` to the `.o_field_tags` element. And finally a `.gap-1` is also
added to the latter to give its children some space when multiple tags
are selected.

It was noticed that some CSS, specifically the `.o-filter-value` class,
was not targeting anything. This has been fixed by moving the selector
into its correct parent element.

task-3326566
part of task-3326263

closes odoo/odoo#127010

X-original-commit: bd456bc89f896de6b3d8c040706dc02ab3799e6e
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-07-01 09:52:59 +02:00
Adrien Minne (adrm) c31032f415 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/7d15d3c7 [REL] 16.4.0-alpha.6
https://github.com/odoo/o-spreadsheet/commit/56f3b593 [IMP] spreadsheet: add locale handling Task: 3222401
https://github.com/odoo/o-spreadsheet/commit/5aec70d4 [IMP] cell: store date string as value + format Task: 3222401
https://github.com/odoo/o-spreadsheet/commit/eeaf0083 [IMP] icons: add display header icon
https://github.com/odoo/o-spreadsheet/commit/3f1e970c [FIX] SelectionInput: fix position of exclamation mark icon Task: 3355063
https://github.com/odoo/o-spreadsheet/commit/a46bf04e [FIX] LineBarPieConfigPanel: charts data series invalid input Task: 3355063

closes odoo/odoo#126679

Related: odoo/enterprise#43291
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-29 18:20:37 +02:00
Pratik Awasthi a92d68649d [IMP] spreadsheet_dashboard: improve the dasboard panel
Improve the following generic UX

- Earlier service modules were under the project name so improved it by renaming
  it with Services
- Project overview was named Tasks so renamed it Project
- graph/pie view > project > breadcrumb of the dashboard was not visible because
  the action of the project has a target main which stops the breadcrumb of project
  so target it to main to make breadcrumb visible

task-3324591

closes odoo/odoo#121348

Related: odoo/enterprise#41032
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-15 10:44:58 +02:00
Mathieu Duckerts-AntoineandLucas Lefevre dacb31aa85 [REF] spreadsheet: use name service in DisplayNameRepository
We make the class DisplayNameRepository use the name service instead of
BatchEndpoint. This makes the code simpler and allow to avoid a lot of
rpcs (in some occasions) when fetching display names.

closes odoo/odoo#124090

Related: odoo/enterprise#42124
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Lucas Lefevre <lul@odoo.com>
2023-06-09 17:00:48 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Brieuc-brd ee75969979 [IMP] *: app icons: replace svg to png
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.

task-3326633
Part of task-3326263

X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
2023-05-22 13:54:07 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Chenyun Yang 085fd873d6 [IMP] spreadsheet[_dashboard]: delete relation filter values using backspace key
This commit implements the functionality of using backspace key to
delete values in relation filter.

task 3324738

closes odoo/odoo#121513

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-16 18:08:07 +02:00
Pierre Paridans eef262abf4 [FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours

[FIX][TMP] account: CogMenu selector in tours

[FIX][TMP] web*: Breadcrumb targetting in tours

Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).

add classname on last breadcrumb item

[FIX][TMP] project: View buttons selector in tours (moved away from CP)

[FIX][TMP] project: Kanban selectors in tours (quick create)

[FIX][TMP] *: SearchBar selectors in tours (toggle menu)

[FIX][TMP] *: ButtonBox selector in tours

[WIP][IMP] web: add toggleSearchBarMenu in search helpers

adapt and unskip 3 list tests

adapt and unskip calendar tests

unskip web_tour test that actually pass

post rebase fix

allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later

post rebase fixes

fix

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Damien Bouvy 1e706d3069 [IMP] web, *: milk adaptations
*: hr_holidays, stock, sale, product, web, sale, purchase, stock,
   website, survey

Adapt some custom control panels (mainly for custom reports) to the
milk controlpanel.

hr_holidays:
Move the buttons to create a new time off or a new allocation to the
"create button" slot and transform it into a dropdown (creating
allocation requests is clearly a secondary action, not a primary one)

stock:
3 lines does not fit, must be on 2 lines

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +02:00
Pierre Paridans caef16ee4e [REF] web,*: ControlPanel layout
This commit brings the ControlPanel into a single line with 3 main
sections:
- buttons & breadcrumb
- layout related actions (ie. the SearchBar in multirecord view or
  ButtonBox in formView)
- navigation (pager, switch view...)

Add new search bar menu, this is a merge of the following components
into one big component display in column:
* comparison_menu
* favorite_menu
* filter_menu
* group_by_menu

Also adapt navigation hook.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
paso-odoo 7f15ee5965 [FIX] spreadsheet_dashboard: fix external id not found issue in spreadsheet
If applied, this commit will solve the 'external id not found' issue while
the user had deleted the 'Logistics' dashboard and then install or upgrade the
spreadsheet modules.

Steps to produce:
- Open the 'Logistics' dashboard from Spreadsheet > Configuration > Dashboards.
- Delete all 'Spreadsheet' from Logistics.
- Now delete the 'Logistics' dashboard from the action.
- Install or Upgrade modules that are using that dashboard like
spreadsheet_dashboard_stock, spreadsheet_dashboard_purchase, etc.

sentry - 4083977216
see - https://tinyurl.com/2az3tqtv

closes odoo/odoo#120528

X-original-commit: 9b295f5e478fc7b9a888ca07de267f0537fb02ae
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-05-08 08:04:43 +02:00
Adrien Minne (adrm) 2c1096da95 [IMP] web,spreadsheet_dashboard: add missing props validation
closes odoo/odoo#120323

Task: 3297417
Related: odoo/enterprise#40611
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-05 18:08:02 +02:00
b5794e89e1 [IMP] web: Owl DateTimePicker
This commit introduces a date picker OWL component meant to handle the
following use-cases:
- date picker
- date & time picker
- date range picker
- date & time range picker

Basically, this component is the union of the two previous third-party
libraries handling these cases: TempusDominus and DateRangePicker.

New components introduced:

* The main addition of this commit is the `DateTimePicker` itself which
handles the display and interactions of the calendar and time pickers.
> see @web/core/datetime/datetime_picker

* The picker can then be coupled to an input using the
`useDateTimePicker` hook. The purpose of this hook is to handle events
on a given input element and syncronize its value to a date picker it
will spawn in a popover.
> see @web/core/datetime/datetime_hook

* Lastly, a simple `DateTimeInput` component will render an input and
call the hook mentioned above to handle it. This component is
effectively replacing the previous DatePicker and DateTimePicker
components (note that it does not handle range values).
> see @web/core/datetime/datetime_input

Another noticeable change of this commit is the definition of daterange
fields in views:

- Previously, the arch would have to define both fields
and bind them via their options, while also adding an arrow between
inputs or other forms of connection.

- In the new implementation, only the start date field must be declared,
and a date range can be spawned by providing an `end_date_field` in its
options.

Example:
```xml
<field
    name="start_datetime"
    widget="daterange"
    options="{'end_date_field': 'end_datetime'}"
/>
```

warning Added limitations:

- this new way of declaring date ranges means that templates have been
revised to declare one field tag instead of two. This means that list
views using date ranges have lost the ability to be sorted on their end
date fields.

> Justification: the current use cases have been reviewed and it has
been decided that it was not needed to sort on the end date on the
affected list views.

> Workaround: drop the date range and declare both fields as simple date
pickers (i.e. without the end_date_field option).

- all modifiers applied to a field using a date range will be copied and
applied to the end date field. There is no way to define modifiers
specific to one field or the other.

> Justification: there was no use case where one of the two fields
needed specific modifiers.

> Workaround: same as the previous point: split the range into 2 simple
date picker fields.

Additional notes:

- the widget="daterange" is not mandatory in form views, but is required
in list views because only fields with explicit widgets will not be
rendered as simple <span> elements. The date range feature will be
available as soon as an end_date_field is specified.

- as the end date field is not explicitly defined in the view anymore,
any modifier depending on it need to have it defined as invisible
somewhere in the arch.

Task ID: 3121497

Part-of: odoo/odoo#112171
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
2023-05-05 13:52:22 +02:00
Lucas LefèvreandAlexis Lacroix 7a1ae006eb [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/6824b8a1 [REL] 16.3.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/9b911f61 [FIX] tests: fix indeterministic ui sheet
https://github.com/odoo/o-spreadsheet/commit/f20b7be5 [FIX] demo: Align font family with Odoo Task: 3269724
https://github.com/odoo/o-spreadsheet/commit/49a5ee0e [FIX] ColorPicker: Fix checkmark symbol Task: 3269724
https://github.com/odoo/o-spreadsheet/commit/4f2ecfec [REM] menu: remove icons on menu items
https://github.com/odoo/o-spreadsheet/commit/54fca81f [REF] *: rename 'menuItem' files to 'action' files
https://github.com/odoo/o-spreadsheet/commit/5c23e084 [REF] *: Change names of type 'MenuItem' to 'Action'
https://github.com/odoo/o-spreadsheet/commit/e5007fd1 [REF] replace xml tool bar in the xml top bar by menu item buttons
https://github.com/odoo/o-spreadsheet/commit/950abc45 [REF] menu registry: factorize menu registries by menu items
https://github.com/odoo/o-spreadsheet/commit/c02a7e96 [IMP] topbar menu: add icons for conditional menu items
https://github.com/odoo/o-spreadsheet/commit/a19d9cac [IMP] topbar menu: add icons for static menu items
https://github.com/odoo/o-spreadsheet/commit/7825124c [IMP] menu: replace right text icon by left icon
https://github.com/odoo/o-spreadsheet/commit/be3c3d6f [FIX] viewport: infinite loop with hidden headers
https://github.com/odoo/o-spreadsheet/commit/c05be1de [FIX] github: update release-action to latest version
https://github.com/odoo/o-spreadsheet/commit/9fdbdab2 [FIX] sheetview: correctly auto-size spreadsheet
https://github.com/odoo/o-spreadsheet/commit/7d18b589 [IMP] bottom_bar: hide add sheet button in readonly mode
https://github.com/odoo/o-spreadsheet/commit/108b89bd [FIX] menus: don't open submenu is not readonly
https://github.com/odoo/o-spreadsheet/commit/1edbc157 [FIX] top bar: remove useless "Save" menu item

closes odoo/odoo#118624

Related: odoo/enterprise#39801
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: Alexis Lacroix <laa@odoo.com>
2023-04-17 09:27:58 +02:00
Lucas Lefèvre 052dadfc5b [REF] spreadsheet: introduce @odoo/o-spreadsheet module
Using o-spreadsheet features and functions is done using
the same import module as if it was installed from npm.

Additionaly, by adding the library as dev dependency in package.json[1], IDEs can
now leverage Typescript types for autocomplete and type checking.
The "alpha" release tag is always the lastest master version.

[1] enable web tooling `addons/web/tooling/enable.sh` ;)

closes odoo/odoo#115972

Related: odoo/enterprise#38471
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-30 17:57:44 +02:00
Chenyun Yang 0a87304ff0 [REF] spreadsheet: spreadsheet models
This commit refactors the current model structure of spreadsheet-related
module. Data fields are integrated into an abstract model
`spreadsheet.mixin` and all sub-models are inherited from it. This way
we can group all decode/encode logics into one place.

task 3222572

closes odoo/odoo#116498

Related: odoo/upgrade#4473
Related: odoo/enterprise#38692
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-03-30 15:09:33 +02:00
Adrien Dieudonne 28e989528d [FIX] web, spreadsheet_dashboard: filters can't always be cleared
To reproduce:

- Go to Dashboards
- Select a long product name
-> The tag overflows

opw-3053801

closes odoo/odoo#116899

X-original-commit: 94897fa258322d02a91b57df7f896d17b514b093
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-03-29 10:37:25 +02:00
Rémi Rahir (rar) 406abe1f6e [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/ec749cf1 [REL] 16.2.0-alpha.3
https://github.com/odoo/o-spreadsheet/commit/d7267cfa [IMP] selection input: dynamic highlight followup
https://github.com/odoo/o-spreadsheet/commit/de0cdc02 [FIX] figure,chart: Enforce unicity of figure ids
https://github.com/odoo/o-spreadsheet/commit/2410e9d2 [IMP] color_picker: make the color picker a popover
https://github.com/odoo/o-spreadsheet/commit/5ff12582 [FIX] bundle_xml: small fixes for script bundling the xmls
https://github.com/odoo/o-spreadsheet/commit/cf82dbd6 [REV] charts: Fix chart duplicated ids
https://github.com/odoo/o-spreadsheet/commit/a4d593fb [REV] figure,chart: Prevent destructive creation
https://github.com/odoo/o-spreadsheet/commit/eb626ad0 [REL] 16.2.0-alpha.2
https://github.com/odoo/o-spreadsheet/commit/2afe3505 [FIX] chart: Remove forwardport comments Task: 3210689
https://github.com/odoo/o-spreadsheet/commit/2048d9ac [IMP] config: GH release follow semantic versions of package
https://github.com/odoo/o-spreadsheet/commit/00bd206c [IMP] config: tag npm publications
https://github.com/odoo/o-spreadsheet/commit/c66113b3 [FIX] server: server checking the wrong dir to watch for changes
https://github.com/odoo/o-spreadsheet/commit/38af1607 [FIX] config: Fix the action version extractor
https://github.com/odoo/o-spreadsheet/commit/162451a3 [REL] 16.2.0-alpha.1
https://github.com/odoo/o-spreadsheet/commit/92eaf0f5 [FIX] figures: menu not displayed for small figures positioned left
https://github.com/odoo/o-spreadsheet/commit/2855f543 [REL] 16.2.0-alpha.0
https://github.com/odoo/o-spreadsheet/commit/e3653157 [IMP] config: Add Github Action to automatically release and publish on npm
https://github.com/odoo/o-spreadsheet/commit/dfc2cf96 [IMP] config,*: Prepare introduction of releases
https://github.com/odoo/o-spreadsheet/commit/bf7c536e [IMP] doc: adapt the doc to the new API for arguments
https://github.com/odoo/o-spreadsheet/commit/270c02e2 [FIX] figure,chart,image: Prevent destructive creation
https://github.com/odoo/o-spreadsheet/commit/34fc5622 [FIX] charts: Fix chart duplicated ids
https://github.com/odoo/o-spreadsheet/commit/8f75a4f3 [FIX] chart,image: Prevent destructed charts on duplicated sheet
https://github.com/odoo/o-spreadsheet/commit/a815a167 [IMP] functions: translate argument description
https://github.com/odoo/o-spreadsheet/commit/c215783e [IMP] helpers: export lazy function
https://github.com/odoo/o-spreadsheet/commit/f6dfe33f [REM/IMP] css: remove unused classes and improved a bit the css
https://github.com/odoo/o-spreadsheet/commit/fbd86375 [REF] port: run server on 9090 instead of 9000
https://github.com/odoo/o-spreadsheet/commit/8cbfba42 [IMP] top_bar: added and updated tooltips
https://github.com/odoo/o-spreadsheet/commit/7421765d [IMP] figure: remove useless chart registry filling
https://github.com/odoo/o-spreadsheet/commit/7b31778f [FIX] selection input: dynamic highlights
https://github.com/odoo/o-spreadsheet/commit/84ae26f2 [FIX] composer: fix wrong style attribute
https://github.com/odoo/o-spreadsheet/commit/58b09153 [FIX] corner: Fix missing background color
https://github.com/odoo/o-spreadsheet/commit/155c6af3 [IMP] bottom_bar: Add drag&drop on sheet tab.
https://github.com/odoo/o-spreadsheet/commit/d641b2cf [FIX] menus,charts: missing translations
https://github.com/odoo/o-spreadsheet/commit/36df3326 [FIX] selection: uncomment test
https://github.com/odoo/o-spreadsheet/commit/990c158b [FIX] font_size_editor: add props definition
https://github.com/odoo/o-spreadsheet/commit/4dfa6d3e [IMP] autofill: support edge scrolling
https://github.com/odoo/o-spreadsheet/commit/a198f5c9 [IMP] Components: extract color picker entry component

closes odoo/odoo#114388

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-03-07 02:00:06 +01:00
jash 2162dd4225 [FIX] spreadsheet_dashboard: decoding the dashboard data
Earlier, receiving data was size of the file which is not what we
want. And we are trying to decode that as they are in binary form. Which
can not working properly.

So refactor code accordingly.

Task - 3162824

closes odoo/odoo#113953

Related: odoo/enterprise#37650
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-03-02 16:01:02 +01:00
Pierre Rousseau 906e6784c1 [REF] spreadsheet*: use @odoo/owl import
closes odoo/odoo#113133

Related: odoo/enterprise#37284
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-02-22 20:25:27 +01:00
Martin Trigaux 776689b0f4 [I18N] *: export saas-16.1 source terms
closes odoo/odoo#110752

X-original-commit: 56b2b52287a8f2192d80ea417c7efac80a87c0a9
Related: odoo/enterprise#36173
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-24 10:20:30 +01:00
Lucas Lefèvre a7fe381f71 [REF] spreadsheet_dashboard: remove badly named raw field
Up until now, the collaborative expected a field named `raw` containing
the serialized json data. This is historic and appeared because the field
containing the existing field `raw` on `document.document` contained this
data.

The name `raw` is meaningless. Now the collaborative expects a field
named `spreadsheet_data`.
I chose a field over a custom method because fields are more broadly
supported everywhere (web client services, web client mocks)

closes odoo/odoo#104167

Related: odoo/upgrade#4005
Related: odoo/enterprise#33246
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-01-20 20:58:01 +01:00
Pierre Masereel 4b2692ba2e [FIX] spreadsheet_dashboard: hide sequence for read only users
When a user is not in the 'Setting' group, he sees the cmenu item
configuration and display the dashboard groups, but cannot edit them.

The main issue lies in the sequence field handle, hence we hide this
field for users that cannot configure the dashboard groups or the
dashboards themselves.

closes odoo/odoo#109655

X-original-commit: e9699b7f0deab8ffd0a64d27c7bbedc8f4e2daf7
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-01-11 17:58:39 +01:00
Rémi Rahir dfb88e4fa2 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/fc313d38 [IMP] images: delete images from the file store
https://github.com/odoo/o-spreadsheet/commit/d4e45186 [REF] config: move data external dependencies to config
https://github.com/odoo/o-spreadsheet/commit/3f6cd0f5 [FIX] headers: fix rounding error in header size
https://github.com/odoo/o-spreadsheet/commit/ac07e847 [FIX] functions: fix error message
https://github.com/odoo/o-spreadsheet/commit/e068c651 [IMP] clipboard: copy cell as HTML in OS clipboard

closes odoo/odoo#109497

Related: odoo/enterprise#35607
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-01-10 13:39:56 +01:00
Lucas Lefèvre 14700c9e96 [FIX] spreadsheet_dashboard: unskip expense dashboard test
The test was skipped because the expense dashboard was broken when
the test was merged.
See https://github.com/odoo/odoo/commit/17afe2987e4146b85187b31a34caf7146d5a7cf2

closes odoo/odoo#109033

X-original-commit: 4d4c192e0994ff7849641499b728fe228ae66a4d
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-04 11:35:52 +01:00
niyasraphy b4388a9206 [IMP] spreadsheet_dashboard: translatable name field
before this commit the name field in spreadsheet.dashboard.group and spreadsheet.dashboard is not translatable, and it always appears in english in the dashboard.

after this commit, the name will be translatable and values will be shown in users language in the dashboard.

closes odoo/odoo#108972

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-03 08:54:52 +01:00
Lucas Lefèvre d073dd968c [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/7daa2dd5 [FIX] registry: introduce contains method
https://github.com/odoo/o-spreadsheet/commit/a71edfd9 [FIX] grid: Capture context menu events triggered by keyboard
https://github.com/odoo/o-spreadsheet/commit/475c646f [FIX] index.ts: export helper to create empty sheet
https://github.com/odoo/o-spreadsheet/commit/53707349 [FIX] GridOverlay: Only react to self targeted double clicks
https://github.com/odoo/o-spreadsheet/commit/77820dc0 [FIX] figure: apply dragging style on actual drag, not on mousedown
https://github.com/odoo/o-spreadsheet/commit/7c113676 [FIX] figure: Avoid scroll on a focused figure
https://github.com/odoo/o-spreadsheet/commit/1bda41ee [FIX] composer: keep focus after changing sheet
https://github.com/odoo/o-spreadsheet/commit/143764ae [FIX] composer: close text composer when changing sheet
https://github.com/odoo/o-spreadsheet/commit/b4aac2b3 [FIX] dashboard: copy event is still present
https://github.com/odoo/o-spreadsheet/commit/c1c6133a [FIX] bottom bar: very large numbers badly displayed in automatic sum
https://github.com/odoo/o-spreadsheet/commit/b593fd27 [FIX] data filter: icon not centered
https://github.com/odoo/o-spreadsheet/commit/1b37ce68 [FIX] images: import and export images
https://github.com/odoo/o-spreadsheet/commit/be10c889 [IMP] components: Remove sidePanelIsOpen props from components
https://github.com/odoo/o-spreadsheet/commit/5f680455 [FIX] dashboard: click cells to close filter menu

closes odoo/odoo#108364

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-22 09:37:54 +01:00
Victor Feyens 13ccd9cee4 [IMP] test_lint: detect useless manifest content
Keep the manifests as light as possible, to easily see custom behavior/content.
Complete the work of previous commits cleaning the manifests content:

* 42bad1a6d2
* ef7005f524

and make sure this kind of cleanup commit is not necessary in the future
because it is now automatically verified by a dedicated test.

closes odoo/odoo#107735

Related: odoo/enterprise#34903
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-16 16:17:41 +01:00
Lucas Lefèvre a28cc1cdd4 [MOV] spreadsheet: extract empty spreadsheet utils
The empty spreadsheet data structure is reused (see Enterprise PR #34567)

So we extract it to a function.

closes odoo/odoo#106975

Related: odoo/enterprise#34567
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-14 18:33:04 +01:00
Lucas Lefèvre 9f748a61e4 [REF] spreadsheet_dashboard: parse json data
The spreadsheet json data is no longer parsed downstream (see Enterprise
commit).
So we parse it when we fetch the data.

Part-of: odoo/odoo#106975
2022-12-14 18:33:04 +01:00
Lucas Lefèvre 4bb43e2554 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/ab6f47f9 [FIX] InternalViewport: compute the actual visible rect of a zone
https://github.com/odoo/o-spreadsheet/commit/966c311e [REF] plugins: unify position getters API
https://github.com/odoo/o-spreadsheet/commit/9f1c9695 [IMP] model: ignore type property in command payload
https://github.com/odoo/o-spreadsheet/commit/862dacbc [REF] selection: rename getPosition to getActivePosition
https://github.com/odoo/o-spreadsheet/commit/0144515a [REF] selection: getPosition return main position
https://github.com/odoo/o-spreadsheet/commit/38422f4f [FIX] find and replace: scroll on single match.
https://github.com/odoo/o-spreadsheet/commit/9be582c7 [FIX] selection_input: traceback when using unbounded ranges
https://github.com/odoo/o-spreadsheet/commit/49285322 [IMP] doc: add tables of contents
https://github.com/odoo/o-spreadsheet/commit/2c5d86af [IMP] model: config to provide external dependencies
https://github.com/odoo/o-spreadsheet/commit/5b442218 [REF] plugins: use object in constructor
https://github.com/odoo/o-spreadsheet/commit/ef98be1b [REM] plugins: remove useless modes
https://github.com/odoo/o-spreadsheet/commit/4f20d05f [IMP] data: reorganize data top menu

closes odoo/odoo#106583

Related: odoo/enterprise#34412
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-11-28 14:51:24 +01:00
Pierre RousseauandLucas Lefèvre 6da05b86d1 [IMP] spreadsheet_*: update o_spreadsheet to latest version
Contains the following commits

https://github.com/odoo/o-spreadsheet/commit/96166819 [REF] evaluation: decouple evaluation from core plugin
https://github.com/odoo/o-spreadsheet/commit/a5a67d88 [IMP] find & replace: displays 0 match
https://github.com/odoo/o-spreadsheet/commit/2e2d878f [FIX] overflowing cell with border rendering
https://github.com/odoo/o-spreadsheet/commit/40dfc80c [FIX] interactive merge: remove useless user confirmation
https://github.com/odoo/o-spreadsheet/commit/050e64f3 [IMP] format: support additional date formats

closes odoo/odoo#105997

Related: odoo/enterprise#34097
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: Lucas Lefèvre <lul@odoo.com>
2022-11-18 14:00:05 +01:00
Pierre Rousseau 3aca42ab26 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/1f8e5fac [FIX] spreadsheet: deactivate keystroke inputs in dashboard mode
https://github.com/odoo/o-spreadsheet/commit/085c09b8 [REF] spreadsheet: remove local model
https://github.com/odoo/o-spreadsheet/commit/8dbb54ad [REF] spreadsheet_test: use model from helper
https://github.com/odoo/o-spreadsheet/commit/80fb9292 [REF] tests: mountSpreadsheet returns model
https://github.com/odoo/o-spreadsheet/commit/4bc9edd7 [REM] grid: remove ctrl+s shortcut
https://github.com/odoo/o-spreadsheet/commit/0673bc44 [IMP] spreadsheet: remove useless props
https://github.com/odoo/o-spreadsheet/commit/4e75de52 [IMP] *: add props validation
https://github.com/odoo/o-spreadsheet/commit/f78681ea [REM] tests: remove scroll bars mock
https://github.com/odoo/o-spreadsheet/commit/505e942b [FIX] sheetview: resize viewport when font size changes
https://github.com/odoo/o-spreadsheet/commit/c3997be9 [FIX] data filters: traceback at sheet duplication
https://github.com/odoo/o-spreadsheet/commit/0b35536e [FIX] filters: show rows when filter table is removed
https://github.com/odoo/o-spreadsheet/commit/3a897a36 [IMP] cell: Remove useless uuid generation for performance
https://github.com/odoo/o-spreadsheet/commit/d9d8a6fb [FIX] topbar: dropdown closing when clicking inside
https://github.com/odoo/o-spreadsheet/commit/29225920 [FIX] readme: cannot extend excel import

closes odoo/odoo#104274

Related: odoo/enterprise#33312
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-27 18:43:14 +02:00
Adrien Minne 47ffe7b285 [FIX] spreadsheet: filter clear button for automatic default value
For the date filters with a default value set to "Automatically fitler
on the current period", the clear button don't work. It does not clear
the filter but revert it back to the default value.

The bug happens in the global filters side panel as well as in the
dashboards.

Odoo task 2989909

closes odoo/odoo#103270

X-original-commit: 27e58050aacf0ae525f1e1b6fec7b69133781312
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
2022-10-17 16:14:58 +02:00
Odoo's Mergebot c4febbbe3a [FW][MERGE] UI css fixes
Followup of #102259

Instead of adding a class to remove field borders, we want the opposite: hide the borders by default, except when specified specifically with a `.o_field_highlight` class (on a parent or the field itself). This makes it much easier to add field borders on specific parts of the ui (just add the class in the template), rather than having to _remove_ the class through a js override, which is far less discoverable.

I converted all the new rules to work opposite as before, same for the JS logic which added the class based on mobile device detection (size + touch support).

closes odoo/odoo#102977

Forward-port-of: odoo/odoo#102823
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:16:11 +02:00
stefanorigano (SRI) d53d432361 [IMP] *: adapt for dark-mode
*: hr, hr_holidays, project, purchase, point_of_sale, rating,
spreadsheet_dashboard, stock, survey

This commit adapts modules and components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
Damien Bouvy 68facf03dc [FIX] dashboard, web: o_field_highlight class
Add a new .o_field_highlight class which can be used on fields and field
containers to force having a border on fields (e.g. in places where they
are heavily used inline, like Settings, or where it might not be clear
that you are using a form and that these are fields; e.g. sidepanel,
etc.

This class is automatically added when the device size goes below the
XSS breakpoint, or when the device has touch input (our best metric for
mobile device detection, where hovering is not possible).

X-original-commit: 0f0c8e3b9f7c42c5126dc49d3378d41ad76afbf3
2022-10-10 19:55:25 +02:00
Lucas Lefèvre ea1f747f2c [FIX] spreadsheet_dashboard: don't import test files
closes odoo/odoo#102496

X-original-commit: 64d1450b0f644eb3da6f68f0c333730c7d630726
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-06 19:59:14 +02:00
Pierre Rousseau 347294a8d2 [FIX] spreadsheet, spreadsheet_dashboard: adapt to spreadsheet last update
closes odoo/odoo#102358

Related: odoo/enterprise#32366
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-06 17:00:21 +02:00
Pierre Rousseau 9d455d830b [FIX] spreadsheet_dashboard: set the first sheet as active sheet
Before this revision, the active sheet was not correctly set to the first
sheet.

Task-id 3002541

closes odoo/odoo#102148

X-original-commit: faf6cde43f5d092b8b053d4b6392c6641ec0a48e
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-04 22:00:40 +02:00
Pierre Rousseau bd71c6ae76 [IMP] spreadsheet_dashboard: grid cursor
closes odoo/odoo#101946

X-original-commit: 26ab6164e92b4ab7149a85b74cbff127c35fb4a0
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-10-03 16:19:05 +02:00
Adrien Minne 4b06783080 [IMP] spreadsheet: dashboard filters finetuning
Improve the CSS of the global filters in dashboards

Odoo task 2988046

closes odoo/odoo#100749

X-original-commit: 629c36f9763669e500c2664ad44037d915c29b10
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-21 22:45:46 +02:00
Lucas Lefèvre d72fa35ced [IMP] spreadsheet_dashboard: use py test to validate dashboard data
use a python test to walk throuhg jsons instead of tours

Tours:
- you need to add one for each dashboard. It's a PITA and it doesn't scale
- they only check visible formulas since formulas are loaded only if they are in the viewport (I'm not even sure what is "visible" in chrome headless)
- they are slow
- can't check fields defined in global filters, links to odoo menu/views

`./odoo-bin --addons-path=../enterprise,./addons  -d odoo-db -u  --test-enable`

before: `59,76s user 5,78s system 29% cpu 3:43,15 total`
after: `15,12s user 1,20s system 86% cpu 18,912 total`

The Expenses dashboard was broken by https://github.com/odoo/odoo/pull/98914
But I want to merge this test right now.

Task 2980180

closes odoo/odoo#100757

X-original-commit: 17afe2987e4146b85187b31a34caf7146d5a7cf2
Related: odoo/enterprise#31598
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-21 21:41:48 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Lucas Lefèvre b921f257cf [IMP] spreadsheet_dashboard_*: order dashboards
Now that all dashboards are done, we can order them properly

closes odoo/odoo#100526

Related: odoo/enterprise#31477
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-19 19:28:58 +02:00