Skip to content
Snippets Groups Projects
Commit 2cab75b4 authored by Victor Feyens's avatar Victor Feyens
Browse files

[FIX] website_slides: default values for all compute fields.


closes odoo/odoo#40054

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 417cee7f
Branches
Tags
No related merge requests found
......@@ -265,7 +265,7 @@ class Slide(models.Model):
# Do not use dict.fromkeys(self.ids, dict()) otherwise it will use the same dictionnary for all keys.
# Therefore, when updating the dict of one key, it updates the dict of all keys.
keys = ['nbr_%s' % slide_type for slide_type in self.env['slide.slide']._fields['slide_type'].get_values(self.env)]
default_vals = dict((key, 0) for key in keys)
default_vals = dict((key, 0) for key in keys + ['total_slides'])
res = self.env['slide.slide'].read_group(
[('is_published', '=', True), ('category_id', 'in', self.ids), ('is_category', '=', False)],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment