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
5bf8985b
Commit
5bf8985b
authored
Nov 16, 2021
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 'display_standard_points' key error
parent
7143b801
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
res_partner.py
lacagette_addons/lacagette_membership/models/res_partner.py
+5
-1
No files found.
lacagette_addons/lacagette_membership/models/res_partner.py
View file @
5bf8985b
...
...
@@ -39,7 +39,10 @@ class ResPartner(models.Model):
if
new_values
[
'cooperative_state'
]
==
"unsubscribed"
:
new_values
[
'makeups_to_do'
]
=
2
if
absence_status
==
'absent'
else
1
new_values
[
'final_'
+
p
.
shift_type
+
'_point'
]
=
-
2
new_values
[
'display_'
+
p
.
shift_type
+
'_points'
]
=
-
2
if
p
.
shift_type
==
'standard'
:
new_values
[
'display_std_points'
]
=
-
2
else
:
new_values
[
'display_ftop_points'
]
=
-
2
"""
unlink model: "shift.template.registration"
to delete all future shifts linked to this coop.
...
...
@@ -47,6 +50,7 @@ class ResPartner(models.Model):
for
streg
in
self
.
env
[
'shift.template.registration'
]
\
.
search
([(
'partner_id'
,
'='
,
p
.
id
)]):
streg
.
unlink
()
mail_template
=
self
.
env
.
ref
(
'coop_membership.unsubscribe_email'
)
if
mail_template
:
mail_template
.
send_mail
(
p
.
id
)
...
...
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