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
e13eb617
Commit
e13eb617
authored
Jun 21, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[REC] ask password to add products
parent
ef12490f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
config_lacagette.py
coops_configurations/config_lacagette.py
+1
-0
config.md
outils/config.md
+5
-0
reception_produits.js
reception/static/js/reception_produits.js
+16
-0
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 @
e13eb617
...
...
@@ -55,6 +55,7 @@ EM_URL = ''
RECEPTION_MERGE_ORDERS_PSWD
=
'jpsrcp'
RECEPTION_ADD_PRODUCTS_PSWD
=
'jpsrcp'
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."
DISPLAY_COL_AUTRES
=
False
...
...
outils/config.md
View file @
e13eb617
...
...
@@ -352,6 +352,11 @@
Password to enter to validate merge orders processing
It has been set only to stop member action, considering the impact of the merge
-
RECEPTION_ADD_PRODUCTS_PSWD = 'pass2makeApause'
Password to enter to add products to an order during reception
Same principle as previous pswd
-
RECEPTION_PDT_LABELS_BTN_TEXT = 'Lancer l
\'
impression'
-
RECEPTION_PDT_LABELS_FN = 'print_product_labels()'
...
...
reception/static/js/reception_produits.js
View file @
e13eb617
...
...
@@ -1750,7 +1750,9 @@ var get_barcodes = async function() {
if
(
barcodes
==
null
)
barcodes
=
await
init_barcodes
();
};
function
add_products_action
()
{
}
/**
* Init the page according to order(s) data (texts, colors, events...)
...
...
@@ -1925,6 +1927,20 @@ function init_dom(partners_display_data) {
}
});
$
(
"#add_products_button"
).
on
(
'click'
,
()
=>
{
let
pswd
=
prompt
(
'Merci de demander à un.e salarié.e le mot de passe pour ajouter des produits à la commande'
);
// Minimum security level
if
(
pswd
==
add_products_pswd
)
{
console
.
log
(
'ok'
);
// TODO
}
else
if
(
pswd
==
null
)
{
return
;
}
else
{
alert
(
'Mauvais mot de passe !'
);
}
});
// Barcode reader
$
(
document
).
pos
();
$
(
document
).
on
(
'scan.pos.barcode'
,
function
(
event
)
{
...
...
reception/views.py
View file @
e13eb617
...
...
@@ -82,6 +82,7 @@ def produits(request, id):
"DISPLAY_AUTRES"
:
getattr
(
settings
,
'DISPLAY_COL_AUTRES'
,
True
),
"ADD_ALL_LEFT_IS_GOOD_QTIES"
:
False
,
"ADD_ALL_LEFT_IS_GOOD_PRICES"
:
False
,
'add_products_pswd'
:
getattr
(
settings
,
'RECEPTION_ADD_PRODUCTS_PSWD'
,
'makeastop'
),
}
fixed_barcode_prefix
=
'0490'
...
...
templates/reception/reception_produits.html
View file @
e13eb617
...
...
@@ -201,6 +201,7 @@
var
display_autres
=
"{{DISPLAY_AUTRES}}"
;
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_products_pswd
=
"{{add_products_pswd}}"
</script>
<script
src=
"{% static "
js
/
all_common
.
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