diff options
| author | Julien Mougenot <jum@odoo.com> | 2020-04-09 07:42:20 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-06-12 13:34:04 +0000 |
| commit | f5f0ca843d98bcbaf0fd8ad63a31a3cacf390168 (patch) | |
| tree | 32f44cf674e904c957559583cd9dbf69e5f971d7 /addons/web/models/models.py | |
| parent | 84cc6fab9e9c31adc826846f405449a060800b8b (diff) | |
[IMP] *: enable_counters with false as default
In the search panel, the attribute disable_counters with default False
has been changed to enable_counters with default False.
Diffstat (limited to 'addons/web/models/models.py')
| -rw-r--r-- | addons/web/models/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/models/models.py b/addons/web/models/models.py index 348fecb8cb1..714e7e30c63 100644 --- a/addons/web/models/models.py +++ b/addons/web/models/models.py @@ -314,7 +314,7 @@ class Base(models.AbstractModel): the values are functions used to process the field names values. They must accept the single parameter record (see below) - :param disable_counters: whether to count records by value. This is done in + :param enable_counters: whether to count records by value. This is done in search_panel_local_counters :param filter_domain: domain generated by filters (this parameter is used in search_panel_local_counters) @@ -329,7 +329,7 @@ class Base(models.AbstractModel): field = self._fields[field_name] local_counters = {} - if field.type != 'many2many' and not kwargs.get('disable_counters'): + if field.type != 'many2many' and kwargs.get('enable_counters'): local_counters = self.search_panel_local_counters(field_name, **kwargs) if field.type in ['many2many', 'many2one']: @@ -375,7 +375,7 @@ class Base(models.AbstractModel): (this parameter is used in _search_panel_range) :param comodel_domain: domain of field values (if relational) (this parameter is used in _search_panel_range) - :param disable_counters: whether to count records by value + :param enable_counters: whether to count records by value :param search_domain: base domain of search (this parameter is used in _search_panel_range) :return: { @@ -428,7 +428,7 @@ class Base(models.AbstractModel): :param category_domain: domain generated by categories :param comodel_domain: domain of field values (if relational) (this parameter is used in _search_panel_range) - :param disable_counters: whether to count records by value + :param enable_counters: whether to count records by value :param filter_domain: domain generated by filters :param group_by: extra field to read on comodel, to group comodel records :param group_domain: dict, one domain for each activated group @@ -480,7 +480,7 @@ class Base(models.AbstractModel): values_range = self._search_panel_range(field_name, comodel_field_names=field_names, **kwargs) - if field.type == 'many2many' and not kwargs.get('disable_counters'): + if field.type == 'many2many' and kwargs.get('enable_counters'): # fetch the counts model_domain = AND([ kwargs.get('search_domain', []), |
