Commit 1dcf12b9 by Arnaud B

Prise en charge des autres possibilités de valeurs de x_reception_status dans…

Prise en charge des autres possibilités de valeurs de x_reception_status dans l'affichage des commandes
parent a00afa2c
......@@ -29,11 +29,13 @@ class CagetteReception(models.Model):
if res and len(res) > 0:
for r in res:
pids.append(int(r['purchase_id'][0]))
if len(pids):
f=["id","name","date_order", "partner_id", "date_planned", "amount_untaxed", "amount_total", "x_reception_status"]
# Only get orders that need to be treated in Reception
c=[['id', 'in', pids], ["x_reception_status", "in", [False, 'qty_valid']]]
c=[['id', 'in', pids], ["x_reception_status", "in", [False, 'qty_valid', 'valid_pending', 'br_valid', 'error_pack_op', 'uprice_valid']]]
orders = api.search_read('purchase.order', c, f)
except Exception as e:
print (str(e))
......
......@@ -374,17 +374,40 @@ $(document).ready(function() {
title:"Statut",
className:"dt-body-center",
render: function (data) {
switch (data) {
case 'qty_valid':
return "<span class='btn--success'>Mettre à jour les prix</span>";
case 'br_valid':
return "<span class='btn'><i class='far fa-check-circle'></i> Réception OK</span>";
default:
case 'False':
return "<span class='btn--primary'>Compter les produits</span>";
case 'done':
return "<span class='btn'><i class='far fa-check-circle'></i> Terminé</span>";
case 'uprice_valid':
return "<span class='btn--primary'>Mise à jour du prix OK</span>";
case "valid_pending":
return "<span class='btn--info'>En attente de validation</span>";
case 'legacy':
return "<span class='btn--success'>Legacy</span>";
case 'error_pack_op':
return "<span class='btn--danger'>Erreur pack operations</span>";
case 'error_transfer':
return "<span class='btn--danger'>Erreur de transfert</span>";
case 'error_picking':
return "<span class='btn--danger'>Erreur validation quantité</span>";
case '/error_uprice':
return "<span class='btn--danger'>Erreur mise à jour du prix</span>";
default:
return "<span class='btn--warning'>Status inconnu : " + data + "</span>";
}
},
width: "20%"
}
} //error_transfert ou error_pack_op
],
dom: 'rtip',
order: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment