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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
2 deletions
-
base_exception/__manifest__.py
-
base_exception/models/base_exception.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 |
|
|
|
|
|
@ -185,7 +185,10 @@ class BaseException(models.AbstractModel): |
|
|
|
continue |
|
|
|
exception_ids = obj._detect_exceptions( |
|
|
|
model_exceptions, sub_exceptions) |
|
|
|
obj.exception_ids = [(6, 0, exception_ids)] |
|
|
|
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 |
|
|
|
|
|
|
|