Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Converter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
Converter
Merge requests
!54
skip-update-process
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
skip-update-process
topic/18.0/skip-update-process
into
branch/18.0
Overview
0
Commits
3
Pipelines
0
Changes
2
Merged
szeka.wong
requested to merge
topic/18.0/skip-update-process
into
branch/18.0
4 months ago
Overview
0
Commits
3
Pipelines
0
Changes
2
Expand
Allow to skip update process.
0
0
Merge request reports
Viewing commit
164d8181
Prev
Next
Show latest version
2 files
+
14
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
164d8181
mypy
· 164d8181
szeka.wong
authored
4 months ago
model.py
+
13
−
11
Options
@@ -35,6 +35,7 @@
NewinstanceType
,
PostHookConverter
,
Skip
,
SkipType
,
build_context
,
)
from
.validate
import
NotInitialized
,
Validation
,
Validator
@@ -131,8 +132,8 @@
message_value
:
Any
,
instance
:
models
.
BaseModel
,
value_present
:
bool
=
True
,
)
->
dict
:
values
=
OrderedDict
()
)
->
dict
|
SkipType
:
values
:
dict
[
str
,
Any
]
=
OrderedDict
()
if
self
.
_type
is
not
None
and
message_value
[
"
__type__
"
]
!=
self
.
_type
:
raise
Exception
(
@@ -142,12 +143,10 @@
)
for
key
in
self
.
_converters
:
value
=
message_value
.
get
(
key
,
None
)
if
message_value
else
None
values
.
update
(
self
.
_converters
[
key
].
message_to_odoo
(
odoo_env
,
phase
,
value
,
instance
,
message_value
and
key
in
message_value
,
)
attribute_vals
=
self
.
_converters
[
key
].
message_to_odoo
(
odoo_env
,
phase
,
value
,
instance
,
message_value
and
key
in
message_value
,
)
@@ -153,6 +152,9 @@
)
if
isinstance
(
attribute_vals
,
SkipType
):
continue
values
.
update
(
attribute_vals
)
if
self
.
merge_with
:
for
conv
in
self
.
merge_with
:
value
=
conv
.
message_to_odoo
(
odoo_env
,
phase
,
message_value
,
instance
,
value_present
)
@@ -154,9 +156,9 @@
if
self
.
merge_with
:
for
conv
in
self
.
merge_with
:
value
=
conv
.
message_to_odoo
(
odoo_env
,
phase
,
message_value
,
instance
,
value_present
)
if
value
is
Skip
:
if
isinstance
(
value
,
Skip
Type
)
:
continue
values
.
update
(
value
)
Loading