Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lefilament_release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
lefilament_release
Commits
30f17009
Commit
30f17009
authored
1 month ago
by
Rémi - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] keep version for new module
parent
b05ba1c0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/res_partner.py
+3
-5
3 additions, 5 deletions
models/res_partner.py
with
3 additions
and
5 deletions
models/res_partner.py
+
3
−
5
View file @
30f17009
...
...
@@ -57,14 +57,13 @@ class ResPartner(models.Model):
if
module
.
get
(
"
author_type
"
)
!=
"
odoo
"
:
# Création du module
if
module
.
get
(
"
name
"
)
not
in
existing_modules
.
mapped
(
"
name
"
):
new_module
=
module
new_module
=
module
.
copy
()
new_module
.
pop
(
"
latest_version
"
,
False
)
module_id
=
existing_modules
.
create
(
new_module
)
# Mise à jour des versions
else
:
# ruff: noqa: B023
module_id
=
existing_modules
.
filtered
(
lambda
m
:
m
.
name
==
module
.
get
(
"
name
"
)
lambda
m
:
m
.
name
==
module
.
get
(
"
name
"
)
# noqa: B023
)
module_update
=
ModuleVersion
.
search
(
[
...
...
@@ -97,9 +96,8 @@ class ResPartner(models.Model):
)
)
if
module_uninstalled
:
# ruff: noqa: B023
module_ids
=
partner
.
module_version_ids
.
filtered
(
lambda
m
:
m
.
module_id
.
name
in
module_uninstalled
lambda
m
:
m
.
module_id
.
name
in
module_uninstalled
# noqa: B023
)
module_ids
.
unlink
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment