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
c51fa922
Commit
c51fa922
authored
Jul 10, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error found during tests (should not occur if odoo database is not rewind)
parent
ad361176
Pipeline
#1193
passed with stage
in 1 minute 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
21 deletions
+28
-21
reception_index.js
reception/static/js/reception_index.js
+28
-21
No files found.
reception/static/js/reception_index.js
View file @
c51fa922
...
...
@@ -285,7 +285,9 @@ function group_action() {
* Remove the grouped orders from the order table to prevent grouping in multiple groups.
*/
function
display_grouped_orders
()
{
if
(
table_orders
!==
null
)
{
var
display_something
=
true
;
$
(
'#groups_items'
).
empty
();
let
groups_display_content
=
"<ul>"
;
...
...
@@ -307,34 +309,39 @@ function display_grouped_orders() {
}
}
}
if
(
group_orders
.
length
>
0
)
{
// Display group
document
.
getElementById
(
"container_groups"
).
hidden
=
false
;
let
group_row
=
`<li class="group_line"> Commandes de `
;
for
(
let
i
in
group_orders
)
{
if
(
i
==
group_orders
.
length
-
1
)
{
// last element of list
group_row
+=
"<b>"
+
group_orders
[
i
].
partner
+
"</b> du "
+
group_orders
[
i
].
date_order
+
" : "
;
}
else
{
group_row
+=
"<b>"
+
group_orders
[
i
].
partner
+
"</b> du "
+
group_orders
[
i
].
date_order
+
", "
;
}
}
// Display group
document
.
getElementById
(
"container_groups"
).
hidden
=
false
;
let
group_row
=
`<li class="group_line"> Commandes de `
;
for
(
let
i
in
group_orders
)
{
if
(
i
==
group_orders
.
length
-
1
)
{
// last element of list
group_row
+=
"<b>"
+
group_orders
[
i
].
partner
+
"</b> du "
+
group_orders
[
i
].
date_order
+
" : "
;
if
(
group_orders
[
0
].
reception_status
==
'False'
)
{
group_row
+=
"<button class='btn--primary' onClick='group_goto("
+
group_index
+
")'>Compter les produits</button>"
;
}
else
{
group_row
+=
"<b>"
+
group_orders
[
i
].
partner
+
"</b> du "
+
group_orders
[
i
].
date_order
+
", "
;
group_row
+=
"<button class='btn--success' onClick='group_goto("
+
group_index
+
")'>Mettre à jour les prix</button>"
;
}
}
if
(
group_orders
[
0
].
reception_status
==
'False'
)
{
group_row
+=
"<button class='btn--primary' onClick='group_goto("
+
group_index
+
")'>Compter les produits</button>"
;
group_row
+=
"</li>"
;
groups_display_content
+=
group_row
;
}
else
{
group_row
+=
"<button class='btn--success' onClick='group_goto("
+
group_index
+
")'>Mettre à jour les prix</button>"
;
display_something
=
false
;
// occured making test form local django and preprod (couchdb, odoo)
}
group_row
+=
"</li>"
;
groups_display_content
+=
group_row
;
}
$
(
'#container_groups'
).
show
();
$
(
'#groups_items'
).
append
(
groups_display_content
);
if
(
display_something
===
true
)
{
$
(
'#container_groups'
).
show
();
$
(
'#groups_items'
).
append
(
groups_display_content
);
}
}
}
...
...
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