Skip to content
Snippets Groups Projects
Commit b1a3afab authored by zyzcss's avatar zyzcss Committed by GitHub
Browse files

[FIX] l10n_cn: fix def _count_attachments

Part-of: odoo/odoo#109274
parent 8aa4732c
No related branches found
No related tags found
No related merge requests found
......@@ -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))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment