Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
1694 Vues

I came across what appears to be a bug with Odoo 16 when printing labels on barcodes for Purchase Orders.


Setup:

  • Settings / Traceability / Lots & Serial Numbers
    • Print GS1 Barcodes for lots is DISABLED
  • Create a product with a bar code number and requires lot numbers.
  • Create a PO for that product and receive the order.
  • Add a lot number - do not validate. 
  • Print the labels.

 The barcode represents the value of the the lot number and not the product's barcode number.


I noticed when lots are used the barcode text value under the barcode is overridden.


Problem exists for all out of the box labels:

  • Dymo 2 x 7 with price 
  • 4 x 7 with price 
  • 4 x 12 
  • 4 x 12 with price 
  • ZPL Labels 
  • ZPL Labels with price


I checked on other test servers for used for addon demos by various vendors and the problem exists.


Avatar
Ignorer
Auteur Meilleure réponse

Is this something that is just a configuration issue on my part?


Tracking down the 4x7 with Price label in  Views / report_simple_label2x7:

  • ~ /web#id=864&menu_id=4&cids=1&action=29&model=ir.ui.view&view_type=form


Look for this line:

div t-out="barcode" t-options="{'widget': 'barcode', 'symbology': 'auto', 'img_style': barcode_size}"/>


Updated to:


div t-out="product.barcode" t-options="{'widget': 'barcode', 'symbology': 'auto', 'img_style': barcode_size}"/>


!-- Since barcode value writes lot number if exists, explicitly adding human readable barcode value --> 


span class="text-center" t-out="product.barcode"/>
br/> span class="text-center" t-out="barcode"/>



Somewhere in the code it reuses "barcode" as the lot number if used, so there isn't an option to print both the barcode number and lot number  This changes that for this one label.  

Looking for a cleaner solution.


Upon further testing, doesn't work when combining products that require lot numbers and those without on the same PO.  The ones with lot numbers, barcodes print, but the barcode number is duplicated.







Avatar
Ignorer
Publications associées Réponses Vues Activité
2
juil. 25
4742
1
avr. 15
4366
2
févr. 25
7733
2
mai 24
3361
2
mars 23
8457