question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML files for custom app Print Formats

See original GitHub issue

Description of the issue

I’m working for a company that has created multiple apps for internal use. We have been creating custom Print Formats for native DocTypes in the old fashion: With the html code in the .json. But we think that it would be nice to have those Print Formats as .html files, as it can be done when the Print Format is for a DocType native to the app that has the Print Format.

Context information (for bug reports)

The bug has no output. The behaviour is just not desired. The Print Format will not use the html file and just use the html field.

Steps to reproduce the issue

  1. Create a custom app
  2. Add to your app a Print Format for Sales Invoice with Standard in Yes, Print format type: Jinja, Custom format checked, and your app module.
  3. Create an html file with the scrubed name of the Print Format in the print_format folder of your module.
  4. Try to execute the Print Format

Observed result

The Print Format does not render the HTML file.

Expected result

It should render the HTML file as it does when your Print Format references a custom DocType from your app.

Additional information

The problem is in the printview.py file, in the line 254. I will create a PR with a possible solution.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
HoFakscommented, Feb 15, 2022

many thanks @Don-Leopardo ffor your interest i made the required modifications manual as you did in the PR tell the issue be marged to producation

and its working ok

0reactions
HoFakscommented, Feb 15, 2022

@ankush can marge this to producation please

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom print format for core DocTypes via custom app
I've created a new “Print Format” as follows and added a .html file also in the same directory where it auto generated a...
Read more >
Printing HTML documents - Android Developers
This lesson shows you how to quickly build an HTML document containing text and graphics and use WebView to print it. Load an...
Read more >
Print.js - Javascript library for HTML elements, PDF and image ...
Print.js is a tiny javascript library to help printing from the web. Print friendly support for HTML elements, image files and JSON data....
Read more >
HTML Service: Templated HTML | Apps Script
HTML Service: Templated HTML ; Scriptlets. Standard scriptlets; Printing scriptlets; Force-printing scriptlets ; Apps Script code in scriptlets.
Read more >
Printing - Frappe Framework
You can also add Custom HTML to your Print Format. Just drag and drop the Custom HTML button in left sidebar into your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found