Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: eCommerce

Entity: digest.digest

Compute Method: _compute_kpi_website_sale_total_value

View 19.0 View 20.0
Inputs Method Outputs
- if not self.env.user.has_group('sales_team.group_sale_salesman_all_leads'):
-             raise AccessError(_("Do not have access, skip this data for user's digest email"))
- self._calculate_company_based_kpi(
-             'sale.report',
-             'kpi_website_sale_total_value',
-             date_field='date',
-             additional_domain=[('state', 'not in', ['draft', 'cancel', 'sent']), ('website_id', '!=', False)],
-             sum_field='price_subtotal',
+ self._raise_if_not_member_of("sales_team.group_sale_salesman_all_leads")
+ self._calculate_kpi(
+             "sale.report",
+             "kpi_website_sale_total_value",
+             date_field="date",
+             additional_domain=[
+                 ("state", "not in", ["draft", "cancel", "sent"]),
+                 ("website_id", "!=", False),
+             ],
+             sum_field="price_subtotal",
        )

Back to entity