diff options
| author | Jorge Pinna Puissant <jpp@odoo.com> | 2020-01-16 13:30:55 +0000 |
|---|---|---|
| committer | Jorge Pinna Puissant <jpp@odoo.com> | 2020-01-16 16:15:07 +0000 |
| commit | dd9f893d678c48bd8efa8f070c9eb268790df7c5 (patch) | |
| tree | 8a047853b37498137a3cdc89520f4a43ca5f7923 /addons | |
| parent | 50cbaef2dd5e31ac8a4f0513725048ae4cf9ff4d (diff) | |
[FIX] website_sale_digital: search domain for attachment count
Before this commit, the search domain returns no results.
Fine-tuning of 62c9dedafda0cbdc618641eaa80c49535ab0b5f6
opw-2172563
X-original-commit: f3d178c329eeb4d840c24801247fc5da39df998c
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/website_sale_digital/models/product.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_sale_digital/models/product.py b/addons/website_sale_digital/models/product.py index 5da47231694..a5512dc9d94 100644 --- a/addons/website_sale_digital/models/product.py +++ b/addons/website_sale_digital/models/product.py @@ -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() |
