Commit Graph
18 Commits
Author SHA1 Message Date
Lucas Lefèvre e5d11fa7a5 [FIX] spreadsheet_dashboard_hr_expense: don't mix currencies
In the Dashboard app, expenses KPI amounts are currently expressed in the
currency they were made in, but with the currency symbol of the company
currency. It also means amounts with different currencies are aggregated.

We want the KPI to be expressed in the company currency and not in the
expense currency.

Note that even with this commit, the amounts are still mixing different
currencies if multiple companies are active

Task 3266092

closes odoo/odoo#119264

X-original-commit: e579ec5b3794d545676accdd23428557b75d05fa
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-20 22:09:57 +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
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 8642a85b4e [REV] spreadsheet_dashboard_hr_expense: restore global filters
Partial revert of #109033

The global filters were removed in 16.0 because the pivot "9" does
not exists in this dashboard.
But it exists in master.
See #104125

closes odoo/odoo#109099

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-01-04 18:49:46 +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 64ac4f80df [FIX] spreadsheet_dashboard_{}: remove non existing field from json files
before this commit, on clicking top reinvoiced orders section in the expense dashboard throws traveback saying invalid field analytic_account_id.

as analytic_account_id field is now replaced by analytic_distribution, removing the usage of analytic_account_id from json files.

closes odoo/odoo#109014

X-original-commit: baea94b9e7e5e5d120e11d454194fbfd70dee4ef
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-03 20:15:06 +01:00
Lucas Lefèvre e6990ed2b8 [FIX] spreadsheet_dashboard: remove currency formats
Some of the dashboard files were using currency formats, which are
hardcoded with a given currency.

Because of that, some amounts are displayed with a $ sign, even if
the amount is in €, according to the record's currency.

It should use the automatic currency formatting of LIST functions
to use the record's currency.

This commits removes the hardcoded currency formats.
Note that the automatic format displays the decimal values while
the hardcoded format did not.
This is a functional change.

opw 3071160
opw 3058192

closes odoo/odoo#107557

X-original-commit: 54c99ede032775b9699ae85f3112de427c4b12b5
Related: odoo/enterprise#34834
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-12-12 13:18:59 +01:00
Adrien Minne f043908df8 [FIX] spreadsheet_dashboard_*: fix dashboards
Update dashboard with latest version.

closes odoo/odoo#107512

X-original-commit: bd116406002f9d0a196141fe742de36ac6dbaa55
Related: odoo/enterprise#34815
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-12-09 16:41:01 +01:00
niyasraphy ef7005f524 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

auto_install is Falsy by default
author is Odoo SA by default
summary & description are empty strings by default
application is False by default
test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content.

closes odoo/odoo#106686

Related: odoo/enterprise#34462
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-29 13:20:31 +01:00
Lucas Lefèvre d935f99e22 [FIX] spreadsheet_dashboard_hr_expense: change incorrect dependency
The dashboard uses `sale_order_id` field of `hr.expense` which is
only added with `sale_expense` module

See fix in 16.0
odoo/upgrade#4009
odoo/odoo#104125

closes odoo/odoo#105148

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-11-08 16:52:44 +01:00
Martin Trigaux e856beb782 [I18N] *: export 16.0 source terms
closes odoo/odoo#101659

Related: odoo/enterprise#32040
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-30 09:31:52 +02:00
Lucas Lefèvre 04892cc17e [FIX] spreadsheet_dashboard_*: adjust some spreadsheet dashboards
This commit fixes/improves spreadsheet dashboards.

closes odoo/odoo#101315

X-original-commit: 7e4cc7cf7be6c196abf0e467630dd5cd86bf15a7
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-27 17:11:51 +02:00
Lucas Lefèvre 291d752ad5 [FIX] spreadsheet_dashboard_*: mark translatable cell content
closes odoo/odoo#101120

X-original-commit: 50e2c92fafa8640f9e23e70d2b10b5cf85373998
Related: odoo/enterprise#31780
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-26 14:43:21 +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
Lucas Lefèvre afec5e4f15 [IMP] spreadsheet_dashboard_*: update dashboards
closes odoo/odoo#100343

Related: odoo/enterprise#31407
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-16 14:25:59 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Lucas Lefèvre 1ca605fe12 [IMP] spreadsheet_dashboard_*: update dashboards
*_account, _event_sale, _hr_expense, _pos_hr, _sale

closes odoo/odoo#100101

Related: odoo/enterprise#31283
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-14 16:18:02 +02:00
Lucas LefèvreandNathan Grognet 82f9297af1 [ADD] spreadsheet_dashboard_hr_expense: add expense dashboard
Part-of: odoo/odoo#97606
Co-authored-by: Nathan Grognet <ngr@odoo.com>
2022-09-10 02:54:53 +02:00