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
f0bb71ec
Commit
f0bb71ec
authored
Apr 15, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix server & interface errors
parent
01718d62
Pipeline
#2123
passed with stage
in 1 minute 39 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
7 deletions
+37
-7
admin.py
members/admin.py
+3
-1
manage_attached.css
members/static/css/admin/manage_attached.css
+17
-3
manage_attached.js
members/static/js/admin/manage_attached.js
+11
-1
manage_attached_delete_pair.html
templates/members/admin/manage_attached_delete_pair.html
+6
-2
No files found.
members/admin.py
View file @
f0bb71ec
...
...
@@ -556,7 +556,9 @@ def get_member_info(request, id):
member
=
member
[
0
]
parent
=
None
if
member
[
'parent_id'
]:
parent
=
api
.
search_read
(
'res.partner'
,
[[
'id'
,
'='
,
int
(
member
[
'parent_id'
][
0
])]],
[
'barcode_base'
,
'email'
])[
0
]
res_parent
=
api
.
search_read
(
'res.partner'
,
[[
'id'
,
'='
,
int
(
member
[
'parent_id'
][
0
])]],
[
'barcode_base'
,
'email'
])
if
res_parent
:
parent
=
res_parent
[
0
]
member
[
'parent_barcode_base'
]
=
parent
[
'barcode_base'
]
member
[
'parent_email'
]
=
parent
[
'email'
]
res
[
'member'
]
=
member
...
...
members/static/css/admin/manage_attached.css
View file @
f0bb71ec
...
...
@@ -118,5 +118,19 @@
}
/* Modale */
.attached-members
.member
div
{
width
:
50px
;
display
:
inline-block
;}
.attached-members
.member
div
.name
{
width
:
80%
;}
\ No newline at end of file
.attached-members
.member
div
{
width
:
50px
;
display
:
inline-block
;
margin
:
1rem
0
;}
.attached-members
.member
div
.name
{
width
:
100%
;
position
:
relative
;}
.attached-members
.member
div
.select_after_unattached_state
{
position
:
absolute
;
right
:
5rem
;
top
:
0
;
bottom
:
0
;
margin
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.attached-members
.member
.after_unattached_state
{
cursor
:
pointer
;
}
\ No newline at end of file
members/static/js/admin/manage_attached.js
View file @
f0bb71ec
...
...
@@ -239,9 +239,15 @@ function confirmDeletion(childId) {
var
modalContent
=
$
(
'#confirmModal'
);
modalContent
.
find
(
"#parentName"
).
text
(
parentName
);
modalContent
.
find
(
"#parentEmail"
).
text
(
parentEmail
)
modalContent
.
find
(
"#childName"
).
text
(
childName
);
if
(
parentEmail
!=
false
)
{
modalContent
.
find
(
"#parentEmail"
).
text
(
parentEmail
)
}
if
(
childEmail
!=
false
)
{
modalContent
.
find
(
"#childEmail"
).
text
(
childEmail
)
}
modalContent
=
modalContent
.
html
();
openModal
(
modalContent
,
()
=>
{
if
(
is_time_to
(
'delete_pair'
))
{
...
...
@@ -443,7 +449,11 @@ $(document).ready(function() {
traditional
:
true
,
contentType
:
"application/json; charset=utf-8"
,
success
:
function
(
data
)
{
if
(
data
.
member
.
parent_barcode_base
!==
undefined
)
{
parentName
=
data
.
member
.
parent_barcode_base
+
' - '
+
data
.
member
.
parent_name
;
}
else
{
parentName
=
data
.
member
.
parent_name
;
}
parentEmail
=
data
.
member
.
parent_email
;
childName
=
data
.
member
.
barcode_base
+
' - '
+
data
.
member
.
name
;
childEmail
=
data
.
member
.
email
;
...
...
templates/members/admin/manage_attached_delete_pair.html
View file @
f0bb71ec
...
...
@@ -26,16 +26,20 @@
<div
class=
"name"
>
<strong><span
id=
"parentName"
></span></strong>
(titulaire)
<br
/>
<i><span
id=
"parentEmail"
></span></i>
<div
class=
"select_after_unattached_state"
>
<input
type=
"checkbox"
name=
"parent_gone"
class=
"after_unattached_state"
/>
</div>
</div>
<div><input
type=
"checkbox"
name=
"parent_gone"
class=
"after_unattached_state"
/></div>
</div>
avec
<div
class=
"member"
>
<div
class=
"name"
>
<strong><span
id=
"childName"
></span></strong><br
/>
<i><span
id=
"childEmail"
></span></i>
<div
class=
"select_after_unattached_state"
>
<input
type=
"checkbox"
name=
"child_gone"
class=
"after_unattached_state"
/>
</div>
</div>
<div><input
type=
"checkbox"
name=
"child_gone"
class=
"after_unattached_state"
/></div>
</div>
</div>
</div>
...
...
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