Easy PDF creator

by
Odoo

24.21

v 10.0 v 11.0 Third Party 22
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 1609
Technical Name easy_pdf_creator
LicenseLGPL-3
Versions 10.0 11.0
You bought this module and need support? Click here!

Easy PDF report creator module

This module allows us to create whatever model report you want that transmitting PDF report using few codes and much easy way. Now we will work on ODOO v9 and v10. While working these versions we will find out the following advantages.

Advantages:
  • No need of high knowledge of development (very few .PY codes will be written, but not to draw any model at .XML).
  • Easy to prepare report model. Work on HTML rich text editor (likely MS word)
  • Allows to create any model and report adjustment on any chosen model
  • All models shall be added default menu 'EasyPrint' on Sidebar menu. You only need to draw your template designs.
  • It shows a drawing on the model in any size
  • It gives a chance to merge, split, resize the Table
  • Create PDF in a short time and any desired model

It is described below using a example on stock.picking model.

Instructions

After installing Module ODOO to be loaded on Developer mode then Setting->Reports->Easy PDF creator menu appears on the screen. Here we should identify the report model. The screen displays the followings and most important 2 fields are described as below:



Field description:
  • Template name - Must be unique. This name will be used to find an adjusted report on the module.
  • Model name - It describes report model where it adjusted.

Create a model

Advantages:


It is very easy to prepare and adjust a model. Because we use HTML rich text editor. It is the same of MS word. There are two types: Constant text and variable (field's value)
  • Constant text should be written directly.
  • Any types of field's value located on the model will be adjusted as below (syntax)
Variables syntax:
  • Integer, Char, Float, Text, Date fields: These fields name will be written {} in brackets.
    Syntax: {field_1}, {field_2} etc.
    EG: {name}, {origin}
  • Many2one field: {} will be written in the brackets. As well as we can approach model field of Many2one field. So that : colon will be written too.
    Syntax: {many2one_field}, {many2one_field:field_1} .
    Example: {partner_id}, {partner_id:phone}, {partner_id:street}
  • One2many field: It will be written as below.
    Syntax: {one2many_field:{field1,field2,field3}}
    Example: product name, quantity, unit, price unit of move_lines of Stock.picking model are adjusted to be printed out.
    {move_lines:{product_id,product_uom,product_uom_qty,price_unit}}
  • Call function: It allows us to print out transmitted value using call function from the model. Function return value must be the types of: text, int, float.
    Syntax: {function_simple:your_function_name} .
    Example: {function_simple:_get_total_qty}
    Function example:
    @api.multi
    def _get_total_qty(self, ids):
    obj = self.env['stock.picking'].browse(ids)
    tot = sum(obj.move_lines.mapped('product_uom_qty'))
    return str(round(tot,3))

    Table can be created using returned value on template mode. So that the called function must be return the data using the following format.
    FORMAT: data = {'header':['col1','col2'],'data':[['112323','435345.5'],['23.4','56'],['234','345']]}
    Table header values should be described herein. Here are 2 column and 3 raw data. Data must be STRING type
    You can column names print to HORIZONTAL and VERTICAL. Syntax: {function_vertical:function_name}.
    EG: {function_vertical:_get_custom_data}
    {function_horizontal:function_name}.
    EG: {function_horizontal:_get_custom_data}
  • Binary and image field: Binary or Image field will be displayed without any size.
    Syntax: {image_field:field_name} .
    EG: {image_field:image_medium}
    - It allows to display the drawing with the measured sizes.

    Syntax: {image_field:field_name:width:height}.
    EG: {image_field:image_medium:128:128}
  • Drawing to be displayed indicating via URL: In order to display several drawings on the template mode, firstly, URLs to be showed up on Text field should be set using the following format.
    Format:
    [img.test.com/uploads/20160827/c8ad95ad0e7075.png,img.test.com/uploads/order_note/20170829/7d8df4bd453dc2fc10c.jpg]
    After that the text field should be indicated on the template mode.
    Syntax: {image_field_urls:field_name}
    EG: {image_field_urls:pic_urls}

Default Menu

When connecting EasyPrint button of Sidebar menu of all model with default template, it's easy to set template name as 'Default'.

Appearance

Raw pdf template:


After printing:


Connect prepared template and code

There are two steps in order to use the prepared model.
  • PRINT button should be added to XML view. It calls the print function.
  • python function should be written on the model where prepared
Detailed description in UserGuide folder (word file)

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
by
Doğan Üstündağ
on 7/29/18, 8:34 AM

It does not work on odoo11 primise!!


it is not installing
by
shaheen
on 6/20/18, 3:02 PM

there is error on the installation process


Installation error
by
lightlove530
on 6/17/18, 7:33 AM

The following is the error content, please repair or help use, thank you!


by
Reginaldo Oliveira de Jesus
on 9/2/20, 2:48 PM Confirmed Purchase

do you have version 12?


error instal odoo 11
by
Deyvys
on 7/2/19, 4:15 PM Confirmed Purchase

Modelo no encontrado: report.pdf.output Contexto del error: Vista `action.pdf.output.view` [view_id: 1453, xml_id: n/a, model: report.pdf.output, parent_id: n/a] None" while parsing /opt/odoo/odoo/addons/easy_pdf_creator/view/pdf_template_generator_view.xml:4, near action.pdf.output.view report.pdf.output


error
by
khouloud
on 9/7/18, 6:56 AM

I put template name as 'default' , i still have the same warning !


No errror
by
Amartuvshin.e
on 9/5/18, 12:33 AM Author

This is warning. You must set template design before use it. Template name should be 'default'


ERROR
by
khouloud
on 9/3/18, 10:15 AM

Not found template! Must be template name 'default'


It worked on odoo11
by
Amartuvshin.e
on 8/2/18, 10:35 PM Author

I configuring odoo11 test server, coming soon.


Not able to install for odoo11 on-premise
by
Doğan Üstündağ
on 7/27/18, 2:52 AM Confirmed Purchase

I have attemped many times to install on odoo11 on primise but not succeeded so far!


Its working very nice good luck
by
erdenebold
on 7/20/18, 4:20 AM

Error?
by
Amartuvshin.e
on 6/26/18, 3:21 AM Author

please insert email address. You check version. And Error post here.


Try it on demo server
by
Amartuvshin.e
on 6/8/18, 5:09 AM Author

Try it on demo server Hi, you can try this freeze module on http://202.70.40.98:6060 Username: demo Password: demo You see Sales->Sales->Sales Orders menu :) 1. Click EasyPrint button 2. Change or config Template on Sales->Easy PDF creator menu


Demo is coming soon
by
Amartuvshin.e
on 6/5/18, 8:21 AM Author

I config demo server. Coming soon. Finished it i will post info


I want to test it
by
Sergio
on 6/4/18, 10:55 AM

Hi! I think that this is all I was looking for, it seems like, but I would like to test it please. Could you please let me a demo for test it? thankss