ajouter une colonne mouvement de stock

Bonjour à tous,

J’aimerai ajouter le champs « poids » des produits dans la liste déroulante des champs possible à faire afficher dans la liste des mouvement de stock.
Je vous ai joint une image, dont vous pouvez voir ma fibre paintistique :silly: :silly: :silly: :laugh:

Quelqu’un aurait-il une petite lanterne pour moi SVP ?

Merci d’avance

Bonjour,

A mon avis il faudrait investiguer du coté des champs additionels (extrafields) calculés.
Mais j’ai pas de solution toute faite.

Bonjour
Mylist doit faire.
@+

j’ai bien regardé avec mylist, mais il me créé une nouvevelle liste, moi je voudrais le faire afficher sur le tableau mouvement directement

Bonjour :happy:

pour les extrafields, cela ne peut se faire car il n’existe pas de table extrafields pour les mouvements de stock

pour que ce soit affiché directement…
il me semble que la seule solution soit de créer un nouveau « listnew.php »
en partant de la liste des mouvements et en ajoutant le ou les champs désirés…

Bonne continuation

1 « J'aime »

merci !

Bon j’avance j’ai ajouté ca dans mouvement_list .php
Je peux bien selectionner poids dans la liste déroulante des mouvement de stock, la page charge, mais le poids ne s’affiche pas… doit y avoir une erreur dans mon code… mais laquelle…
$arrayfields=array(
‹ m.rowid ›=>array(‹ label ›=>$langs->trans(« Ref »), ‹ checked ›=>1),
‹ m.datem ›=>array(‹ label ›=>$langs->trans(« Date »), ‹ checked ›=>1),
‹ p.ref ›=>array(‹ label ›=>$langs->trans(« ProductRef »), ‹ checked ›=>1, ‹ css ›=>‹ maxwidth100 ›),
‹ p.label ›=>array(‹ label ›=>$langs->trans(« ProductLabel »), ‹ checked ›=>1),
‹ p.weight ›=>array(‹ label ›=>$langs->trans(« Weight »), ‹ checked ›=>0, ‹ enabled ›=>(! empty($conf->produit->enabled))),
‹ m.batch ›=>array(‹ label ›=>$langs->trans(« BatchNumberShort »), ‹ checked ›=>1, ‹ enabled ›=>(! empty($conf->productbatch->enabled))),
‹ pl.eatby ›=>array(‹ label ›=>$langs->trans(« EatByDate »), ‹ checked ›=>0, ‹ enabled ›=>(! empty($conf->productbatch->enabled))),
‹ pl.sellby ›=>array(‹ label ›=>$langs->trans(« SellByDate »), ‹ checked ›=>0, ‹ position ›=>10, ‹ enabled ›=>(! empty($conf->productbatch->enabled))),
‹ e.ref ›=>array(‹ label ›=>$langs->trans(« Warehouse »), ‹ checked ›=>1, ‹ enabled ›=>(! $id > 0)), // If we are on specific warehouse, we hide it
‹ m.fk_user_author ›=>array(‹ label ›=>$langs->trans(« Author »), ‹ checked ›=>0),
‹ m.inventorycode ›=>array(‹ label ›=>$langs->trans(« InventoryCodeShort »), ‹ checked ›=>1),
‹ m.label ›=>array(‹ label ›=>$langs->trans(« MovementLabel »), ‹ checked ›=>1),
‹ m.type_mouvement ›=>array(‹ label ›=>$langs->trans(« TypeMovement »), ‹ checked ›=>1),
‹ origin ›=>array(‹ label ›=>$langs->trans(« Origin »), ‹ checked ›=>1),
‹ m.value ›=>array(‹ label ›=>$langs->trans(« Qty »), ‹ checked ›=>1),
‹ m.price ›=>array(‹ label ›=>$langs->trans(« UnitPurchaseValue »), ‹ checked ›=>0),
//‹ m.datec ›=>array(‹ label ›=>$langs->trans(« DateCreation »), ‹ checked ›=>0, ‹ position ›=>500),
//‹ m.tms ›=>array(‹ label ›=>$langs->trans(« DateModificationShort »), ‹ checked ›=>0, ‹ position ›=>500)

C’est un bon début…

il faut simplement en faire un peu plus pour que cela réponde à vos attentes…

Bonne continuation