Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
V
vracoop_pos_mayam_api
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Le Filament
Vracoop
vracoop_pos_mayam_api
Validations
cd9d2f46
Valider
cd9d2f46
rédigé
30 août 2021
par
Juliana
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[FIX] Bug on pos order line cretate to send mayam POS
parent
b54f7210
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
__manifest__.py
+1
-1
1 ajout, 1 suppression
__manifest__.py
models/__init__.py
+1
-1
1 ajout, 1 suppression
models/__init__.py
models/pos_order_line.py
+45
-39
45 ajouts, 39 suppressions
models/pos_order_line.py
avec
47 ajouts
et
41 suppressions
__manifest__.py
+
1
−
1
Voir le fichier @
cd9d2f46
{
{
"
name
"
:
"
VRACOOP - POS API Mayam
"
,
"
name
"
:
"
VRACOOP - POS API Mayam
"
,
"
summary
"
:
"
POS API Mayam
"
,
"
summary
"
:
"
POS API Mayam
"
,
"
version
"
:
"
12.0.1.
0
.1
"
,
"
version
"
:
"
12.0.1.
1
.1
"
,
"
development_status
"
:
"
Beta
"
,
"
development_status
"
:
"
Beta
"
,
"
author
"
:
"
Le Filament
"
,
"
author
"
:
"
Le Filament
"
,
"
maintainers
"
:
[
"
remi-filament
"
],
"
maintainers
"
:
[
"
remi-filament
"
],
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
models/__init__.py
+
1
−
1
Voir le fichier @
cd9d2f46
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Part of Odoo. See LICENSE file for full copyright and licensing details.
#
from . import pos_order_line
from
.
import
pos_order_line
from
.
import
pos_transaction
from
.
import
pos_transaction
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
models/pos_order_line.py
+
45
−
39
Voir le fichier @
cd9d2f46
...
@@ -11,7 +11,7 @@ class PosOrderLine(models.Model):
...
@@ -11,7 +11,7 @@ class PosOrderLine(models.Model):
# ------------------------------------------------------
# ------------------------------------------------------
# Fields declaration
# Fields declaration
# ------------------------------------------------------
# ------------------------------------------------------
caisse_id
=
fields
.
Char
(
'
Id de la caisse
'
)
# ------------------------------------------------------
# ------------------------------------------------------
# SQL Constraints
# SQL Constraints
# ------------------------------------------------------
# ------------------------------------------------------
...
@@ -34,13 +34,18 @@ class PosOrderLine(models.Model):
...
@@ -34,13 +34,18 @@ class PosOrderLine(models.Model):
@api.model
@api.model
def
create
(
self
,
values
):
def
create
(
self
,
values
):
res
=
super
(
PosOrderLine
,
self
).
create
(
values
)
res
=
super
(
PosOrderLine
,
self
).
create
(
values
)
if
not
res
.
order_id
.
config_id
.
is_balance_free
:
if
res
.
container_id
:
if
res
.
container_id
:
today
=
datetime
.
today
().
isoformat
(
'
T
'
)[:
19
]
today
=
datetime
.
today
().
isoformat
(
'
T
'
)[:
19
]
weight_str
=
str
(
int
(
res
.
qty
*
1000
))
weight_str
=
str
(
int
(
res
.
qty
*
1000
))
# weight_str = str(res.qty * 1000).zfill(5)
# weight_str = str(res.qty * 1000).zfill(5)
if
res
.
product_id
.
default_code
:
prod
=
(
res
.
product_id
.
default_code
).
zfill
(
5
)
prod
=
(
res
.
product_id
.
default_code
).
zfill
(
5
)
else
:
prod
=
"
12345
"
ean13
=
"
26
"
+
prod
+
weight_str
.
zfill
(
5
)
+
"
4
"
ean13
=
"
26
"
+
prod
+
weight_str
.
zfill
(
5
)
+
"
4
"
weight_brut_str
=
str
(
int
((
res
.
container_weight
+
res
.
qty
)
*
1000
))
weight_brut_str
=
str
(
int
((
res
.
container_weight
+
res
.
qty
)
*
1000
))
...
@@ -70,6 +75,7 @@ class PosOrderLine(models.Model):
...
@@ -70,6 +75,7 @@ class PosOrderLine(models.Model):
"
ean13
"
:
ean13_digit
,
"
ean13
"
:
ean13_digit
,
"
ean13_verif
"
:
ean13_verif_digit
,
"
ean13_verif
"
:
ean13_verif_digit
,
"
is_pos
"
:
True
,
"
is_pos
"
:
True
,
"
balance_id
"
:
res
.
caisse_id
}
}
self
.
env
[
'
pos.transaction
'
].
create
(
vals
)
self
.
env
[
'
pos.transaction
'
].
create
(
vals
)
return
res
return
res
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter