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
ed4c4c1a
Commit
ed4c4c1a
authored
Sep 29, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more debugging
parent
a8cc5d42
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
14 deletions
+3
-14
members-space-home.js
members_space/static/js/members-space-home.js
+0
-1
members-space-shifts-exchange.js
members_space/static/js/members-space-shifts-exchange.js
+2
-2
models.py
shifts/models.py
+1
-1
views.py
shifts/views.py
+0
-10
No files found.
members_space/static/js/members-space-home.js
View file @
ed4c4c1a
...
@@ -31,7 +31,6 @@ function request_delay() {
...
@@ -31,7 +31,6 @@ function request_delay() {
idPartner
:
partner_data
.
partner_id
,
idPartner
:
partner_data
.
partner_id
,
start_date
:
delay_start
,
start_date
:
delay_start
,
duration
:
diff_days
,
duration
:
diff_days
,
shift_type
:
(
partner_data
.
in_ftop_team
===
"True"
)
?
"ftop"
:
"standard"
},
},
success
:
function
()
{
success
:
function
()
{
partner_data
.
cooperative_state
=
'delay'
;
partner_data
.
cooperative_state
=
'delay'
;
...
...
members_space/static/js/members-space-shifts-exchange.js
View file @
ed4c4c1a
...
@@ -94,8 +94,8 @@ function add_or_change_shift(new_shift_id) {
...
@@ -94,8 +94,8 @@ function add_or_change_shift(new_shift_id) {
alert
(
`Désolé ! Le service que vous souhaitez échanger démarre dans moins de 24h. `
+
alert
(
`Désolé ! Le service que vous souhaitez échanger démarre dans moins de 24h. `
+
`Il n'est plus possible de l'échanger.`
);
`Il n'est plus possible de l'échanger.`
);
}
else
{
}
else
{
alert
(
`Une erreur est survenue.`
+
alert
(
`Une erreur est survenue.
`
+
`Il est néanmoins possible que la requête ait abouti,`
+
`Il est néanmoins possible que la requête ait abouti,
`
+
`veuillez patienter quelques secondes puis vérifier vos services enregistrés.`
);
`veuillez patienter quelques secondes puis vérifier vos services enregistrés.`
);
}
}
...
...
shifts/models.py
View file @
ed4c4c1a
...
@@ -311,7 +311,7 @@ class CagetteShift(models.Model):
...
@@ -311,7 +311,7 @@ class CagetteShift(models.Model):
makeups_to_do
-=
1
makeups_to_do
-=
1
f
=
{
"makeups_to_do"
:
makeups_to_do
}
f
=
{
"makeups_to_do"
:
makeups_to_do
}
return
self
.
o_api
.
update
(
'res.partner'
,
partner_id
,
f
)
return
self
.
o_api
.
update
(
'res.partner'
,
[
partner_id
]
,
f
)
else
:
else
:
return
"makeups already at 0"
return
"makeups already at 0"
...
...
shifts/views.py
View file @
ed4c4c1a
...
@@ -290,16 +290,6 @@ def request_delay(request):
...
@@ -290,16 +290,6 @@ def request_delay(request):
try
:
try
:
new_id
=
cs
.
create_delay
(
data
,
duration
)
new_id
=
cs
.
create_delay
(
data
,
duration
)
if
(
new_id
):
if
(
new_id
):
try
:
if
(
'shift_type'
in
request
.
POST
):
shift_type
=
request
.
POST
[
'shift_type'
]
# This is a hack to ensure that the coop goes in delay state when a delay is created
cm
=
CagetteMember
(
int
(
request
.
POST
[
'idPartner'
]))
res_addpt
=
cm
.
add_pts
(
shift_type
,
0
,
"[fo] passage en délai"
)
except
Exception
as
e
:
coop_logger
.
error
(
"force_delay_status :
%
s,
%
s"
,
str
(
e
),
str
(
data
))
response
=
{
'result'
:
True
}
response
=
{
'result'
:
True
}
else
:
else
:
coop_logger
.
error
(
"request delay :
%
s,
%
s"
,
str
(
new_id
),
str
(
data
))
coop_logger
.
error
(
"request delay :
%
s,
%
s"
,
str
(
new_id
),
str
(
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