Giter Site home page Giter Site logo

frappe / print_designer Goto Github PK

View Code? Open in Web Editor NEW
164.0 17.0 83.0 829 KB

Visual print designer for Frappe / ERPNext

License: GNU Affero General Public License v3.0

Python 8.51% JavaScript 37.81% HTML 8.13% SCSS 5.00% Vue 40.36% Shell 0.19%
erpnext frappe frappe-framework

print_designer's Introduction

Print Designer

 Print Designer Logo

Frappe app to design print formats using interactive UI.

Features and How to Guides

Create Print Format

Using Awesomebar

Create.Print.Designer.Format.mov

Using Print Page

Create.Print.Designer.Format.mov

Static & Dynamic Image

Static Image

Static.Image.mov

Dynamic Image

Dynamic.Image.mov

Static & Dynamic Text

Dynamic Text

Dynamic.Text.mov

Static Text

Static.Text.mov

Rectangle & Layouts

Rectangle

Rectangle.mov

Child Table

Table.Element.mov

Installation

Warning

Please note that print designer is only compatible with develop and V15 version of frappe framework.

Local

To setup the repository locally follow the steps mentioned below:

  1. Install bench and setup a frappe-bench directory by following the Installation Steps
  2. Start the server by running
bench start
  1. In a separate terminal window, create a new site by running
bench new-site print-designer.test
  1. Map your site to localhost with the command
bench --site print-designer.test add-to-hosts
  1. Get the Print Designer app
bench get-app https://github.com/frappe/print_designer
  1. Install the app on the site.
bench --site print-designer.test install-app print_designer
  1. Open http://print-designer.test:8000/ in your browser and go through the setup wizard.

  2. After the setup is complete now open http://print-designer.test:8000/app/print-designer/


Contributions and Community

There are many ways you can contribute even if you don't code:

  1. You can start by giving a star to this repository!
  2. If you find any issues, even if it is a typo, you can raise an issue to inform us.

FAQ

  1. Incorrect PDF Page Size

    wkhtmltopdf --version
    
    • output should be similar to wkhtmltopdf 0.12.6 (with patched qt)
  2. Mac Installation Error

    • If error has npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] it means that there aren't any pre-built binaries for your system so it will try to compile them and in order to do that you need
    • Xcode Command Line Tools xcode-select --install
    • HomeBrew and brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman
    • If you have xcode 10.0 or higher installed, in order to build from source you need NPM 6.4.1 or higher npm install -g npm@latest.
  3. Linux ARM CPU Installation Error

    • If error has node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] it means that there aren't any pre-built binaries for your system so it will try to compile them
    • In order to do that you need sudo apt-get update && sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

License

GNU Affero General Public License v3.0

print_designer's People

Contributors

ankush avatar batonac avatar cgallay avatar dependabot[bot] avatar humenth avatar maharshivpatel avatar surajshetty3416 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

print_designer's Issues

Invalid file path

Invalid file path: print_designer.bundle.js
ERPNext: v13.42.1 (version-13)

Upon entering this will appear

Infinite loop if referenced doc deleted.

There's an issue at present with a the Print Designer if/when the doc originally referenced for the design is deleted.

Steps to reproduce:

  1. Create a new print format with the Print Designer and reference a doc for the specified DocType field preview.
  2. Save the print format and delete the referenced doc.
  3. Re-open the print format in print designer.

Expected behavior:

  • Referenced doc is cleared, new one can be set.
  • Field previews update based on values from the new referenced doc.

Actual behavior:

  • On opening print format, a "Not found" message is printed.
  • After closing message, the autocomplete link field gives a list of other docs, but any selection is cleared.
Referenced.doc.error.mp4
  • The browser dev tools reveal an infinite loop in the data-ajax-state attribute on the body tag.
Ajax.error.mp4

feat: Copy/paste Elements

Here again! This tool would be much-improved with the added ability to copy and paste elements, both inside a given print format, and between print formats. Just starting out by supporting keyboard shortcuts would be swell, and moving out to an app-specific context menu would be even better!

feat: Conditional display

It would be great to add the ability to show/hide any element in a print format based on document conditions.

Consider the following example, where I have boxes for various dynamic fields, not all of which will always be populated in a given document:
image

On the 'Project/PO' rectangle in the shown example, I'd like to choose to only display it if the Customer's Purchase Order field is set in a given doctype. I believe that the existing frappe.ui.FilterGroup could provide a good user experience for this, and I suggest adding a checkbox and FilterGroup in the following arrangement to the settings sidebar:
image

These selections, of course, would need to be transposed into Jinja if statements which enclose the conditional elements.

Ability to add dynamic fields from linked doctype inside table

Hi,

Is there a way to add multiple lines on the text (description field) on the line tables. So as an example. I have lines on an invoice that needs to print under the description of the part (say a notebook) additional data from different connected doctypes, like serial numbers and if there are any asset tags on that serial number (this asset tag field will be a custom field added to the serial number doctype).

example:
"HPI ProBook 450 G9 Intel Core i7 1255U Processor 12M Cache up to 4.7 GHz 15.6 FHD UWVA eDP
Serial Number: DG44643DHB - IT:29485A"

Item description : HPI ProBook 450 G9 Intel Core i7 1255U Processor 12M Cache up to 4.7 GHz 15.6 FHD UWVA eDP
Serial Number of the item on invoice: DG44643DHB
Asset Tag attached to serial number: IT:29485A

this will show for any other line as well the same principle if its serialised or batch numbered.

I hope this is clear - thank you for a great product thus far.

Kind regards
Hemant

Invalid file path error

An error pops up when I select print designer > create new> select doctype > give it a name and then click on create

Message
Invalid file path: print_designer.bundle.js

could you please help ?
image

How does print designer handles print format pagination?

Most of the problems I find when building print formats is handling pagination.

If I use the default pagination provided by frappe (using css counters / page breaks ) it works fine, but if I need more control over how items are shown this way of doing it quickly breaks down.

For example designing a format where the tax field appears empty in every page but filled on the last, showing a QR code only on the third page, showing pagination on a specific place in the header.

How does print_designer handle pagination? Is there a way to handle this use cases?

Thank you,
João

Error install

Error installing

bench get-app https://github.com/frappe/print_designer
A directory for the application 'print_designer' already exists. Do you want to continue and overwrite it? [y/N]: y
INFO: App moved from apps/print_designer to archived/apps/print_designer-2023-08-05_1
Getting print_designer
$ git clone https://github.com/frappe/print_designer  --depth 1 --origin upstream
Cloning into 'print_designer'...
remote: Enumerating objects: 99, done.
remote: Counting objects: 100% (99/99), done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 99 (delta 3), reused 54 (delta 1), pack-reused 0
Receiving objects: 100% (99/99), 513.62 KiB | 4.39 MiB/s, done.
Resolving deltas: 100% (3/3), done.
Ignoring dependencies of https://github.com/frappe/print_designer. To install dependencies use --resolve-deps
Installing print_designer
$ /home/erp/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/erp/frappe-bench/apps/print_designer
$ yarn install
yarn install v1.22.19
warning ../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning "@interactjs/modifiers > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
[4/4] Building fresh packages...
Done in 12.09s.
$ bench build --app print_designer
Linking /home/erp/frappe-bench/apps/frappe/frappe/public to ./assets/frappe                                             Linking /home/erp/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules                                 Linking /home/erp/frappe-bench/apps/print_designer/print_designer/public to ./assets/print_designer                     Linking /home/erp/frappe-bench/apps/print_designer/node_modules to ./assets/print_designer/node_modules                 Linking /home/erp/frappe-bench/apps/payments/payments/public to ./assets/payments                                       Linking /home/erp/frappe-bench/apps/hrms/hrms/public to ./assets/hrms                                                   Linking /home/erp/frappe-bench/apps/hrms/node_modules to ./assets/hrms/node_modules                                     Linking /home/erp/frappe-bench/apps/erpnext/erpnext/public to ./assets/erpnext                                          Linking /home/erp/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules                               ✔ Application Assets Linked


yarn run v1.22.19
warning ../../package.json: No license field
$ node esbuild --production --apps print_designer --run-build-command
✘ [ERROR] Could not resolve "pinia"

    ../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28:
      2 │ import { createPinia } from "pinia";
        ╵                             ~~~~~~~

  You can mark the path "pinia" as external to exclude it
  from the bundle, which will remove this error.

clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
✘ [ERROR] [plugin vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1  |
2  |  <link rel="preconnect" href="https://fonts.gstatic.com" />
   |
3  |  <link
   |  ^^^^^
4  |    v-for="currentFont in MainStore.currentFonts"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5  |    :key="currentFont"
   |  ^^^^^^^^^^^^^^^^^^^
6  |    :href="`https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap`"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7  |    rel="stylesheet"
   |  ^^^^^^^^^^^^^^^^^
8  |  />
   |  ^^
9  |  <AppHeader :print_format_name="print_format_name" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |  <div class="main-layout" id="main-layout">
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |    <AppToolbar :class="toolbarClasses" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |    <AppCanvas class="app-sections print-format-container" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |    <AppPropertiesPanel class="app-sections properties-panel" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |  </div>
   |  ^^^^^^

    ../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21:
      3 │ import Designer from "./App.vue";
        ╵                      ~~~~~~~~~~~

 ERROR  There were some problems during build

Error: Build failed with 2 errors:
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28: ERROR: Could not resolve "pinia"
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21: ERROR: [plugin: vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1  |
2  |  <link rel="preconnect" href="https://fonts.gstatic.com" />
   |
3  |  <link
   |  ^^^^^
4  |    v-for="currentFont in MainStore.currentFonts"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5  |    :key="currentFont"
   |  ^^^^^^^^^^^^^^^^^^^
6  |    :href="`https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap`"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7  |    rel="stylesheet"
   |  ^^^^^^^^^^^^^^^^^
8  |  />
   |  ^^
9  |  <AppHeader :print_format_name="print_format_name" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |  <div class="main-layout" id="main-layout">
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |    <AppToolbar :class="toolbarClasses" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |    <AppCanvas class="app-sections print-format-container" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |    <AppPropertiesPanel class="app-sections properties-panel" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |  </div>
   |  ^^^^^^
    at failureErrorWithLog (/home/erp/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1600:15)
    at /home/erp/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1246:28
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Terminated
error Command failed with exit code 143.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
    main()
  File "/home/erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/erp/frappe-bench/apps/frappe/frappe/commands/utils.py", line 86, in build
    bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
  File "/home/erp/frappe-bench/apps/frappe/frappe/build.py", line 256, in bundle
    frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
  File "/home/erp/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 98, in popen
    raise subprocess.CalledProcessError(return_, command)
subprocess.CalledProcessError: Command 'yarn run production --apps print_designer --run-build-command' returned non-zero exit status 143.
ERROR: bench build --app print_designer
subprocess.CalledProcessError: Command 'bench build --app print_designer' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 159, in get_app
    get_app(
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 444, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 242, in install
    install_app(
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 586, in install_app
    build_assets(bench_path=bench_path, app=app)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 351, in build_assets
    exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 158, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app print_designer


Print Format not showing in preview

I made a simple print format demo, everything seems to work fine.

Screenshot 2023-06-20 at 15 17 17

When i try to preview it, it doesn't show even though its selected as the print format to use.

Screenshot 2023-06-20 at 15 19 44

I looked through the logs and I don't see any errors

Load Fonts Locally instead of Google Fonts to improve performance.

I'm loving the new print designer, thanks so much for your work on it! That said, I am having a bit of an issue with the performance of the system. When non-print-designer print formats are used, the rendering feels instantaneous, but there's a noticeable lag on Print Designer formats, up to 7 seconds before the document is rendered. This is an obvious annoyance. How can I help diagnose the root cause?

Print design is not showing exactly the same output

the size in the design and location is different from the frappe
This is what it looks in frappe design
image

and this what looks on frappe
image

the location of the lines and text is not proportion and not accurate display

Z-axis on objects

This development is just great!

I have tried the app, and the only function that i can´t find is the z-axis, to change the order of the objects.

In other idea, i´m working to develop a way to have multiple print settings on frappe, perhaps diferent settings for company and doctype. Settings like paper size ¨Letter¨for Employee info print, and another print settings "Employe" for Customized paper size for id badging...

Thank you so much for the contribution

Child tables do not work properly

Good morning
I can't configure the application properly.
I have tried installing and reinstalling several times.
The first time I made the mistake of not adding the host

I even put it into production and I can't do it.
Child tables do not work.

I would like to at least know the internal workings in order to understand how to solve my problem.

Thanks in advance

Run in a Hyper-V VM, on Xubuntu 22.x
Frappe 15 (dev - latest at 27/09/2023)
image

Erpnext is not accessible

Hello ,my name is Makwin ,recently i have installed the print designer app for my erpnext version14 in frappe bench.
i saw some errors occurring as couldnot resolve pinia .
After the installation my erpnext site is not accessible i mean the UI has disturbed and i cant even login also.
Please let me know how can i solve this .

does print designer supports version 14 ?

Quill classes override styling of Text Editor dynamic fields

When inserting a dynamic HTML/Text Editor field into a Print Designer print format, the behavior of the field is not as expected.

  • Any <p> element in the dynamic HTML is given large margin, the equivalent to a few cm.
  • The font/formatting options on the element have little to no effect.

Consider the Terms and Conditions Details field of a Sales Invoice. I had to insert it on the Print Designer far above where I intended it to be placed:
image

In the actual rendering of the document, it is placed quite a bit lower:
image

And the font size is quite a bit larger than what's selected on the backend:
image

bench.exceptions.CommandFailedError: bench build --app print_designer

✘ [ERROR] Could not resolve "canvas"

../print_designer/print_designer/public/js/pdf.worker.min.js:22:25511:
  22 │ ...is.DOMMatrix&&a.isNodeJS&&(globalThis.DOMMatrix=require("canvas").DOMMatrix)}();!function checkPath2D(){if(globalThis.Pa...
     ╵                                                            ~~~~~~~~

You can mark the path "canvas" as external to exclude it from the bundle, which will remove this
error. You can also surround this "require" call with a try/catch block to handle this failure at
run-time instead of bundle-time.

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
✘ [ERROR] [plugin frappe-vue-style] Cannot read properties of undefined (reading 'outputs')

/home/ubuntu/devprod/apps/frappe/esbuild/frappe-vue-style.js:10:41:
  10 │       let files = get_files(result.metafile.outputs);
     ╵                                             ^

at /home/ubuntu/devprod/apps/frappe/esbuild/frappe-vue-style.js:10:42
at /home/ubuntu/devprod/apps/frappe/node_modules/esbuild/lib/main.js:1037:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This error came from the "onEnd" callback registered here:

/home/ubuntu/devprod/apps/frappe/esbuild/frappe-vue-style.js:9:8:
  9 │     build.onEnd((result) => {
    ╵           ~~~~~

at setup (/home/ubuntu/devprod/apps/frappe/esbuild/frappe-vue-style.js:9:9)
at handlePlugins (/home/ubuntu/devprod/apps/frappe/node_modules/esbuild/lib/main.js:840:23)

ERROR There were some problems during build

Error: Build failed with 2 errors:
../print_designer/print_designer/public/js/pdf.worker.min.js:22:25511: ERROR: Could not resolve "canvas"
/home/ubuntu/devprod/apps/frappe/esbuild/frappe-vue-style.js:10:41: ERROR: [plugin: frappe-vue-style] Cannot read properties of undefined (reading 'outputs')
at failureErrorWithLog (/home/ubuntu/devprod/apps/frappe/node_modules/esbuild/lib/main.js:1600:15)
at /home/ubuntu/devprod/apps/frappe/node_modules/esbuild/lib/main.js:1246:28
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Terminated
error Command failed with exit code 143.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ubuntu/devprod/apps/frappe/frappe/utils/bench_helper.py", line 104, in
main()
File "/home/ubuntu/devprod/apps/frappe/frappe/utils/bench_helper.py", line 19, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "/home/ubuntu/devprod/apps/frappe/frappe/commands/utils.py", line 65, in build
bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
File "/home/ubuntu/devprod/apps/frappe/frappe/build.py", line 254, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File "/home/ubuntu/devprod/apps/frappe/frappe/commands/init.py", line 98, in popen
raise subprocess.CalledProcessError(return
, command)
subprocess.CalledProcessError: Command 'yarn run production --apps print_designer --run-build-command' returned non-zero exit status 143.
ERROR: bench build --app print_designer
subprocess.CalledProcessError: Command 'bench build --app print_designer' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 132, in cli
bench_command()
File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 159, in get_app
get_app(
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 412, in get_app
install_resolved_deps(
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 514, in install_resolved_deps
app.install_resolved_apps(skip_assets=skip_assets, verbose=verbose)
File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 255, in install_resolved_apps
self.install(*args, **kwargs, resolved=True)
File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 242, in install
install_app(
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 586, in install_app
build_assets(bench_path=bench_path, app=app)
File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 351, in build_assets
exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
File "/usr/local/lib/python3.10/dist-packages/bench/utils/init.py", line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app print_designer

provide a decent starting template

Just like we provide a standard autogenerated format for each doctype. A good starting point is required for users to begin modifying and understanding how things work.

image

Editing Print Format vs Result - Gives different output

This is how it looks like for A4 in Report Builder
image

However, it looks completely different in the final output. The formatting is completed off.
image

Also, footer and header whatever we setting in the report builder is not displaying in the print format

Failed get-app https://github.com/frappe/print_designer

`yarn run v1.22.19
$ node esbuild --production --apps print_designer --run-build-command
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
✘ [ERROR] Could not resolve "pinia"

../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28:
  2 │ import { createPinia } from "pinia";
    ╵                             ~~~~~~~

You can mark the path "pinia" as external to exclude it from the bundle, which will remove this
error.

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
✘ [ERROR] [plugin vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1 |
2 |
|
3 | <link
| ^^^^^
4 | v-for="currentFont in MainStore.currentFonts"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | :key="currentFont"
| ^^^^^^^^^^^^^^^^^^^
6 | :href="https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | rel="stylesheet"
| ^^^^^^^^^^^^^^^^^
8 | />
| ^^
9 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |


| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |

| ^^^^^^

../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21:
  3 │ import Designer from "./App.vue";
    ╵                      ~~~~~~~~~~~

ERROR There were some problems during build

Error: Build failed with 2 errors:
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28: ERROR: Could not resolve "pinia"
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21: ERROR: [plugin: vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1 |
2 |
|
3 | <link
| ^^^^^
4 | v-for="currentFont in MainStore.currentFonts"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | :key="currentFont"
| ^^^^^^^^^^^^^^^^^^^
6 | :href="https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | rel="stylesheet"
| ^^^^^^^^^^^^^^^^^
8 | />
| ^^
9 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |


| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |

| ^^^^^^
at failureErrorWithLog (/opt/bench/erpnext/apps/frappe/node_modules/esbuild/lib/main.js:1600:15)
at /opt/bench/erpnext/apps/frappe/node_modules/esbuild/lib/main.js:1246:28
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Terminated
error Command failed with exit code 143.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 109, in
main()
File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name="bench")
File "/opt/bench/erpnext/env/lib/python3.10/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/opt/bench/erpnext/env/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/bench/erpnext/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bench/erpnext/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bench/erpnext/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/bench/erpnext/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/commands/utils.py", line 86, in build
bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
File "/opt/bench/erpnext/apps/frappe/frappe/build.py", line 257, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File "/opt/bench/erpnext/apps/frappe/frappe/commands/init.py", line 98, in popen
raise subprocess.CalledProcessError(return
, command)
subprocess.CalledProcessError: Command 'yarn run production --apps print_designer --run-build-command' returned non-zero exit status 143.
ERROR:
Traceback (most recent call last):
File "/home/erpnext/.local/bin/bench", line 8, in
sys.exit(cli())
File "/opt/bench/bench-repo/bench/cli.py", line 127, in cli
bench_command()
File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/bench/bench-repo/bench/commands/make.py", line 159, in get_app
get_app(
File "/opt/bench/bench-repo/bench/app.py", line 444, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/opt/bench/bench-repo/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/opt/bench/bench-repo/bench/app.py", line 242, in install
install_app(
File "/opt/bench/bench-repo/bench/app.py", line 586, in install_app
build_assets(bench_path=bench_path, app=app)
File "/opt/bench/bench-repo/bench/utils/bench.py", line 345, in build_assets
exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
File "/opt/bench/bench-repo/bench/utils/init.py", line 158, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError`

failed when bench get-app get-app https://github.com/frappe/print_designer

ecommerce_integrations 1.15.4
erpnext 14.15.1
frappe 14.36.0
helpdesk 0.8.3

ubuntu 22.04

Can't select column in child table

When i insert or use the pre-inserted table i can customize it. Can't select the data source for all column.

When i click this error show in the console. I'm not a vue develloper, how i can solve this ?
Or what step in installation i miss
image

PS : i use dev version of frappe (v15.0...) latest at this day. No issue durring installation and build
PPS : sry for my spelling

Feat: Allow printing hidden fields

I assume this may be controversial, so I'm raising it as an issue for discussion. Print Designer currently prevents the selection of any field with the attribute "Print Hide" set. This would seem justifiable on the surface, but I'm suggesting the removal of this limitation for the following reasons:

  1. The "Print Hide" field attribute is incredibly useful for auto-generated print formats. From that vantage point, it has enduring relevance for formats that are auto-generated, both by stock Frappe and, in the future, by the Print Designer. As such, they indicate the assumption of the DocType designer of whether a field should be included in a print-out by default.
  2. Many standard DocTypes have fields that could be and are relevant to include in certain print formats, which are marked "Print Hide" by default. For example, the Status field on the Sales Invoice is useful for indicating whether an invoice is paid on a print format, but it's marked "Print Hide" by ERPNext.
  3. Incorporating a dynamic field in a Print Format using the Print Designer requires a great deal of intentionality on the part of the user. Because fields are only added if they are explicitly wanted, this represents quite a different scenario from an auto-generated print format, which is the primary use-case for the "Print Hide" attribute.
  4. The "Print Hide" attribute is somewhat obscure, and it creates a very confusing UX for users when fields are obviously present on the DocType but not available for selection in the Print Designer.

In light of the above, I am proposing that the filter be removed and all fields become available for selection in the Print Designer, regardless of the "Print Hide" attribute.

Issue with Ubuntu installation - Vue issue ( yarn run v1.22.19 warning ../../../package.json: No license field $ node esbuild --production --apps print_designer --run-build-command ✘ [ERROR] Could not resolve "@vue/composition-api/dist/vue-composition-api.mjs" ../../../node_modules/vue-demi/lib/index.mjs:2:54: 2 │ import VueCompositionAPI, { getCurrentInstance } from '@vue/composition-api/dist/vue-composition-api.mjs' ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can mark the path "@vue/composition-api/dist/vue-composition-api.mjs" as external to exclude it from the bundle, which will remove this error. )

yarn run v1.22.19
warning ../../../package.json: No license field
$ node esbuild --production --apps print_designer --run-build-command
✘ [ERROR] Could not resolve "@vue/composition-api/dist/vue-composition-api.mjs"

../../../node_modules/vue-demi/lib/index.mjs:2:54:
  2 │ import VueCompositionAPI, { getCurrentInstance } from '@vue/composition-api/dist/vue-composition-api.mjs'
    ╵                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can mark the path "@vue/composition-api/dist/vue-composition-api.mjs" as external to exclude
it from the bundle, which will remove this error.

Installation error

Hi Maharshi,
thanks for your Print Designer App and your presentation on BuildWithHussain.

I've downloaded it from the github repo and tried installing it on my frappe site, but i get this error message:

An error occurred while installing print_designer: ('Module Def', 'Print Designer', IntegrityError(1062, "Duplicate entry 'Print Designer' for key 'PRIMARY'"))

Any help will be greatly appreciated, thanks.

Error when building print_designer

Getting print_designer
$ git clone https://github.com/frappe/print_designer --depth 1 --origin upstream
Cloning into 'print_designer'...
remote: Enumerating objects: 96, done.
remote: Counting objects: 100% (96/96), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 96 (delta 3), reused 56 (delta 1), pack-reused 0
Receiving objects: 100% (96/96), 512.21 KiB | 3.00 MiB/s, done.
Resolving deltas: 100% (3/3), done.
Ignoring dependencies of https://github.com/frappe/print_designer. To install dependencies use --resolve-deps
Installing print_designer
$ /home/office/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/office/frappe-bench/apps/print_designer
$ yarn install
yarn install v1.22.19
warning ../../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning " > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
warning "@interactjs/modifiers > @interactjs/[email protected]" has unmet peer dependency "@interactjs/[email protected]".
[4/4] Building fresh packages...
Done in 43.05s.
$ bench build --app print_designer
Linking /home/office/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules Linking /home/office/frappe-bench/apps/waba_integration/waba_integration/public to ./assets/waba_integration Linking /home/office/frappe-bench/apps/payments/payments/public to ./assets/payments Linking /home/office/frappe-bench/apps/wiki/node_modules to ./assets/wiki/node_modules Linking /home/office/frappe-bench/apps/print_designer/print_designer/public to ./assets/print_designer Linking /home/office/frappe-bench/apps/print_designer/node_modules to ./assets/print_designer/node_modules Linking /home/office/frappe-bench/apps/erpnext/erpnext/public to ./assets/erpnext Linking /home/office/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules ✔ Application Assets Linked

yarn run v1.22.19
warning ../../../package.json: No license field
$ node esbuild --production --apps print_designer --run-build-command
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
✘ [ERROR] Could not resolve "pinia"

../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28:
  2 │ import { createPinia } from "pinia";
    ╵                             ~~~~~~~

You can mark the path "pinia" as external to exclude it from the bundle, which
will remove this error.

✘ [ERROR] [plugin vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1 |
2 |
|
3 | <link
| ^^^^^
4 | v-for="currentFont in MainStore.currentFonts"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | :key="currentFont"
| ^^^^^^^^^^^^^^^^^^^
6 | :href="https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | rel="stylesheet"
| ^^^^^^^^^^^^^^^^^
8 | />
| ^^
9 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |


| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |

| ^^^^^^

../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21:
  3 │ import Designer from "./App.vue";
    ╵                      ~~~~~~~~~~~

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
ERROR There were some problems during build

Error: Build failed with 2 errors:
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28: ERROR: Could not resolve "pinia"
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21: ERROR: [plugin: vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1 |
2 |
|
3 | <link
| ^^^^^
4 | v-for="currentFont in MainStore.currentFonts"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | :key="currentFont"
| ^^^^^^^^^^^^^^^^^^^
6 | :href="https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | rel="stylesheet"
| ^^^^^^^^^^^^^^^^^
8 | />
| ^^
9 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |


| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |

| ^^^^^^
at failureErrorWithLog (/home/office/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1600:15)
at /home/office/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1246:28
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Terminated
error Command failed with exit code 143.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/office/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in
main()
File "/home/office/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/office/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/office/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/office/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/office/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/office/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/office/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/office/frappe-bench/apps/frappe/frappe/commands/utils.py", line 86, in build
bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
File "/home/office/frappe-bench/apps/frappe/frappe/build.py", line 257, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File "/home/office/frappe-bench/apps/frappe/frappe/commands/init.py", line 98, in popen
raise subprocess.CalledProcessError(return
, command)
subprocess.CalledProcessError: Command 'yarn run production --apps print_designer --run-build-command' returned non-zero exit status 143.
ERROR: bench build --app print_designer
subprocess.CalledProcessError: Command 'bench build --app print_designer' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/office/.local/bin/bench", line 8, in
sys.exit(cli())
File "/home/office/.local/lib/python3.10/site-packages/bench/cli.py", line 132, in cli
bench_command()
File "/home/office/.local/lib/python3.10/site-packages/bench/commands/make.py", line 159, in get_app
get_app(
File "/home/office/.local/lib/python3.10/site-packages/bench/app.py", line 444, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/home/office/.local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/home/office/.local/lib/python3.10/site-packages/bench/app.py", line 242, in install
install_app(
File "/home/office/.local/lib/python3.10/site-packages/bench/app.py", line 586, in install_app
build_assets(bench_path=bench_path, app=app)
File "/home/office/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 351, in build_assets
exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
File "/home/office/.local/lib/python3.10/site-packages/bench/utils/init.py", line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app print_designer

Not able to access print-designer in browser

I have hosted erpnext on AWS instance and it is multitenant site. On this instance, earlier I had 2 sites. To install print-designer app I have followed commands given on github. After this, print-designer.test site was created on which the app is installed. To access the site, I logged in to site by entering print-designer.test. But after entering the app name in URL, it is saying no app found

Show selected document record while creating print format

Currently, the latest updated document is shown as a preview while creating print format. Suggestion is to show the record from where the user has navigated. Consider the below example:

  1. I have two invoices, 01 and 02.
  2. 02 is the latest updated invoice.
  3. I open invoice 01 and try creating a new print format.
  4. The preview shown is of 02 which can leave the user confused.

Issues with Duplicating Print Formats

After working out the styling of one print format, it's nice to be able to utilize that work across other print formats. The most obvious way to do this would be to duplicate an existing format and re-assign the doctype, but this ends up being not very doable.

Steps to reproduce:

  1. Create a print format with Print Designer, populate it with fields specific to the selected doctype.
  2. Duplicate the print format from the print format list (outside print designer), assign the new print format to another doctype.
  3. Open the duplicate in Print Designer.

Expected behavior: The print format can be re-factored specific to the newly-selected doctype. Deprecated field and table assignments from the previous format can be re-assigned, while retaining placement and formatting from the original format.

Actual Behavior:

  • Deprecated field assignments from the previous doctype can be opened in the field selector, but they cannot be removed or reassigned. Clicking on the field in the text-editor/field-assignemnt modal freezes the whole editor.
  • A table can be deleted, but not re-assigned. Clicking into a column freezes the editor.

option to break inside table needed

Hello @maharshivpatel .... the generated PDF seems to have formatting issues shown below.

PDF screenshot

CleanShot 2023-07-02 at 14 30 26

The preview in the print designer shows up correctly. The Terms and Conditions field is the only field in the last page of the generated pdf.

Design preview is below:

CleanShot 2023-07-02 at 14 36 14

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.