[FIX] sale_timesheet_purchase: move_id.type has been renamed as move_id.move_type

The 'type' field in the 'account.move' model has been recently renamed to 'move_type'.

This bug fix consists in using the new field name in the search call.

closes odoo/odoo#45935

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Rémy Baranx (bar)
2020-02-21 10:40:34 +00:00
parent 743d551331
commit 51b70b6fc4
@@ -22,7 +22,9 @@ class Project(models.Model):
context={'create': False, 'edit': False, 'delete': False}
)
})
account_invoice_lines = self.env['account.move.line'].search([('analytic_account_id', 'in', accounts), ('move_id.type', 'in', ['in_invoice', 'in_refund'])])
account_invoice_lines = self.env['account.move.line'].search(
[('analytic_account_id', 'in', accounts),
('move_id.move_type', 'in', ['in_invoice', 'in_refund'])])
account_invoices = account_invoice_lines.mapped('move_id')
if account_invoices:
stat_buttons.append({