Browse Source

Merge pull request #1572 from etobella/11.0-base_exception_minimize_write

[IMP] base_exception: Only write if a change is necessary
pull/1345/merge
Jordi Ballester Alomar 6 years ago
committed by GitHub
parent
commit
afe2dab714
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      base_exception/__manifest__.py
  2. 3
      base_exception/models/base_exception.py

2
base_exception/__manifest__.py

@ -5,7 +5,7 @@
{
'name': 'Exception Rule',
'version': '11.0.1.1.0',
'version': '11.0.1.1.1',
'category': 'Generic Modules',
'summary': """
This module provide an abstract model to manage customizable

3
base_exception/models/base_exception.py

@ -185,6 +185,9 @@ class BaseException(models.AbstractModel):
continue
exception_ids = obj._detect_exceptions(
model_exceptions, sub_exceptions)
if set(obj.exception_ids.ids).symmetric_difference(
set(exception_ids)
):
obj.exception_ids = [(6, 0, exception_ids)]
all_exception_ids += exception_ids
return all_exception_ids

Loading…
Cancel
Save