File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
- from odoo import api , models
2
-
3
1
from odoo .addons .base .models .ir_model import (
4
2
IrModelSelection ,
5
3
)
6
4
7
5
6
+ _original_method = IrModelSelection ._process_ondelete
7
+
8
8
def _process_ondelete (self ):
9
9
"""Don't break on missing models when deleting their selection fields"""
10
10
to_process = self .browse ([])
@@ -14,10 +14,9 @@ def _process_ondelete(self):
14
14
to_process += selection
15
15
except KeyError :
16
16
continue
17
- return IrModelSelection . _process_ondelete . _original_method (to_process )
17
+ return _original_method (to_process )
18
18
19
19
20
- _process_ondelete ._original_method = IrModelSelection ._process_ondelete
21
20
IrModelSelection ._process_ondelete = _process_ondelete
22
21
23
22
Original file line number Diff line number Diff line change 1
- from odoo import api , models
2
-
3
1
from odoo .addons .base .models .ir_model import (
4
2
IrModelSelection ,
5
3
)
6
4
7
5
6
+ _original_method = IrModelSelection ._process_ondelete
7
+
8
+
8
9
def _process_ondelete (self ):
9
10
"""Don't break on missing models when deleting their selection fields"""
10
11
to_process = self .browse ([])
@@ -14,10 +15,9 @@ def _process_ondelete(self):
14
15
to_process += selection
15
16
except KeyError :
16
17
continue
17
- return IrModelSelection . _process_ondelete . _original_method (to_process )
18
+ return _original_method (to_process )
18
19
19
20
20
- _process_ondelete ._original_method = IrModelSelection ._process_ondelete
21
21
IrModelSelection ._process_ondelete = _process_ondelete
22
22
23
23
You can’t perform that action at this time.
0 commit comments