Skip to content
Snippets Groups Projects
Commit 16579b13 authored by Mahendra Barad's avatar Mahendra Barad
Browse files

[FIX] sale_management: user correct field on sale digest KPI.

In commit: https://github.com/odoo/odoo/commit/0cc30bf08382128a77455a51d831ef45ccdfdb48#diff-fb13a23a71b7b833233add03eb5f10f7R20


confirmation_date was replaced by the date_order on sale order.

At the same time in compute method confirmation_date was too replace
but on sale.report  no such field exist so replace the date_order by
date which coming from date_order of sale order.

Task-1883428

closes odoo/odoo#39849

Closes: #39849
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent b8b63d38
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,8 @@ class Digest(models.Model):
for record in self:
start, end, company = record._get_kpi_compute_parameters()
all_channels_sales = self.env['sale.report'].read_group([
('date_order', '>=', start),
('date_order', '<', end),
('date', '>=', start),
('date', '<', end),
('state', 'not in', ['draft', 'cancel', 'sent']),
('company_id', '=', company.id)], ['price_total'], ['price_total'])
record.kpi_all_sale_total_value = sum([channel_sale['price_total'] for channel_sale in all_channels_sales])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment