Meghna JaswaniandNicolas Lempereur 8df4bbf1ed [FIX] website{,_sale_link_tracker}: ecommerce graph today
The UTM graph data in Website > Dasboard > Analytics is not getting
properly filtered on the basis of values of date_from and date_to on
website_sale dashboard.

The field confirmation date which is of type datetime while date_from
and date_to are of date string in local browser timezone.

Hence date_domain is not perfect as shown below on local date 29th april
2019, we would send:

('confirmation_date', '>=', '2019-04-22'),
('confirmation_date', '<=', '2019-04-29')

But in reality we could want a from midnight of week before the current
UTC day, and to current UTC now or 23:59:59 of current UTC day.

This way, the data sent back matches more what is expected, instead of
the preceding domain, we would then have the following:

- if UTC now corresponding to local now is on '2019-04-29'

 ('confirmation_date', '>=', '2019-04-22 00:00:00'),
 ('confirmation_date', '<=', '2019-04-29 23:59:59')

- if UTC now corresponding to local now is on '2019-04-28':

 ('confirmation_date', '>=', '2019-04-21 00:00:00'),
 ('confirmation_date', '<=', '2019-04-28 23:59:59')

- if UTC now corresponding to local now is on '2019-04-30':

 ('confirmation_date', '>=', '2019-04-23 00:00:00'),
 ('confirmation_date', '<=', '2019-04-30 23:59:59')

And each one will be displayed as days 22 up to 29 in line chart (with
local today 29 being the last day of the chart and contening orders of
the current UTC day).

With these change in the UTM pie chart:

- a local date that is before a UTC date => we see the sales from up to
  today UTC instead of from up to before yesterday UTC

- a local date that is the same as an UTC date => we see the sale from
  up to today UTC instead of yesterday UTC

And in the line chart (that already had half of the fix in f6fc7c2319):

- a local date that is before a UTC date => we see the sales from up to
  today UTC instead of from up to yesterday UTC

- a local date that is after a UTC date => we see the sales of current
  UTC day + range of days (eg. for a week 7) instead of current UTC day +
  range of days minus 1 (eg. for a week 6).

opw-1971539
closes #33041

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>


Co-authored-by: Nicolas Lempereur <nle-odoo@users.noreply.github.com>
2019-05-03 11:29:34 +00:00
2015-09-08 15:45:09 +02:00
2018-10-09 13:44:38 +00:00
…
2015-09-08 17:58:38 +02:00
2019-03-13 15:10:02 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%