From f0d05a883bcd7cc465547dcfca07beb98fd26a64 Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Thu, 1 Feb 2024 18:14:13 +0100 Subject: [PATCH] [MIG] printer_zpl2: Migration to 17.0 --- printer_zpl2/__manifest__.py | 2 +- printer_zpl2/i18n/fr.po | 404 +++++++++--------- printer_zpl2/i18n/printer_zpl2.pot | 13 +- printer_zpl2/models/printing_label_zpl2.py | 119 +++--- .../models/printing_label_zpl2_component.py | 6 +- printer_zpl2/static/description/index.html | 1 - printer_zpl2/tests/test_generate_action.py | 2 +- .../tests/test_printing_label_zpl2.py | 2 +- printer_zpl2/tests/test_test_mode.py | 2 +- printer_zpl2/tests/test_wizard_import_zpl2.py | 2 +- .../tests/test_wizard_print_record_label.py | 2 +- printer_zpl2/views/printing_label_zpl2.xml | 282 ++++++------ printer_zpl2/wizard/print_record_label.py | 2 +- printer_zpl2/wizard/print_record_label.xml | 1 + printer_zpl2/wizard/wizard_import_zpl2.xml | 5 +- 15 files changed, 453 insertions(+), 392 deletions(-) diff --git a/printer_zpl2/__manifest__.py b/printer_zpl2/__manifest__.py index 6637afcfcf3..697e0a929c2 100644 --- a/printer_zpl2/__manifest__.py +++ b/printer_zpl2/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Printer ZPL II", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "category": "Printer", "summary": "Add a ZPL II label printing feature", "author": "SUBTENO-IT, FLorent de Labarre, " diff --git a/printer_zpl2/i18n/fr.po b/printer_zpl2/i18n/fr.po index 96b623c638b..c9534e96af9 100644 --- a/printer_zpl2/i18n/fr.po +++ b/printer_zpl2/i18n/fr.po @@ -1,257 +1,264 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * printer_zpl2 +# * printer_zpl2 # -# Translators: -# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 17.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-12 02:40+0000\n" -"PO-Revision-Date: 2017-05-12 02:40+0000\n" -"Last-Translator: OCA Transbot , 2017\n" -"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"POT-Creation-Date: 2024-02-01 15:32+0000\n" +"PO-Revision-Date: 2024-02-01 16:38+0100\n" +"Last-Translator: \n" +"Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.4.1\n" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label_line__label_no msgid "# labels" -msgstr "" +msgstr "# étiquettes" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__b msgid "11x7" -msgstr "" +msgstr "11x7" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2__labelary_dpmm__12dpmm msgid "12dpmm (300 pdi)" -msgstr "" +msgstr "12 dpmm (300 pdi)" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__d msgid "18x10" -msgstr "" +msgstr "18x10" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__h msgid "21x13" -msgstr "" +msgstr "21x13" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2__labelary_dpmm__24dpmm msgid "24dpmm (600 dpi)" -msgstr "" +msgstr "24 ppm (600 ppp)" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__f msgid "26x13" -msgstr "" +msgstr "26x13" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__e msgid "28x15" -msgstr "" +msgstr "28x15" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "2D Barcode Arguments" -msgstr "" +msgstr "Arguments de code-barres 2D" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__g msgid "60x40" -msgstr "" +msgstr "60x40" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2__labelary_dpmm__6dpmm msgid "6dpmm (152 pdi)" -msgstr "" +msgstr "6 dpmm (152 pdi)" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2__labelary_dpmm__8dpmm msgid "8dpmm (203 dpi)" -msgstr "" +msgstr "8 ppm (203 ppp)" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__a msgid "9x5" -msgstr "" +msgstr "9x5" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__action_window_id msgid "Action" -msgstr "" +msgstr "Action" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__active msgid "Active" -msgstr "" +msgstr "Actif" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Add in the 'Action' menu" -msgstr "" +msgstr "Ajouter dans le menu 'Action'" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__sublabel_id msgid "" -"Another label to include into this one as a component. This allows to define " -"reusable labels parts." +"Another label to include into this one as a component. This allows to " +"define reusable labels parts." msgstr "" +"Une autre étiquette à inclure dans celui-ci en tant que composant. Cela " +"permet de définir des pièces d’étiquettes réutilisables." #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_search msgid "Archived" -msgstr "" +msgstr "Archivé" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__data_autofill msgid "Autofill Data" -msgstr "" +msgstr "Remplissage automatique des données" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__bar_width_ratio msgid "Bar Width Ratio" -msgstr "" +msgstr "Ratio de code-barres" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Barcode Format" -msgstr "" +msgstr "Format du code-barres" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__model msgid "Barcode model, used by some barcode types like QR Code." msgstr "" +"Modèle de code-barres, utilisé par certains types de codes-barres comme le " +"code QR." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__color__b msgid "Black" -msgstr "" +msgstr "Noir" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__block_lines msgid "Block Lines" -msgstr "" +msgstr "Lignes de bloc" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__block_spaces msgid "Block Spaces" -msgstr "" +msgstr "Espaces de bloc" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__block_width msgid "Block Width" -msgstr "" +msgstr "Largeur du bloc" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_wizard_import_zpl2_form #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_wizard_print_product_label_form msgid "Cancel" -msgstr "" +msgstr "Annuler" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__block_justify__c msgid "Center" -msgstr "" +msgstr "Centre" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__data_autofill msgid "Change 'data' with dictionary of the object information." -msgstr "" +msgstr "Remplacez 'data' par le dictionnaire des informations sur l’objet." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__check_digits msgid "Check Digits" -msgstr "" +msgstr "Chiffres de contrôle" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__interpretation_line_above msgid "" "Check if you want the interpretation line to be printed above the barcode." msgstr "" +"Vérifiez si vous souhaitez que la ligne d’interprétation soit imprimée au-" +"dessus du code-barres." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__interpretation_line msgid "Check if you want the interpretation line to be printed." msgstr "" +"Vérifiez si vous souhaitez que la ligne d’interprétation soit imprimée." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__check_digits msgid "Check if you want to compute and print the check digit." msgstr "" +"Vérifiez si vous souhaitez calculer et imprimer le chiffre de contrôle." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__truncate msgid "Check if you want to truncate the barcode." -msgstr "" +msgstr "Vérifiez si vous souhaitez tronquer le code-barres." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__repeat msgid "Check this box to repeat this component on the label." -msgstr "" +msgstr "Cochez cette case pour répéter ce composant sur l’étiquette." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__block_justify msgid "Choose how the text will be justified in the block." -msgstr "" +msgstr "Choisissez comment le texte sera justifié dans le bloc." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__circle msgid "Circle" -msgstr "" +msgstr "Cercle" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__code_11 msgid "Code 11" -msgstr "" +msgstr "Réf. 11" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__code_128 msgid "Code 128" -msgstr "" +msgstr "Code 128" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__code_39 msgid "Code 39" -msgstr "" +msgstr "Code 39" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__code_49 msgid "Code 49" -msgstr "" +msgstr "Réf 49" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__color msgid "Color" -msgstr "" +msgstr "Couleur" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__color msgid "Color of the line to draw." -msgstr "" +msgstr "Couleur de la ligne à tracer." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__columns_count msgid "Columns Count" -msgstr "" +msgstr "Compte de colonnes" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Components" -msgstr "" +msgstr "Composants" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__component_ids msgid "Components which will be printed on the label." -msgstr "" +msgstr "Composants qui seront imprimés sur l’étiquette." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__create_uid @@ -276,7 +283,7 @@ msgstr "Date" #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_import_zpl2__data #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Data" -msgstr "" +msgstr "Données" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__data @@ -284,6 +291,8 @@ msgid "" "Data to print on this component. Resource values can be inserted with " "%(object.field_name)s." msgstr "" +"Données à imprimer sur ce composant. Les valeurs de ressource peuvent être " +"insérées avec %(object.field_name)s." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__font__0 @@ -293,22 +302,22 @@ msgstr "Par défaut" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_import_zpl2__delete_component msgid "Delete existing components" -msgstr "" +msgstr "Supprimer des composants existants" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__description msgid "Description" -msgstr "" +msgstr "Description" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__diagonal msgid "Diagonal Line" -msgstr "" +msgstr "Ligne diagonale" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__diagonal_orientation msgid "Diagonal Orientation" -msgstr "" +msgstr "Orientation diagonale" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__display_name @@ -322,80 +331,81 @@ msgstr "Nom à afficher" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Display an option on related documents." -msgstr "" +msgstr "Affichez une option sur les documents associés." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__ean-13 msgid "EAN-13" -msgstr "" +msgstr "EAN-13" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__ean-8 msgid "EAN-8" -msgstr "" +msgstr "EAN-8" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Emulation" -msgstr "" +msgstr "Émulation" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__model__2 msgid "Enhanced" -msgstr "" +msgstr "Améliorée" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__error_correction msgid "Error Correction" -msgstr "" +msgstr "Correction d’erreurs" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__error_correction msgid "Error correction for some barcode types like QR Code." msgstr "" +"Correction d’erreurs pour certains types de codes-barres comme le code QR." #. module: printer_zpl2 #. odoo-python #: code:addons/printer_zpl2/models/printing_label_zpl2.py:0 #, python-format msgid "Error with Labelary API. %s" -msgstr "" +msgstr "Erreur avec l’API Labelary. %s" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__extra #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Extra" -msgstr "" +msgstr "Extra" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__font msgid "Font" -msgstr "" +msgstr "Police" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__font msgid "Font to use, for text only." -msgstr "" +msgstr "Police à utiliser, pour le texte uniquement." #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Format" -msgstr "" +msgstr "Format" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__graphic msgid "Graphic" -msgstr "" +msgstr "Graphique" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__height msgid "Height" -msgstr "" +msgstr "Hauteur" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__labelary_height msgid "Height in mm" -msgstr "" +msgstr "Hauteur en mm" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__height @@ -403,16 +413,18 @@ msgid "" "Height of the printed component. For a text component, height of a single " "character." msgstr "" +"Hauteur du composant imprimé. Pour un composant de texte, hauteur d’un seul " +"caractère." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__error_correction__l msgid "High Density Level" -msgstr "" +msgstr "Niveau de haute densité" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__error_correction__q msgid "High Reliability Level" -msgstr "" +msgstr "Niveau de fiabilité élevé" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__id @@ -428,121 +440,116 @@ msgstr "ID" msgid "" "If checked, the data will be printed in the inverse color of the background." msgstr "" +"Si cette case est cochée, les données seront imprimées dans la couleur " +"inverse de l’arrière-plan." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__in_block msgid "" "If checked, the data will be restrected in a defined block on the label." msgstr "" +"Si cette case est cochée, les données seront restées dans un bloc défini " +"sur l’étiquette." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__graphic_image msgid "Image" -msgstr "" +msgstr "Image" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__labelary_image msgid "Image from Labelary" -msgstr "" +msgstr "Image de Labelary" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_wizard_import_zpl2_form msgid "Import" -msgstr "" +msgstr "Importer" #. module: printer_zpl2 #. odoo-python #: code:addons/printer_zpl2/wizard/wizard_import_zpl2.py:0 #, python-format msgid "Import %s" -msgstr "" +msgstr "Importer %s" #. module: printer_zpl2 #: model:ir.model,name:printer_zpl2.model_wizard_import_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Import ZPL2" -msgstr "" +msgstr "Importation ZPL2" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__in_block msgid "In Block" -msgstr "" +msgstr "Dans le bloc" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__interleaved_2_of_5 msgid "Interleaved 2 of 5" -msgstr "" +msgstr "Entrelacé 2 sur 5" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__interpretation_line msgid "Interpretation Line" -msgstr "" +msgstr "Ligne d’interprétation" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__interpretation_line_above msgid "Interpretation Line Above" -msgstr "" +msgstr "Ligne d’interprétation ci-dessus" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__orientation__i msgid "Inverted" -msgstr "" +msgstr "Inversé" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__block_justify__j msgid "Justified" -msgstr "" +msgstr "Justifié" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__block_justify msgid "Justify" -msgstr "" +msgstr "Justifier" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__label_id #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_import_zpl2__label_id #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label__label_id msgid "Label" -msgstr "" +msgstr "Label" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Label Component" -msgstr "" +msgstr "Composant d’étiquette" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__component_ids msgid "Label Components" -msgstr "" +msgstr "Composants d’étiquettes" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label_line__label_header_id msgid "Label Header" -msgstr "" +msgstr "En-tête de l'étiquette" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__name msgid "Label Name." -msgstr "" +msgstr "Nom de l’étiquette." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_wizard_print_record_label__label_id msgid "Label to print." -msgstr "" +msgstr "Étiquette à imprimer." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__label_id msgid "Label using this component." -msgstr "" - -#. module: printer_zpl2 -#: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_wizard_import_zpl2____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label_line____last_update -msgid "Last Modified on" -msgstr "Dernière modification le" +msgstr "Étiquetez à l’aide de ce composant." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__write_uid @@ -565,72 +572,72 @@ msgstr "Dernière mise à jour le" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__block_justify__l msgid "Left" -msgstr "" +msgstr "Gauche" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__diagonal_orientation__l msgid "Left (\\)" -msgstr "" +msgstr "Gauche (\\)" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__block_left_margin msgid "Left Margin" -msgstr "" +msgstr "Marge de gauche" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__block_left_margin msgid "Left margin for the second and other lines in the block." -msgstr "" +msgstr "Marge de gauche pour la deuxième ligne et les autres lignes du bloc." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label__line_ids msgid "Line" -msgstr "" +msgstr "Ligne" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__description msgid "Long description for this label." -msgstr "" +msgstr "Description longue pour cette étiquette." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__magnification_factor msgid "Magnification Factor" -msgstr "" +msgstr "Facteur d’agrandissement" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__magnification_factor msgid "Magnification Factor, from 1 to 10." -msgstr "" +msgstr "Facteur de grossissement, de 1 à 10." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__mask_value msgid "Mask Value" -msgstr "" +msgstr "Valeur du masque" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__mask_value msgid "Mask Value, from 0 to 7." -msgstr "" +msgstr "Valeur du masque, de 0 à 7." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__repeat_count msgid "Maximum count of repeats of the component." -msgstr "" +msgstr "Nombre maximal de répétitions du composant." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__block_lines msgid "Maximum number of lines to print in the block." -msgstr "" +msgstr "Nombre maximum de lignes à imprimer dans le bloc." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__test_labelary_mode msgid "Mode Labelary" -msgstr "" +msgstr "Mode Labelaire" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__test_print_mode msgid "Mode Print" -msgstr "" +msgstr "Mode d’impression" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__model_id @@ -642,22 +649,22 @@ msgstr "Modèle" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label__model msgid "Model Name" -msgstr "" +msgstr "Nom du modéle" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__model_id msgid "Model used to print this label." -msgstr "" +msgstr "Modèle utilisé pour imprimer cette étiquette." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__module_width msgid "Module Width" -msgstr "" +msgstr "Largeur du module" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__module_width msgid "Module width for the barcode." -msgstr "" +msgstr "Largeur du module pour le code-barres." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__name @@ -668,12 +675,12 @@ msgstr "Nom" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__name msgid "Name of the component." -msgstr "" +msgstr "Nom du composant." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__orientation__n msgid "Normal" -msgstr "" +msgstr "Normale" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form @@ -681,93 +688,96 @@ msgid "" "Note : It is an emulation from http://labelary.com/, the result on printer " "can be different." msgstr "" +"Note : Il s’agit d’une émulation de http://labelary.com/, le résultat sur " +"imprimante peut être différent." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__columns_count msgid "Number of data columns to encode." -msgstr "" +msgstr "Nombre de colonnes de données à encoder." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__repeat_offset msgid "Number of elements to skip when reading a list of elements." msgstr "" +"Nombre d’éléments à ignorer lors de la lecture d’une liste d’éléments." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__rows_count msgid "Number of rows to encode." -msgstr "" +msgstr "Nombre de lignes à encoder." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__block_spaces msgid "Number of spaces added between lines in the block." -msgstr "" +msgstr "Nombre d’espaces ajoutés entre les lignes du bloc." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__only_product_barcode msgid "Only product barcode data" -msgstr "" +msgstr "Uniquement les données du code-barres du produit" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__sequence msgid "Order used to print the elements." -msgstr "" +msgstr "Ordre d’impression des éléments." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__orientation msgid "Orientation" -msgstr "" +msgstr "Orientation" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__orientation msgid "Orientation of the barcode." -msgstr "" +msgstr "Orientation du code-barres." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__diagonal_orientation msgid "Orientation of the diagonal line." -msgstr "" +msgstr "Orientation de la ligne diagonale." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__origin_x #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__origin_x msgid "Origin X" -msgstr "" +msgstr "Origine X" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__origin_y #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__origin_y msgid "Origin Y" -msgstr "" +msgstr "Origine Y" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__origin_x msgid "Origin point of the component in the label, X coordinate." -msgstr "" +msgstr "Point d’origine du composant dans l’étiquette, coordonnée X." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__origin_y msgid "Origin point of the component in the label, Y coordinate." -msgstr "" +msgstr "Point d’origine du composant dans l’étiquette, coordonnée Y." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__origin_x msgid "Origin point of the contents in the label, X coordinate." -msgstr "" +msgstr "Point d’origine du contenu de l’étiquette, coordonnée X." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__origin_y msgid "Origin point of the contents in the label, Y coordinate." -msgstr "" +msgstr "Point d’origine du contenu de l’étiquette, coordonnée Y." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__model__1 msgid "Original" -msgstr "" +msgstr "Original" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__pdf417 msgid "PDF417" -msgstr "" +msgstr "PDF417" #. module: printer_zpl2 #. odoo-python @@ -777,35 +787,32 @@ msgstr "" #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_wizard_print_product_label_form #, python-format msgid "Print Label" -msgstr "" +msgstr "Imprimer Etiquette" #. module: printer_zpl2 #: model:ir.model,name:printer_zpl2.model_wizard_print_record_label msgid "Print Record Label" -msgstr "" +msgstr "Imprimer l’étiquette d’enregistrement" #. module: printer_zpl2 #: model:ir.model,name:printer_zpl2.model_wizard_print_record_label_line msgid "Print Record Label Line" -msgstr "" +msgstr "Imprimer la ligne d’étiquettes d’enregistrement" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form -#, fuzzy msgid "Print Test" -msgstr "Imprimante" +msgstr "Test d’impression" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__labelary_dpmm -#, fuzzy msgid "Print density" -msgstr "Imprimante" +msgstr "Densité d’impression" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_wizard_print_product_label_form -#, fuzzy msgid "Print label" -msgstr "Imprimante" +msgstr "Imprimez l'étiquette" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__printer_id @@ -817,173 +824,175 @@ msgstr "Imprimante" #: model:ir.model.fields,help:printer_zpl2.field_wizard_import_zpl2__data #: model:ir.model.fields,help:printer_zpl2.field_wizard_print_record_label__printer_id msgid "Printer used to print the labels." -msgstr "" +msgstr "Imprimante utilisée pour imprimer les étiquettes." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__qr_code msgid "QR Code" -msgstr "" +msgstr "QR Code" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__bar_width_ratio msgid "Ratio between wide bar and narrow bar." -msgstr "" +msgstr "Rapport entre la barre large et la barre étroite." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__orientation__b msgid "Read from Bottom up" -msgstr "" +msgstr "Lire de bas en haut" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__record_id msgid "Record ID" -msgstr "" +msgstr "ID Enregistrement" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__model_id msgid "Record's model" -msgstr "" +msgstr "Modèle de l’enregistrement" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__rectangle msgid "Rectangle / Line" -msgstr "" +msgstr "Rectangle / Ligne" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Remove from the 'Action' menu" -msgstr "" +msgstr "Supprimer du menu 'Action'" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Remove the contextual action." -msgstr "" +msgstr "Supprimez l’action contextuelle." #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Repeat" -msgstr "" +msgstr "Répéter" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__repeat_count msgid "Repeat Count" -msgstr "" +msgstr "Nombre de répétitions" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__repeat_offset msgid "Repeat Offset" -msgstr "" +msgstr "Décalage de répétition" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__repeat_offset_x msgid "Repeat Offset X" -msgstr "" +msgstr "Décalage de répétition X" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__repeat_offset_y msgid "Repeat Offset Y" -msgstr "" +msgstr "Répéter le décalage Y" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__repeat msgid "Repeatable" -msgstr "" +msgstr "Réitérable" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__restore_saved_config msgid "Restore printer's configuration" -msgstr "" +msgstr "Restaurer la configuration de l’imprimante" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__restore_saved_config msgid "Restore printer's saved configuration and end of each label " msgstr "" +"Restaurer la configuration enregistrée de l’imprimante et la fin de chaque " +"étiquette " #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__reverse_print msgid "Reverse Print" -msgstr "" +msgstr "Impression inversée" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__block_justify__r msgid "Right" -msgstr "" +msgstr "Droite" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__diagonal_orientation__r msgid "Right (/)" -msgstr "" +msgstr "Droite (/)" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__orientation__r msgid "Rotated" -msgstr "" +msgstr "Tourné" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__rounding msgid "Rounding" -msgstr "" +msgstr "Arrondi" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__rounding msgid "Rounding of the printed rectangle corners." -msgstr "" +msgstr "Arrondi des coins du rectangle imprimé." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__rows_count msgid "Rows Count" -msgstr "" +msgstr "Nombre de lignes" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__security_level msgid "Security Level" -msgstr "" +msgstr "Niveau de sécurité" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__security_level msgid "Security level for error detection." -msgstr "" +msgstr "Niveau de sécurité pour la détection des erreurs." #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__sequence msgid "Sequence" -msgstr "" +msgstr "Séquence" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__error_correction__m msgid "Standard Level" -msgstr "" +msgstr "Niveau standard" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__sublabel_id #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__sublabel msgid "Sublabel" -msgstr "" +msgstr "Sous-étiquette" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Test Mode" -msgstr "" +msgstr "Mode test" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__text msgid "Text" -msgstr "" +msgstr "Texte" #. module: printer_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form msgid "Text Block Format" -msgstr "" +msgstr "Format de bloc de texte" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__thickness msgid "Thickness" -msgstr "" +msgstr "Épaisseur" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__thickness msgid "Thickness of the line to draw." -msgstr "" +msgstr "Epaisseur de la ligne à tracer." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__graphic_image @@ -991,18 +1000,20 @@ msgid "" "This field holds a static image to print. If not set, the data field is " "evaluated." msgstr "" +"Ce champ contient une image statique à imprimer. S’il n’est pas défini, le " +"champ de données est évalué." #. module: printer_zpl2 #. odoo-python #: code:addons/printer_zpl2/models/printing_label_zpl2.py:0 #, python-format msgid "This label cannot be used on {model}" -msgstr "" +msgstr "Cette étiquette ne peut pas être utilisée sur {model}" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__truncate msgid "Truncate" -msgstr "" +msgstr "Tronquer" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__component_type @@ -1012,43 +1023,44 @@ msgstr "Type" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__component_type msgid "Type of content, simple text or barcode." -msgstr "" +msgstr "Type de contenu, texte simple ou code-barres." #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__upc-e msgid "UPC-E" -msgstr "" +msgstr "UPC-E" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__error_correction__h msgid "Ultra-high Reliability Level" -msgstr "" +msgstr "Niveau de fiabilité ultra-élevé" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__color__w msgid "White" -msgstr "" +msgstr "Blanc" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__width #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__width msgid "Width" -msgstr "" +msgstr "Largeur" #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__labelary_width msgid "Width in mm" -msgstr "" +msgstr "Largeur en mm" #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__block_width msgid "Width of the block." -msgstr "" +msgstr "Largeur du bloc." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2__width msgid "Width of the label, will be set on the printer before printing." msgstr "" +"La largeur de l’étiquette sera définie sur l’imprimante avant l’impression." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__width @@ -1056,46 +1068,52 @@ msgid "" "Width of the printed component. For a text component, width of a single " "character." msgstr "" +"Largeur du composant imprimé. Pour un composant de texte, largeur d’un seul " +"caractère." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__repeat_offset_x msgid "" "X coordinate offset between each occurence of this component on the label." msgstr "" +"Décalage de coordonnées X entre chaque occurrence de ce composant sur " +"l’étiquette." #. module: printer_zpl2 #: model:ir.model.fields,help:printer_zpl2.field_printing_label_zpl2_component__repeat_offset_y msgid "" "Y coordinate offset between each occurence of this component on the label." msgstr "" +"Décalage de la coordonnée Y entre chaque occurrence de ce composant sur " +"l’étiquette." #. module: printer_zpl2 #. odoo-python #: code:addons/printer_zpl2/models/printing_label_zpl2.py:0 #, python-format msgid "You can not create recursive labels." -msgstr "" +msgstr "Vous ne pouvez pas créer d’étiquettes récursives." #. module: printer_zpl2 #: model:ir.model,name:printer_zpl2.model_printing_label_zpl2 #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_form #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_printing_label_zpl2_search msgid "ZPL II Label" -msgstr "" +msgstr "Étiquette ZPL II" #. module: printer_zpl2 #: model:ir.model,name:printer_zpl2.model_printing_label_zpl2_component msgid "ZPL II Label Component" -msgstr "" +msgstr "Composant d’étiquette ZPL II" #. module: printer_zpl2 #: model:ir.actions.act_window,name:printer_zpl2.act_open_printing_label_zpl2_view #: model:ir.ui.menu,name:printer_zpl2.menu_printing_label_zpl2 msgid "ZPL II Labels" -msgstr "" +msgstr "Étiquettes ZPL II" #. module: printer_zpl2 #: model:ir.model.fields.selection,name:printer_zpl2.selection__printing_label_zpl2_component__component_type__zpl2_raw #: model_terms:ir.ui.view,arch_db:printer_zpl2.view_wizard_import_zpl2_form msgid "ZPL2" -msgstr "" +msgstr "ZPL2" diff --git a/printer_zpl2/i18n/printer_zpl2.pot b/printer_zpl2/i18n/printer_zpl2.pot index 18d1a0965b4..a8c58531310 100644 --- a/printer_zpl2/i18n/printer_zpl2.pot +++ b/printer_zpl2/i18n/printer_zpl2.pot @@ -4,8 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-01 15:38+0000\n" +"PO-Revision-Date: 2024-02-01 15:38+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -531,15 +533,6 @@ msgstr "" msgid "Label using this component." msgstr "" -#. module: printer_zpl2 -#: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_wizard_import_zpl2____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label____last_update -#: model:ir.model.fields,field_description:printer_zpl2.field_wizard_print_record_label_line____last_update -msgid "Last Modified on" -msgstr "" - #. module: printer_zpl2 #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2__write_uid #: model:ir.model.fields,field_description:printer_zpl2.field_printing_label_zpl2_component__write_uid diff --git a/printer_zpl2/models/printing_label_zpl2.py b/printer_zpl2/models/printing_label_zpl2.py index f19fec041c3..aee4b14f64b 100644 --- a/printer_zpl2/models/printing_label_zpl2.py +++ b/printer_zpl2/models/printing_label_zpl2.py @@ -5,6 +5,7 @@ import io import itertools import logging +import traceback from collections import defaultdict import requests @@ -74,6 +75,7 @@ class PrintingLabelZpl2(models.Model): labelary_image = fields.Binary( string="Image from Labelary", compute="_compute_labelary_image" ) + labelary_error = fields.Text(compute="_compute_labelary_image") labelary_dpmm = fields.Selection( selection=[ ("6dpmm", "6dpmm (152 pdi)"), @@ -91,7 +93,7 @@ class PrintingLabelZpl2(models.Model): @api.constrains("component_ids") def check_recursion(self): cr = self._cr - self.flush(["component_ids"]) + self.flush_model(["component_ids"]) query = ( 'SELECT "{}", "{}" FROM "{}" ' 'WHERE "{}" IN %s AND "{}" IS NOT NULL'.format( @@ -124,7 +126,21 @@ def check_recursion(self): def _get_component_data(self, record, component, eval_args): if component.data_autofill: return component.autofill_data(record, eval_args) - return safe_eval(str(component.data), eval_args) or "" + try: + return safe_eval(str(component.data), eval_args) or "" + except Exception as e: + raise exceptions.UserError( + _( + "The syntax of this componant %(display_name)s [%(label_name)s]" + " is wrong.\nRecord : %(record_name)s.\n" + "Please check the syntax.\n\n%(error)s\n\n%(traceback)s", + display_name=component.display_name, + label_name=component.label_id.display_name, + record_name=record.display_name, + error=e, + traceback=traceback.format_exc(), + ) + ) from e def _get_to_data_to_print( self, @@ -133,11 +149,12 @@ def _get_to_data_to_print( page_count=1, label_offset_x=0, label_offset_y=0, - **extra, + extra=None, ): to_print = [] + extra = extra or {} for component in self.component_ids: - eval_args = extra + eval_args = {} eval_args.update( { "object": record, @@ -159,6 +176,7 @@ def _get_to_data_to_print( "MINYEAR", ], ), + "extra": extra, } ) data = self._get_component_data(record, component, eval_args) @@ -172,7 +190,7 @@ def _get_to_data_to_print( ): printed_data = data # Pick the right value if data is a collection - if isinstance(data, (list, tuple, set, models.BaseModel)): + if isinstance(data, list | tuple | set | models.BaseModel): # If we reached the end of data, quit the loop if idx >= len(data): break @@ -200,10 +218,11 @@ def _generate_zpl2_components_data( page_count=1, label_offset_x=0, label_offset_y=0, - **extra, + extra=None, ): + extra = extra or {} to_print = self._get_to_data_to_print( - record, page_number, page_count, label_offset_x, label_offset_y, **extra + record, page_number, page_count, label_offset_x, label_offset_y, extra ) for component, data, offset_x, offset_y in to_print: @@ -337,8 +356,9 @@ def _generate_zpl2_components_data( data, ) - def _generate_zpl2_data(self, record, page_count=1, **extra): + def _generate_zpl2_data(self, record, page_count=1, extra=None): self.ensure_one() + extra = extra or {} label_data = zpl2.Zpl2() labelary_emul = extra.get("labelary_emul", False) @@ -356,7 +376,7 @@ def _generate_zpl2_data(self, record, page_count=1, **extra): record, page_number=page_number, page_count=page_count, - **extra, + extra=extra, ) # Restore printer's configuration and end the label @@ -366,15 +386,15 @@ def _generate_zpl2_data(self, record, page_count=1, **extra): return label_data.output() - def print_label(self, printer, record, page_count=1, **extra): + def print_label(self, printer, record, page_count=1, extra=None): for label in self: - if record._name != label.model_id.model: + if record._name != label.model_id.sudo().model: raise exceptions.UserError( _("This label cannot be used on {model}").format(model=record._name) ) # Send the label to printer label_contents = label._generate_zpl2_data( - record, page_count=page_count, **extra + record, page_count=page_count, extra=extra ) printer.print_document( report=None, content=label_contents, doc_format="raw" @@ -409,6 +429,7 @@ def add_action(self, model_id): action = self.new_action(model_id) return action + # ruff: noqa: B023 def create_action(self): models = self.filtered(lambda record: not record.action_window_id).mapped( "model_id" @@ -428,12 +449,12 @@ def create_action(self): action = actions.filtered(lambda a: a.binding_model_id == model) if not action: action = self.new_action(model.id) - for label in labels.filtered(lambda l: l.model_id == model): + for label in labels.filtered(lambda label: label.model_id == model): label.action_window_id = action return True def unlink_action(self): - self.mapped("action_window_id").unlink() + self.action_window_id.unlink() def import_zpl2(self): self.ensure_one() @@ -461,7 +482,7 @@ def print_test_label(self): record = label._get_record() extra = safe_eval(label.extra, {"env": self.env}) if record: - label.print_label(label.printer_id, record, **extra) + label.print_label(label.printer_id, record, extra=extra) @api.depends( "record_id", @@ -475,7 +496,14 @@ def print_test_label(self): ) def _compute_labelary_image(self): for label in self: - label.labelary_image = label._generate_labelary_image() + try: + label.labelary_image = label._generate_labelary_image() + label.labelary_error = False + except Exception as e: + error = _("Error durring rendering.\n\n%s", e) + _logger.warning(error) + label.labelary_error = error + label.labelary_image = False def _generate_labelary_image(self): self.ensure_one() @@ -492,37 +520,32 @@ def _generate_labelary_image(self): if record: # If case there an error (in the data field with the safe_eval # for exemple) the new component or the update is not lost. - try: - url = ( - "http://api.labelary.com/v1/printers/" - "{dpmm}/labels/{width}x{height}/0/" - ) - width = round(self.labelary_width / 25.4, 2) - height = round(self.labelary_height / 25.4, 2) - url = url.format(dpmm=self.labelary_dpmm, width=width, height=height) - extra = safe_eval(self.extra, {"env": self.env}) - zpl_file = self._generate_zpl2_data(record, labelary_emul=True, **extra) - files = {"file": zpl_file} - headers = {"Accept": "image/png"} - response = requests.post( - url, headers=headers, files=files, stream=True, timeout=30 + url = ( + "http://api.labelary.com/v1/printers/" + "{dpmm}/labels/{width}x{height}/0/" + ) + width = round(self.labelary_width / 25.4, 2) + height = round(self.labelary_height / 25.4, 2) + url = url.format(dpmm=self.labelary_dpmm, width=width, height=height) + extra = safe_eval(self.extra, {"env": self.env}) + extra["labelary_emul"] = True + zpl_file = self._generate_zpl2_data(record, extra=extra) + files = {"file": zpl_file} + headers = {"Accept": "image/png"} + response = requests.post( + url, headers=headers, files=files, stream=True, timeout=30 + ) + if response.status_code == 200: + # Add a padd + im = Image.open(io.BytesIO(response.content)) + im_size = im.size + new_im = Image.new( + "RGB", (im_size[0] + 2, im_size[1] + 2), (164, 164, 164) ) - if response.status_code == 200: - # Add a padd - im = Image.open(io.BytesIO(response.content)) - im_size = im.size - new_im = Image.new( - "RGB", (im_size[0] + 2, im_size[1] + 2), (164, 164, 164) - ) - new_im.paste(im, (1, 1)) - imgByteArr = io.BytesIO() - new_im.save(imgByteArr, format="PNG") - return base64.b64encode(imgByteArr.getvalue()) - else: - _logger.warning( - _("Error with Labelary API. %s") % response.status_code - ) - - except Exception as e: - _logger.warning(_("Error with Labelary API. %s") % e) + new_im.paste(im, (1, 1)) + imgByteArr = io.BytesIO() + new_im.save(imgByteArr, format="PNG") + return base64.b64encode(imgByteArr.getvalue()) + else: + raise Exception(_("Error with Labelary API. %s") % response.status_code) return False diff --git a/printer_zpl2/models/printing_label_zpl2_component.py b/printer_zpl2/models/printing_label_zpl2_component.py index eccd2ef6a66..c6e2f6d3d6e 100644 --- a/printer_zpl2/models/printing_label_zpl2_component.py +++ b/printer_zpl2/models/printing_label_zpl2_component.py @@ -1,21 +1,17 @@ # Copyright (C) 2016 SYLEAM () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import logging - from odoo import api, fields, models from . import zpl2 -_logger = logging.getLogger(__name__) - - DEFAULT_PYTHON_CODE = """# Python One-Liners # - object: %s record on which the action is triggered; may be void # - page_number: Current Page # - page_count: Total Page # - time, datetime: Python libraries # - write instead 'component_not_show' to don't show this component +# - extra.get('key') to get the value of the key in the extra dictionary # Example: object.name diff --git a/printer_zpl2/static/description/index.html b/printer_zpl2/static/description/index.html index c01084ba26c..0a0acf3cef7 100644 --- a/printer_zpl2/static/description/index.html +++ b/printer_zpl2/static/description/index.html @@ -1,4 +1,3 @@ - diff --git a/printer_zpl2/tests/test_generate_action.py b/printer_zpl2/tests/test_generate_action.py index 5e829dd0087..92ec4585967 100644 --- a/printer_zpl2/tests/test_generate_action.py +++ b/printer_zpl2/tests/test_generate_action.py @@ -8,7 +8,7 @@ class TestWizardPrintRecordLabel(TransactionCase): def setUp(self): - super(TestWizardPrintRecordLabel, self).setUp() + super().setUp() self.Model = self.env["wizard.print.record.label"] self.server = self.env["printing.server"].create({}) self.printer = self.env["printing.printer"].create( diff --git a/printer_zpl2/tests/test_printing_label_zpl2.py b/printer_zpl2/tests/test_printing_label_zpl2.py index 68f3931574c..20147fe83a6 100644 --- a/printer_zpl2/tests/test_printing_label_zpl2.py +++ b/printer_zpl2/tests/test_printing_label_zpl2.py @@ -13,7 +13,7 @@ class TestPrintingLabelZpl2(TransactionCase): def setUp(self): - super(TestPrintingLabelZpl2, self).setUp() + super().setUp() self.Model = self.env["printing.label.zpl2"] self.ComponentModel = self.env["printing.label.zpl2.component"] self.server = self.env["printing.server"].create({}) diff --git a/printer_zpl2/tests/test_test_mode.py b/printer_zpl2/tests/test_test_mode.py index e95a35bb078..4e57a29d009 100644 --- a/printer_zpl2/tests/test_test_mode.py +++ b/printer_zpl2/tests/test_test_mode.py @@ -9,7 +9,7 @@ class TestWizardPrintRecordLabel(TransactionCase): def setUp(self): - super(TestWizardPrintRecordLabel, self).setUp() + super().setUp() self.Model = self.env["wizard.print.record.label"] self.server = self.env["printing.server"].create({}) self.printer = self.env["printing.printer"].create( diff --git a/printer_zpl2/tests/test_wizard_import_zpl2.py b/printer_zpl2/tests/test_wizard_import_zpl2.py index 111efa3be09..d5d29ae66bc 100644 --- a/printer_zpl2/tests/test_wizard_import_zpl2.py +++ b/printer_zpl2/tests/test_wizard_import_zpl2.py @@ -6,7 +6,7 @@ class TestWizardImportZpl2(TransactionCase): def setUp(self): - super(TestWizardImportZpl2, self).setUp() + super().setUp() self.Model = self.env["wizard.print.record.label"] self.server = self.env["printing.server"].create({}) self.printer = self.env["printing.printer"].create( diff --git a/printer_zpl2/tests/test_wizard_print_record_label.py b/printer_zpl2/tests/test_wizard_print_record_label.py index 3ce6a63a0c6..962a33f7fee 100644 --- a/printer_zpl2/tests/test_wizard_print_record_label.py +++ b/printer_zpl2/tests/test_wizard_print_record_label.py @@ -10,7 +10,7 @@ class TestWizardPrintRecordLabel(TransactionCase): def setUp(self): - super(TestWizardPrintRecordLabel, self).setUp() + super().setUp() self.Model = self.env["wizard.print.record.label"] self.server = self.env["printing.server"].create({}) self.printer = self.env["printing.printer"].create( diff --git a/printer_zpl2/views/printing_label_zpl2.xml b/printer_zpl2/views/printing_label_zpl2.xml index eb3ef94a483..afd212cbae0 100644 --- a/printer_zpl2/views/printing_label_zpl2.xml +++ b/printer_zpl2/views/printing_label_zpl2.xml @@ -19,13 +19,20 @@
@@ -34,7 +41,7 @@ name="create_action" string="Add in the 'Action' menu" type="object" - attrs="{'invisible':[('action_window_id','!=',False)]}" + invisible="action_window_id" icon="fa-plus-square" help="Display an option on related documents." class="oe_stat_button" @@ -43,35 +50,31 @@ name="unlink_action" string="Remove from the 'Action' menu" type="object" - attrs="{'invisible':[('action_window_id','=',False)]}" + invisible="not action_window_id" icon="fa-minus-square" help="Remove the contextual action." class="oe_stat_button" />
- +

- - - - - - - - -

+ + + + + + + + + + + @@ -116,153 +119,175 @@
- + - - - - + /> + + - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + - - - - + + + + + + - - - - - + + + + + + + - + - - - - + + + + + + - + + +

+ Note : It is an emulation from http://labelary.com/, the result on printer can be different. +

@@ -275,35 +300,42 @@ - - - + +
diff --git a/printer_zpl2/wizard/print_record_label.py b/printer_zpl2/wizard/print_record_label.py index 2c12b5cf4b8..7fb003b5c1a 100644 --- a/printer_zpl2/wizard/print_record_label.py +++ b/printer_zpl2/wizard/print_record_label.py @@ -33,7 +33,7 @@ class PrintRecordLabel(models.TransientModel): @api.model def default_get(self, fields_list): - values = super(PrintRecordLabel, self).default_get(fields_list) + values = super().default_get(fields_list) # Automatically select the printer and label, if only one is available printers = self.env["printing.printer"].search( diff --git a/printer_zpl2/wizard/print_record_label.xml b/printer_zpl2/wizard/print_record_label.xml index 817a78260b0..b70857c0158 100644 --- a/printer_zpl2/wizard/print_record_label.xml +++ b/printer_zpl2/wizard/print_record_label.xml @@ -13,6 +13,7 @@ diff --git a/printer_zpl2/wizard/wizard_import_zpl2.xml b/printer_zpl2/wizard/wizard_import_zpl2.xml index 346b0863c61..b6e1df8f201 100644 --- a/printer_zpl2/wizard/wizard_import_zpl2.xml +++ b/printer_zpl2/wizard/wizard_import_zpl2.xml @@ -11,9 +11,8 @@ - - - + +