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
9d0aaeff
Commit
9d0aaeff
authored
May 03, 2022
by
Félicie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_cooperatic' into 2821-inventory-optimization
parents
4716ad2b
793d102f
Pipeline
#2166
passed with stage
in 1 minute 33 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
9 deletions
+19
-9
members-space-faq.js
members_space/static/js/members-space-faq.js
+1
-2
models.py
products/models.py
+2
-0
barcodes.js
products/static/js/barcodes.js
+8
-1
shelfs_admin.js
shelfs/static/js/shelfs_admin.js
+3
-2
faq.html
templates/members_space/faq.html
+4
-4
admin.html
templates/shelfs/admin.html
+1
-0
No files found.
members_space/static/js/members-space-faq.js
View file @
9d0aaeff
...
...
@@ -15,8 +15,7 @@ function init_faq() {
$
(
"#coop_unsubscribe_form_link_btn"
).
prop
(
"href"
,
coop_unsubscribe_form_link
);
$
(
"#helper_subscribe_form_link_btn"
).
prop
(
"href"
,
helper_subscribe_form_link
);
$
(
"#helper_unsubscribe_form_link_btn"
).
prop
(
"href"
,
helper_unsubscribe_form_link
);
$
(
"#request_form_link_btn2"
).
prop
(
"href"
,
request_form_link
);
$
(
"#request_form_link_btn"
).
prop
(
"href"
,
request_form_link
);
$
(
".ask_bdm_form_link"
).
prop
(
"href"
,
request_form_link
);
display_messages_for_attached_people
();
}
...
...
products/models.py
View file @
9d0aaeff
...
...
@@ -520,6 +520,8 @@ class CagetteProducts(models.Model):
rules
=
OdooAPI
()
.
search_read
(
'barcode.rule'
,
c
,
[
'pattern'
,
'type'
,
'alias'
],
order
=
"sequence ASC"
)
# As rules are ordered by sequence, let's find where to stop (.* pattern)
stop_idx
=
len
(
rules
)
-
1
# .* (catchall) rules, if exists, may be not the last rule
# let's find it and set stop_idx consequently
i
=
0
for
r
in
rules
:
if
r
[
'pattern'
]
==
".*"
:
...
...
products/static/js/barcodes.js
View file @
9d0aaeff
...
...
@@ -112,7 +112,14 @@ IFCBarcodes = {
// let's seek "normalized" bc in codes array or alias map
for
(
alias
in
this
.
aliases
)
{
if
(
bc
==
alias
)
{
/*
bc.indexOf(alias) === 0
could be enough,
but is used to keep in mind .* caracters
can be used in rules (have been cleaned before beeing here)
*/
if
(
bc
==
alias
||
bc
.
indexOf
(
alias
)
===
0
)
{
is_alias
=
true
;
for
(
barcode
in
this
.
codes
)
{
if
(
barcode
==
this
.
aliases
[
alias
])
{
...
...
shelfs/static/js/shelfs_admin.js
View file @
9d0aaeff
...
...
@@ -368,9 +368,9 @@ var addProductToList = async function(barcode) {
//It could also be a wrong reading one
odoo_product
=
barcodes
.
get_corresponding_odoo_product
(
barcode
);
if
(
odoo_product
)
{
if
(
is_product_in_shelf_adding_queue_list
(
odoo_product
.
data
[
barcodes
.
keys
.
id
]))
{
console
.
log
(
"Already added product
"
);
alert
(
"Produit déjà présent dans la liste.
"
);
}
else
{
add_to_shelf_product_ids
.
push
(
odoo_product
.
data
[
4
]);
if
(
odoo_product
===
null
)
{
...
...
@@ -393,6 +393,7 @@ var addProductToList = async function(barcode) {
.
html
(
add_pdts_btn_text
);
}
}
}
};
var
addProducts
=
async
function
()
{
...
...
templates/members_space/faq.html
View file @
9d0aaeff
...
...
@@ -157,8 +157,8 @@
href=
"javascript:void(0);"
target=
"_blank"
type=
"button"
class=
"btn--primary faq_link_button"
id=
"request_form_link_btn
2
"
class=
"btn--primary faq_link_button
ask_bdm_form_link
"
id=
"request_form_link_btn
3
"
>
Oubli validation service
</a>
...
...
@@ -308,7 +308,7 @@
href=
"javascript:void(0);"
target=
"_blank"
type=
"button"
class=
"btn--primary faq_link_button"
class=
"btn--primary faq_link_button
ask_bdm_form_link
"
id=
"request_form_link_btn2"
>
Faire une demande au BDM
...
...
@@ -505,7 +505,7 @@
href=
"javascript:void(0);"
target=
"_blank"
type=
"button"
class=
"btn--primary faq_link_button"
class=
"btn--primary faq_link_button
ask_bdm_form_link
"
id=
"request_form_link_btn"
>
Faire une demande au BDM
...
...
templates/shelfs/admin.html
View file @
9d0aaeff
...
...
@@ -62,6 +62,7 @@
<th>
Code-barre lu
</th>
<th>
Code-barre Odoo
</th>
<th>
Article
</th>
<th>
Prix
</th>
<th>
Action
</th>
</tr>
</thead>
...
...
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