Skip to content
Snippets Groups Projects
Commit d57d27ec authored by Jorge Pinna Puissant's avatar Jorge Pinna Puissant
Browse files

[FIX] website_sale_digital: search domain for attachment count

Before this commit, the search domain returns no results.

Fine-tuning of 62c9deda

opw-2172563

X-original-commit: f3d178c329eeb4d840c24801247fc5da39df998c
parent ef5cc35b
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,8 @@ class Product(models.Model):
for product in self:
product.attachment_count = self.env['ir.attachment'].search_count([
'|',
('res_model', '=', 'product.template'), ('res_id', '=', product.product_tmpl_id.id), ('product_downloadable', '=', True),
('res_model', '=', 'product.product'), ('res_id', '=', product.id), ('product_downloadable', '=', True)])
'&', '&', ('res_model', '=', 'product.template'), ('res_id', '=', product.product_tmpl_id.id), ('product_downloadable', '=', True),
'&', '&', ('res_model', '=', 'product.product'), ('res_id', '=', product.id), ('product_downloadable', '=', True)])
def action_open_attachments(self):
self.ensure_one()
......
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