[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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user