Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
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
2
Merge Requests
2
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
third-party
Commits
66e5be54
Commit
66e5be54
authored
Apr 15, 2022
by
Félicie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
c86826f8
Pipeline
#2115
passed with stage
in 1 minute 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
admin.py
members/admin.py
+4
-2
manage_attached.js
members/static/js/admin/manage_attached.js
+7
-4
No files found.
members/admin.py
View file @
66e5be54
...
@@ -556,8 +556,10 @@ def get_member_info(request, id):
...
@@ -556,8 +556,10 @@ def get_member_info(request, id):
member
=
member
[
0
]
member
=
member
[
0
]
parent
=
None
parent
=
None
if
member
[
'parent_id'
]:
if
member
[
'parent_id'
]:
parent
=
api
.
search_read
(
'res.partner'
,
[[
'id'
,
'='
,
int
(
member
[
'parent_id'
][
0
])]],
[
'barcode_base'
])[
0
]
parent_barcode_base
=
api
.
search_read
(
'res.partner'
,
[[
'id'
,
'='
,
int
(
member
[
'parent_id'
][
0
])]],
[
'barcode_base'
])[
0
]
member
[
'parent_barcode_base'
]
=
parent
[
'barcode_base'
]
member
[
'parent_barcode_base'
]
=
parent_barcode_base
[
'barcode_base'
]
parent_email
=
api
.
search_read
(
'res.partner'
,
[[
'id'
,
'='
,
int
(
member
[
'parent_id'
][
0
])]],
[
'email'
])[
0
]
member
[
'parent_email'
]
=
parent_email
[
'email'
]
res
[
'member'
]
=
member
res
[
'member'
]
=
member
response
=
JsonResponse
(
res
)
response
=
JsonResponse
(
res
)
else
:
else
:
...
...
members/static/js/admin/manage_attached.js
View file @
66e5be54
...
@@ -4,6 +4,9 @@ var childId = null;
...
@@ -4,6 +4,9 @@ var childId = null;
var
parentName
=
null
;
var
parentName
=
null
;
var
childName
=
null
;
var
childName
=
null
;
var
parentEmail
=
null
;
var
childEmail
=
null
;
const
possible_cooperative_state
=
{
const
possible_cooperative_state
=
{
suspended
:
"Rattrapage"
,
suspended
:
"Rattrapage"
,
exempted
:
"Exempté.e"
,
exempted
:
"Exempté.e"
,
...
@@ -440,10 +443,10 @@ $(document).ready(function() {
...
@@ -440,10 +443,10 @@ $(document).ready(function() {
traditional
:
true
,
traditional
:
true
,
contentType
:
"application/json; charset=utf-8"
,
contentType
:
"application/json; charset=utf-8"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
parentName
=
data
.
member
.
parent_barcode_base
+
' - '
+
data
.
member
.
parent_name
parentName
=
data
.
member
.
parent_barcode_base
+
' - '
+
data
.
member
.
parent_name
;
parentEmail
=
data
.
member
.
email
parentEmail
=
data
.
member
.
parent_email
;
childName
=
data
.
member
.
barcode_base
+
' - '
+
data
.
member
.
name
childName
=
data
.
member
.
barcode_base
+
' - '
+
data
.
member
.
name
;
childEmail
=
data
.
member
.
email
childEmail
=
data
.
member
.
email
;
confirmDeletion
(
childId
);
confirmDeletion
(
childId
);
},
},
error
:
function
(
data
)
{
error
:
function
(
data
)
{
...
...
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