Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cgscop_adhesion_instance
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
Confédération Générale des SCOP
cgscop_adhesion_instance
Commits
06b4ab96
Commit
06b4ab96
authored
1 year ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[update] remove lm_adhesion_id
parent
1295e284
No related branches found
No related tags found
1 merge request
!1
[add] merge 14.0 new process adh
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/scop_instance.py
+1
-0
1 addition, 0 deletions
models/scop_instance.py
models/scop_instance_partner.py
+5
-7
5 additions, 7 deletions
models/scop_instance_partner.py
with
6 additions
and
7 deletions
models/scop_instance.py
+
1
−
0
View file @
06b4ab96
...
...
@@ -81,6 +81,7 @@ class ScopInstance(models.Model):
# We use LM instead of res_partner to get more info ...
# ... fields of res_partner are on LM (delegate = true)
lm_ids
=
list
()
# TODO: remove LM
for
partner
in
partners
:
lm_partner
=
partner
.
get_lm_adhesion
()
lm_ids
.
append
(
lm_partner
.
id
)
...
...
This diff is collapsed.
Click to expand it.
models/scop_instance_partner.py
+
5
−
7
View file @
06b4ab96
...
...
@@ -85,13 +85,11 @@ class ScopInstancePartner(models.Model):
def
_compute_amount_adhesion
(
self
):
for
r
in
self
:
if
r
.
state
==
"
positive
"
:
lm
=
(
r
.
partner_id
.
lm_adhesion_id
if
r
.
partner_id
.
lm_adhesion_id
else
r
.
partner_id
.
get_lm_adhesion
(
r
.
instance_id
.
date
.
year
)
)
effectif
=
lm
.
eff_tt
r
.
amount_adhesion
=
r
.
partner_id
.
get_theorical_amount_adhesion
(
effectif
)
staff_line
=
r
.
partner_id
.
staff_ids
.
filtered
(
lambda
s
:
s
.
type_entry
==
"
membership
"
).
sorted
(
key
=
"
effective_date
"
,
reverse
=
True
)
staff_number
=
staff_line
[
0
].
staff_count
if
staff_line
else
0
r
.
amount_adhesion
=
r
.
partner_id
.
get_theorical_amount_adhesion
(
staff_number
)
else
:
r
.
amount_adhesion
=
0
...
...
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