Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Raw Printing): Adding Support for qz-tray #7088

Merged
merged 9 commits into from Apr 19, 2019

Conversation

@karthikeyan5
Copy link
Collaborator

@karthikeyan5 karthikeyan5 commented Mar 18, 2019

Screenshots:

  • printing by raw commands for the first time
    raw-printing-from-print-view

  • creating a new Raw Commands print format
    raw-command-print-format

Documentation PR: frappe/erpnext_com#308

Copy link
Member

@rmehta rmehta left a comment

Also add code comments and docs

frappe/public/js/frappe/form/print.js Outdated Show resolved Hide resolved
frappe/public/build.json Outdated Show resolved Hide resolved
@karthikeyan5
Copy link
Collaborator Author

@karthikeyan5 karthikeyan5 commented Apr 4, 2019

todo:

  • add a print setting called "Enable Raw Printing"
  • Add more comments in the code
  • add documentation about instaling qz-tray right in the UI
  • add documentation about raw commands in the new print format UI
  • make a Documentation PR for "Raw Printing" Feature

@karthikeyan5 karthikeyan5 force-pushed the raw-printing branch 2 times, most recently from 2361208 to 32ba0c1 Apr 10, 2019
@karthikeyan5 karthikeyan5 requested a review from rmehta Apr 15, 2019
@rmehta
Copy link
Member

@rmehta rmehta commented Apr 16, 2019

@karthikeyan5 lets use "Printer Settings" instead of "Raw Print Settings"

the term "Raw Print" is not very user friendly

frappe/public/build.json Outdated Show resolved Hide resolved
frappe/public/js/frappe/form/print.js Outdated Show resolved Hide resolved
frappe/public/js/frappe/form/print.js Outdated Show resolved Hide resolved
> fixing confusing naming in the UI and calling it "Raw Print"
> used import for sha256 library
> changed the Print Preview message for raw print
> same possible codacy fixes
> qz-tray.js and sha256.min.js are loaded only on demand
> renamed 'raw print settings' button to 'Printer Settings'
> removed commented code
> fixed spelling mistakes
@karthikeyan5 karthikeyan5 requested a review from rmehta Apr 16, 2019
@rmehta rmehta merged commit 7817b4e into frappe:develop Apr 19, 2019
4 of 5 checks passed
@karthikeyan5 karthikeyan5 deleted the raw-printing branch Apr 19, 2019
@TurkerTunali
Copy link
Contributor

@TurkerTunali TurkerTunali commented May 17, 2019

@karthikeyan5 lets use "Printer Settings" instead of "Raw Print Settings"

the term "Raw Print" is not very user friendly

"Direct Print" may be more suitable. I've looked other ERP systems but they just name it as "Print". There are no more options.

@karthikeyan5
Copy link
Collaborator Author

@karthikeyan5 karthikeyan5 commented May 21, 2019

"Direct Print" may be more suitable.

@TurkerTunali "Direct Print" is a whole other thing according to most sources. It is related to sending a print directly from a device(like smartphones, desktops) without the need for a print server. Whereas, Raw Printing is related to sending native print commands(AKA Raw Commands) to a printer.
Also, the end user just sees a "print" button and not a "Raw Print" Button.

Please take a look at the ERPNext Raw Printing Documentation for more clarity on Raw Printing.

@dexterhussain
Copy link

@dexterhussain dexterhussain commented Mar 2, 2020

Can someone please tell me how i can use this?

@karthikeyan5
Copy link
Collaborator Author

@karthikeyan5 karthikeyan5 commented Mar 2, 2020

Can someone please tell me how i can use this?

@dexterhussain, have you gone through the documentation? https://erpnext.com/docs/user/manual/en/setting-up/print/raw-printing

Please ask specific questions after you have tried the steps in the documentation....

@dexterhussain
Copy link

@dexterhussain dexterhussain commented Mar 2, 2020

@dexterhussain
Copy link

@dexterhussain dexterhussain commented Mar 5, 2020

To elaborate my issue
can someone please help me in this?
https://discuss.erpnext.com/t/multi-serial-numbers-as-print/58815

version "0.9.0"
resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966"
integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==

js-yaml@^3.12.0, js-yaml@^3.9.0:
Copy link

@tresf tresf May 26, 2020

FYI, not sure where else to put this, but we've bundled the sha-256 library starting with 2.1.1 per qzind/tray#620. You're on 2.0.8, so you'll still need this, but just an FYI to the maintainer of the integration. 🍻

frappe.require(qz_required_assets,() => {
qz.api.setPromiseType(function promise(resolver) {
return new Promise(resolver);
});
Copy link

@tresf tresf May 26, 2020

Just an FYI, we do this internally for you starting with 2.1.1 (as well as the sha256 stuff in the lines following). 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants