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
c0e7c9fc
Commit
c0e7c9fc
authored
Jun 24, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP. REC: prepare for update qty in prices step, clickable qty cell, adaptative qty column header
parent
4159459d
Pipeline
#2275
passed with stage
in 1 minute 23 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
22 deletions
+55
-22
config_lacagette.py
coops_configurations/config_lacagette.py
+1
-0
config.md
outils/config.md
+4
-0
reception_style.css
reception/static/css/reception_style.css
+26
-19
reception_produits.js
reception/static/js/reception_produits.js
+22
-3
views.py
reception/views.py
+1
-0
reception_produits.html
templates/reception/reception_produits.html
+1
-0
No files found.
coops_configurations/config_lacagette.py
View file @
c0e7c9fc
...
@@ -56,6 +56,7 @@ EM_URL = ''
...
@@ -56,6 +56,7 @@ EM_URL = ''
RECEPTION_MERGE_ORDERS_PSWD
=
'jpsrcp'
RECEPTION_MERGE_ORDERS_PSWD
=
'jpsrcp'
RECEPTION_ADD_PRODUCTS_PSWD
=
'jpsrcp'
RECEPTION_ADD_PRODUCTS_PSWD
=
'jpsrcp'
RECEPTION_UPDATE_QTY_PSWD
=
'jpsrcp'
RECEPTION_PB
=
"Ici, vous pouvez signaler toute anomalie lors d'une réception, les produits non commandés, cassés ou pourris.
\
RECEPTION_PB
=
"Ici, vous pouvez signaler toute anomalie lors d'une réception, les produits non commandés, cassés ou pourris.
\
Merci d'indiquer un maximum d'informations, le nom du produit et son code barre."
Merci d'indiquer un maximum d'informations, le nom du produit et son code barre."
DISPLAY_COL_AUTRES
=
False
DISPLAY_COL_AUTRES
=
False
...
...
outils/config.md
View file @
c0e7c9fc
...
@@ -357,6 +357,10 @@
...
@@ -357,6 +357,10 @@
Password to enter to add products to an order during reception
Password to enter to add products to an order during reception
Same principle as previous pswd
Same principle as previous pswd
-
RECEPTION_UPDATE_QTY_PSWD = 'pass2makeApause'
Password to update a product qty during prices step.
-
RECEPTION_PDT_LABELS_BTN_TEXT = 'Lancer l
\'
impression'
-
RECEPTION_PDT_LABELS_BTN_TEXT = 'Lancer l
\'
impression'
-
RECEPTION_PDT_LABELS_FN = 'print_product_labels()'
-
RECEPTION_PDT_LABELS_FN = 'print_product_labels()'
...
...
reception/static/css/reception_style.css
View file @
c0e7c9fc
...
@@ -275,6 +275,32 @@ tr.odd td.row_product_no_qty {
...
@@ -275,6 +275,32 @@ tr.odd td.row_product_no_qty {
background-color
:
#acb3c2
;
background-color
:
#acb3c2
;
}
}
#error_report
{
width
:
100%
;
height
:
200px
;
border
:
2px
solid
#555
;
border-radius
:
10px
;
white-space
:
pre-wrap
;
}
#main_content
{
width
:
100%
;}
.select_product_action
{
max-width
:
5px
;
}
.toProcess_line_edit
,
.toProcess_line_valid
{
min-width
:
11px
;
}
.product_qty_cell
{
cursor
:
pointer
;
}
.product_qty_cell
:hover
{
background-color
:
#e7e9ed
;
}
/* Accordion style */
/* Accordion style */
/* Style the buttons that are used to open and close the accordion panel */
/* Style the buttons that are used to open and close the accordion panel */
...
@@ -322,21 +348,3 @@ hr {
...
@@ -322,21 +348,3 @@ hr {
.panel.active
:after
{
.panel.active
:after
{
margin-bottom
:
30px
;
margin-bottom
:
30px
;
}
}
#error_report
{
width
:
100%
;
height
:
200px
;
border
:
2px
solid
#555
;
border-radius
:
10px
;
white-space
:
pre-wrap
;
}
#main_content
{
width
:
100%
;}
.select_product_action
{
max-width
:
5px
;
}
.toProcess_line_edit
,
.toProcess_line_valid
{
min-width
:
11px
;
}
\ No newline at end of file
reception/static/js/reception_produits.js
View file @
c0e7c9fc
...
@@ -490,6 +490,13 @@ function initLists() {
...
@@ -490,6 +490,13 @@ function initLists() {
});
});
}
}
// Titles for Qty column
const
base_qty_title
=
"Qté"
;
const
qty_title_tooltip
=
`<div class="tooltip tt_twolines">
Qté
<span class="tooltiptext">Qté comptée / Qté commandée</span>
</div>`
;
columns_to_process
=
columns_to_process
.
concat
([
columns_to_process
=
columns_to_process
.
concat
([
{
data
:
"product_id.0"
,
title
:
"id"
,
visible
:
false
},
{
data
:
"product_id.0"
,
title
:
"id"
,
visible
:
false
},
{
data
:
"shelf_sortorder"
,
title
:
"Rayon"
,
className
:
"dt-body-center"
},
{
data
:
"shelf_sortorder"
,
title
:
"Rayon"
,
className
:
"dt-body-center"
},
...
@@ -524,8 +531,8 @@ function initLists() {
...
@@ -524,8 +531,8 @@ function initLists() {
},
},
{
{
data
:
"product_qty"
,
data
:
"product_qty"
,
title
:
"Qté"
,
title
:
(
reception_status
==
"qty_valid"
)
?
qty_title_tooltip
:
base_qty_title
,
className
:
"dt-body-center"
,
className
:
(
reception_status
==
"qty_valid"
)
?
"dt-body-center product_qty_cell"
:
"dt-body-center"
,
render
:
function
(
data
,
type
,
full
)
{
render
:
function
(
data
,
type
,
full
)
{
if
(
reception_status
==
"False"
)
{
if
(
reception_status
==
"False"
)
{
return
data
;
return
data
;
...
@@ -594,7 +601,7 @@ function initLists() {
...
@@ -594,7 +601,7 @@ function initLists() {
{
data
:
"product_uom.1"
,
title
:
"Unité vente"
,
className
:
"dt-body-center"
,
orderable
:
false
},
{
data
:
"product_uom.1"
,
title
:
"Unité vente"
,
className
:
"dt-body-center"
,
orderable
:
false
},
{
{
data
:
"product_qty"
,
data
:
"product_qty"
,
title
:
"Qté"
,
title
:
qty_title_tooltip
,
className
:
"dt-head-center dt-body-center"
,
className
:
"dt-head-center dt-body-center"
,
// visible: (reception_status == "False"),
// visible: (reception_status == "False"),
render
:
function
(
data
,
type
,
full
)
{
render
:
function
(
data
,
type
,
full
)
{
...
@@ -882,6 +889,18 @@ function initLists() {
...
@@ -882,6 +889,18 @@ function initLists() {
clearLineEdition
();
clearLineEdition
();
}
}
});
});
$
(
'#table_to_process tbody'
).
on
(
'click'
,
'.product_qty_cell'
,
function
()
{
let
pswd
=
prompt
(
'Mot de passe requis pour éditer la quantité de ce produit'
);
if
(
pswd
==
update_qty_pswd
)
{
console
.
log
(
'clicked'
);
//
}
else
if
(
pswd
==
null
)
{
return
;
}
else
{
alert
(
'Mauvais mot de passe !'
);
}
});
}
}
// Add a line to to_process
// Add a line to to_process
...
...
reception/views.py
View file @
c0e7c9fc
...
@@ -93,6 +93,7 @@ def produits(request, id):
...
@@ -93,6 +93,7 @@ def produits(request, id):
"ADD_ALL_LEFT_IS_GOOD_QTIES"
:
False
,
"ADD_ALL_LEFT_IS_GOOD_QTIES"
:
False
,
"ADD_ALL_LEFT_IS_GOOD_PRICES"
:
False
,
"ADD_ALL_LEFT_IS_GOOD_PRICES"
:
False
,
'add_products_pswd'
:
getattr
(
settings
,
'RECEPTION_ADD_PRODUCTS_PSWD'
,
'makeastop'
),
'add_products_pswd'
:
getattr
(
settings
,
'RECEPTION_ADD_PRODUCTS_PSWD'
,
'makeastop'
),
'update_qty_pswd'
:
getattr
(
settings
,
'RECEPTION_UPDATE_QTY_PSWD'
,
'makeastop'
)
}
}
fixed_barcode_prefix
=
'0490'
fixed_barcode_prefix
=
'0490'
...
...
templates/reception/reception_produits.html
View file @
c0e7c9fc
...
@@ -234,6 +234,7 @@
...
@@ -234,6 +234,7 @@
var
add_all_left_is_good_qties
=
"{{ADD_ALL_LEFT_IS_GOOD_QTIES}}"
var
add_all_left_is_good_qties
=
"{{ADD_ALL_LEFT_IS_GOOD_QTIES}}"
var
add_all_left_is_good_prices
=
"{{ADD_ALL_LEFT_IS_GOOD_PRICES}}"
var
add_all_left_is_good_prices
=
"{{ADD_ALL_LEFT_IS_GOOD_PRICES}}"
var
add_products_pswd
=
"{{add_products_pswd}}"
var
add_products_pswd
=
"{{add_products_pswd}}"
var
update_qty_pswd
=
"{{update_qty_pswd}}"
</script>
</script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
1651853225"
></script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
1651853225"
></script>
<script
src=
'{% static "js/barcodes.js" %}?v=1651853225'
></script>
<script
src=
'{% static "js/barcodes.js" %}?v=1651853225'
></script>
...
...
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