Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odoo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
odoo
Commits
e9df4002
Commit
e9df4002
authored
Jun 30, 2024
by
Odoo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implémentation _compute_lacagette_working_state pour garder statuts spéciaux cohérents
parent
3e45256b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
res_partner.py
lacagette_addons/lacagette_membership/models/res_partner.py
+13
-1
No files found.
lacagette_addons/lacagette_membership/models/res_partner.py
View file @
e9df4002
...
...
@@ -44,10 +44,22 @@ class ResPartner(models.Model):
"Number of shift done with both of the associate"
,
default
=
0
)
def
_compute_lacagette_working_state
(
self
):
for
partner
in
self
:
if
partner
.
is_associated_people
is
True
:
partner
.
working_state
=
partner
.
parent_id
.
cooperative_state
else
:
if
partner
.
cooperative_state
in
[
'gone'
,
'associated'
]:
partner
.
working_state
=
partner
.
cooperative_state
else
:
potential_associated_record
=
self
.
env
[
'res.partner'
]
.
search
([(
'email'
,
'='
,
self
.
email
),
(
'is_associated_people'
,
'='
,
True
)])
if
potential_associated_record
:
partner
.
working_state
=
'associated'
@api.multi
def
recompute_member_states
(
self
):
for
record
in
self
:
record
.
_compute_working_state
()
record
.
_compute_
lacagette_
working_state
()
record
.
_compute_cooperative_state
()
@api.model
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment