Skip to content
Snippets Groups Projects
Commit 116ae47e authored by Josse Colpaert's avatar Josse Colpaert Committed by Benjamin Frantzen (bfr)
Browse files

[FIX] sale_timesheet: add _depends on profitability report


This fixes potential problems with the caches we encountered
on certain runbot tests for l10n_pe_edi

closes odoo/odoo#63337

Related: odoo/enterprise#15297
Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
parent a9a46cf0
Branches
Tags
No related merge requests found
......@@ -36,6 +36,37 @@ class ProfitabilityAnalysis(models.Model):
help="All revenues that are not from timesheets and that are linked to the analytic account of the project.")
margin = fields.Float("Margin", digits=(16, 2), readonly=True, group_operator="sum")
_depends = {
'sale.order.line': [
'order_id',
'invoice_status',
'price_reduce',
'product_id',
'qty_invoiced',
'untaxed_amount_invoiced',
'untaxed_amount_to_invoice',
'currency_id',
'company_id',
'is_downpayment',
'project_id',
'task_id',
'qty_delivered_method',
],
'sale.order': [
'date_order',
'user_id',
'partner_id',
'currency_id',
'analytic_account_id',
'order_line',
'invoice_status',
'amount_untaxed',
'currency_rate',
'company_id',
'project_id',
],
}
def init(self):
tools.drop_view_if_exists(self._cr, self._table)
query = """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment