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
0
Merge Requests
0
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
Alexis AOUN
third-party
Commits
9bef85c5
Commit
9bef85c5
authored
Jun 24, 2021
by
Alexis Aoun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rajout detection poids pour barcode price_to_weight
parent
b7186bd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
reception_produits.js
reception/static/js/reception_produits.js
+6
-0
No files found.
reception/static/js/reception_produits.js
View file @
9bef85c5
...
@@ -69,6 +69,7 @@ function select_product_from_bc(barcode) {
...
@@ -69,6 +69,7 @@ function select_product_from_bc(barcode) {
if
(
editing_product
==
null
)
{
if
(
editing_product
==
null
)
{
let
p
=
barcodes
.
get_corresponding_odoo_product
(
barcode
);
let
p
=
barcodes
.
get_corresponding_odoo_product
(
barcode
);
var
qtyIsWeight
=
false
;
var
qtyIsWeight
=
false
;
var
qtyIsPriceToWeight
=
false
;
console
.
log
(
p
);
console
.
log
(
p
);
...
@@ -83,6 +84,8 @@ function select_product_from_bc(barcode) {
...
@@ -83,6 +84,8 @@ function select_product_from_bc(barcode) {
if
(
p
.
rule
==
'weight'
)
if
(
p
.
rule
==
'weight'
)
qtyIsWeight
=
true
;
qtyIsWeight
=
true
;
else
if
(
p
.
rule
==
'price_to_weight'
)
qtyIsPriceToWeight
=
true
;
var
found
=
{
data
:
null
,
place
:
null
};
var
found
=
{
data
:
null
,
place
:
null
};
...
@@ -105,6 +108,9 @@ function select_product_from_bc(barcode) {
...
@@ -105,6 +108,9 @@ function select_product_from_bc(barcode) {
if
(
qtyIsWeight
)
if
(
qtyIsWeight
)
found
.
data
.
product_qty
=
p
.
qty
;
found
.
data
.
product_qty
=
p
.
qty
;
else
if
(
qtyIsPriceToWeight
)
found
.
data
.
product_qty
=
p
.
qty
;
if
(
found
.
data
!==
null
)
{
if
(
found
.
data
!==
null
)
{
setLineEdition
(
found
.
data
);
setLineEdition
(
found
.
data
);
if
(
found
.
place
===
'to_process'
)
{
if
(
found
.
place
===
'to_process'
)
{
...
...
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