Edit print document after rendering

Hi everybody,

it is possible to edit print document after it is rendered by jinja template?

According to my knowledge (please correct me if I’m wrong), after pressing print button in detail view of record of any doctype, record is sent by system to jinja template and then rendered by it and shown on display. In some cases, I need to edit this result document as rich text or something similar after it is created so it is not about custom print template.

Is such a thing possible (even with a piece of code). Or maybe just to export RTF or something.

Thank you very much for any opinion.


@Tom3, this is not possible! What you can do is add a custom field, that is a TextEditor, and allow it to be edited after the doc is submitted, so you can change the content, that do you need send to Jinja, to it be rendered!

@Tom3, just for curiosity, what is the use case?

Thanks Max,

I thought about this option but I still hoped if there is more elegant way how to solve this. Anyway, I’ll try it and let you know if I was successful.

This case is about event and few persons assigned to it by different roles (not system roles but event roles). Then during the time, status of the event is changing and according to status I need ability to generate multiple kinds of documents for different persons with different roles assigned. After this, it is very often, maybe a rule, that when the document is created, operator of system must edit something small like “in case of bla bla” or add another name manually or just a note. The problem is, that need of these edits is not known before document is rendered.

I also thought about sending the document to ck editor or something to edit it but it is probably too complex for beginning.

1 Like

@Tom3, this is a really hard task!, I’m working in a feature like this, to manage business process, where each approval or revision should generate a justification, and the history of the changes in the process!

Have a year that I’m working in this, and is not ready yet!

Oh, I just thought about it in easier way. Wanted to call after edit of record some render method of Jinja object and html result save in edit tex filed. Just this simple but my knowledge of Jinja is poor right now so correct me if I’m wrong.