Skip to content

Label Printer Template Selection has no Default Value in Label Printing Modal #8347

Open

Description

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

as a follow-up on #8313 (mentioned by @SergeoLacruz) there is another issue with the Label Printer Modal form: currently no template is selected by default in the form - which is another two clicks for each printing operation.

I have looked into fixing this, but cannot figure out how to access the template field options for setting a value: in https://github.com/simonkuehling/InvenTree/blob/cb0248d15944544d66b5b047b905275d76954a00/src/frontend/src/components/buttons/PrintingActions.tsx#L60-L67

Happy to create a PR for it if someone could give me a hint on this!

Steps to Reproduce

  1. open a Part/StockItem/etc
  2. click "print label" action button

Expected behaviour

pre-select the drop down with the first template

Deployment Method

  • Docker
  • Package
  • Bare metal
  • Other - added info in Steps to Reproduce

Version Information

InvenTree-Version: 0.17.0 dev
Django Version: 4.2.16
Commit Hash: 17bf7bb
Commit Date: 2024-10-18
Commit Branch: null
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.1.0-rpi7-rpi-v8-aarch64-with
Installer: DOC
nullActive plugins: [{"name":"InvenTreeBarcode","slug":"inventreebarcode","version":"2.1.0"},{"name":"InvenTreeCoreNotificationsPlugin","slug":"inventreecorenotificationsplugin","version":"1.0.0"},{"name":"InvenTreeCurrencyExchange","slug":"inventreecurrencyexchange","version":"1.0.0"},{"name":"InvenTreeLabel","slug":"inventreelabel","version":"1.1.0"},{"name":"InvenTreeLabelMachine","slug":"inventreelabelmachine","version":"1.0.0"},{"name":"InvenTreeLabelSheet","slug":"inventreelabelsheet","version":"1.0.0"},{"name":"DigiKeyPlugin","slug":"digikeyplugin","version":"1.0.0"},{"name":"LCSCPlugin","slug":"lcscplugin","version":"1.0.0"},{"name":"MouserPlugin","slug":"mouserplugin","version":"1.0.0"},{"name":"TMEPlugin","slug":"tmeplugin","version":"1.0.0"},{"name":"IPNAutoGenerator","slug":"ipnautogenerator","version":null},{"name":"OrderNotesTemplates","slug":"ordernotestemplates","version":null},{"name":"Brother Labels","slug":"brother","version":"1.0.0"}]

Please verify if you can reproduce this bug on the demo site.

  • I can reproduce this bug on the demo site.

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugIdentifies a bug which needs to be addressedquestionThis is a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions