[FIX] l10n_cn: fix def _count_attachments

X-original-commit: b1a3afabf2c9b1e7f5645ca5f4ca4beed4b2c661
Part-of: odoo/odoo#109304
This commit is contained in:
zyzcss
2023-01-06 14:31:49 +01:00
committed by GitHub
parent 1e372dac79
commit cf9233cf2a
+2 -2
View File
@@ -37,7 +37,7 @@ class AccountMove(models.Model):
statement_ids = self.line_ids.mapped('statement_id')
payment_ids = self.line_ids.mapped('payment_id')
if statement_ids:
domains.append([('res_model', '=', 'account.bank.statement'), ('res_id', 'in', statement_ids)])
domains.append([('res_model', '=', 'account.bank.statement'), ('res_id', 'in', statement_ids.ids)])
if payment_ids:
domains.append([('res_model', '=', 'account.payment'), ('res_id', 'in', payment_ids)])
domains.append([('res_model', '=', 'account.payment'), ('res_id', 'in', payment_ids.ids)])
return self.env['ir.attachment'].search_count(expression.OR(domains))