Commit Graph
28 Commits
Author SHA1 Message Date
MerlinGuillaume 7bbec42f07 [IMP] pos,website(_sale): link sale.report to pos.order
It's currently not possible to know which `pos.order` is linked to a
`sale.report`

Solution:
Add a field `order_reference` on model `sale.report`. This field refers
to either a "sale.order" or a "pos.order" record.
The field `order_reference` is used to count the number of distinct
orders. We cannot simply use count_distinct on the `order_id` because
there can be multiple sale.report with the same `order_id` but related
to different models (sale or POS order).

Part-of: odoo/odoo#116830
2023-06-13 14:07:27 +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
Lucas Lefèvre 2fde5b47d1 [FIX] spreadsheet_dashboard_sale: display number of quotations
Database: Runbot 16

Exact steps (or video) to reproduce the issue (on runbot):
Dashboard
Sales
Select Last seven days
The figures do not include today
Remove the filter
The Order now shows but the Quotations is at zero. In the Top Quotations and Top Sales Orders sections we can see there is one of each, but the quotation
doesn't show

opw-3251869

closes odoo/odoo#120740

X-original-commit: 6ca41c4266f63ae629307330241aad810bbc950f
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-05-09 00:40:59 +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
Lucas Lefèvre 2a24e7ae52 [IMP] sale, spreadsheet_dashboard_sale: display amount currency
Amounts in the spredsheet Sales dashboards are displayed without their currency
even though the amounts are all correctly converted to the current
company's currency.

With this commit, amounts are displayed with their currency in the
dashboard, list view and default form view.

The hardcoded number format is removed on the dashboard cells to let
the automatic format do the job

Task 3167343

closes odoo/odoo#111702

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-10 14:38:43 +01:00
Lucas Lefèvre b94335f92f [FIX] spreadsheet_dashboard_sale: exclude drafts and cancelled records
In the Sales dashboards, click on any of the "Top *" link.
=> in the list view, there are more records than it should be.
Quotations and cancelled records are displayed

Follow up of 0fa2510

closes odoo/odoo#111762

X-original-commit: 575be2a4c2d48d5cdd3babb6b80759cf02ef23c6
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-02-03 07:07:08 +01:00
Lucas Lefèvre ff9470347d [FIX] spreadsheet_dashboard_sale: display product quantity as int
In the Sales dashboards, the product quantities (cells B43:B52) are
displayed with the automatic pivot format which displays floats with
decimal.

If the product is a chair, it's weird to see the quantity ending with ".0"

		Units
Office chair	11.0

Even if some unit of amounts can be expressed with decimal values,
we decided to round the amounts in the dashboard by forcing
the integer format.

X-original-commit: bd029041a82278a8dc7cf1b363e87c70845acd3a
Part-of: odoo/odoo#111762
2023-02-03 07:07:08 +01:00
Lucas Lefèvre 57070641c1 [FIX] spreadsheet_dashboard_sale: count distinct orders
In the Sales dashboards, all "Orders" columns in every "Top *" tables are
wrong.
They count the number of report records (~ sale order lines) but
some are part of the same order. For those cases, the order is counted twice.

Task 3166898

X-original-commit: f3e80f52e96ed3e2b48157467dcf3aef441e6455
Part-of: odoo/odoo#111762
2023-02-03 07:07:08 +01:00
Lucas Lefèvre 76c68d79dd [FIX] spreadsheet_dashboard_sale: fix incorrect amounts
closes odoo/odoo#111137

X-original-commit: 9ea01b14a96c984a763e285b934d5440b6d2895a
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-26 19:56:05 +01:00
Lucas Lefèvre 9999fe649e [FIX] spreadsheet_dashboard_*: exlude drafts and cancelled records
Some amounts were wrong because quotations were included, even though
they do not make revenue.

opw 3121450
task 3130829

X-original-commit: 0fa2510c34a41e9e91131909a0b24af25aa770fc
Part-of: odoo/odoo#111137
2023-01-26 19:56:04 +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
niyasraphy d322942010 [FIX] spreadsheet_dashboard_{}: remove dashboard view type from action
remove non existing dashboard view type from action in dashboard json files.

closes odoo/odoo#108986

X-original-commit: cebe0eb3ff581fd2827ddc3e2329ed4bdcddc2b5
Related: odoo/enterprise#35365
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-03 13:16:23 +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
Victor Feyens 892c8ae572 [FIX] sale: remove useless menu depth
Since the removal of the dashboard view(s), there isn't even a second
'Dashboard' menu being added by and enterprise module.

Therefore, there is no need to keep the 'Sales' menu hidden under the
'Reporting' one, the reporting one can lead directly to the `sale.report`
action (& views).

closes odoo/odoo#103161

X-original-commit: 61a471eaf72fced257f31ae05e61f12620a5d39c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-10-12 18:58:43 +02:00
Adrien Minne 1befe0567d [IMP] spreadsheet_dashboard_*: update dashboards to latest version
closes odoo/odoo#102383

X-original-commit: bf6fc61a2bd2724be3bfc4d8e496e0dfc11cdfdf
Related: odoo/enterprise#32374
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-10-06 18:00:54 +02:00
Lucas Lefèvre ea78565152 [FIX] spreadsheet_dashboard_sale: add __count measure
The `__count` pivot measure was removed by mistake in the last
dashboard update
https://github.com/odoo/odoo/commit/4d6fb4549d4069fc52af0ba500f91ba271e9c62b

closes odoo/odoo#102320

X-original-commit: 3d1e1d4fa2f2919eba2b30366919e091f3fc1d61
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-06 13:05:57 +02:00
Adrien Minne 22d35da810 [FIX] spreadsheet_dashboard_*: update dashboards
Update dashboard to latest version

closes odoo/odoo#102006

X-original-commit: 4d6fb4549d4069fc52af0ba500f91ba271e9c62b
Related: odoo/enterprise#32222
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-10-04 08:30:44 +02: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 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
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 c623ea6686 [ADD] spreadsheet_dashboard_sale: add sales dashboard
Part-of: odoo/odoo#97606
Co-authored-by: Nathan Grognet <ngr@odoo.com>
2022-09-10 02:54:53 +02:00