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
d68b1ab9
Commit
d68b1ab9
authored
Dec 16, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1918 add special state select item to reset to 'unsubscribed'
parent
0ebfe020
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
res_partner.py
lacagette_addons/lacagette_membership/models/res_partner.py
+2
-0
res_partner.xml
lacagette_addons/lacagette_membership/views/res_partner.xml
+1
-0
No files found.
lacagette_addons/lacagette_membership/models/res_partner.py
View file @
d68b1ab9
...
@@ -138,6 +138,8 @@ class ResPartner(models.Model):
...
@@ -138,6 +138,8 @@ class ResPartner(models.Model):
def
set_special_state
(
self
,
cr
,
uid
,
partner
,
context
=
None
):
def
set_special_state
(
self
,
cr
,
uid
,
partner
,
context
=
None
):
if
partner
[
'state'
]
==
'cancel_special'
:
partner
[
'state'
]
=
'unsubscribed'
return
self
.
write
(
cr
,
uid
,
[
partner
[
'id'
]],
{
'cooperative_state'
:
partner
[
'state'
]}
,
context
=
context
)
return
self
.
write
(
cr
,
uid
,
[
partner
[
'id'
]],
{
'cooperative_state'
:
partner
[
'state'
]}
,
context
=
context
)
def
_write_state_change
(
self
,
state
):
def
_write_state_change
(
self
,
state
):
...
...
lacagette_addons/lacagette_membership/views/res_partner.xml
View file @
d68b1ab9
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<option
value=
""
>
--Statuts spéciaux--
</option>
<option
value=
""
>
--Statuts spéciaux--
</option>
<option
value=
"gone"
>
Parti.e
</option>
<option
value=
"gone"
>
Parti.e
</option>
<option
value=
"associated"
>
En binôme
</option>
<option
value=
"associated"
>
En binôme
</option>
<option
value=
"cancel_special"
>
Annulation statut spécial
</option>
</select>
</select>
</field>
</field>
</field>
</field>
...
...
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