4

I am trying to start with odoo. One of the most import thing for us would be to generate different layout for sale orders.

I've started with this document: https://github.com/odoo/odoodays-2014/blob/master/v8_reporting_engine/index.rst

It is from the "odoodays 2014" and shows how to customize an existing report. This works fine. I don't understand the points under "Generic / particular report".

Now I'm lost trying to add a new report (starting with a copy of the exisiting report) with a custom template. I've tried to add a new item in the report view in settings, but I can't add any linked qweb views (I've added a new one, but it didn't get a new ID).

I've tried to create a copy in the views directory of the addon but it didn't help.

Is there any tutorial for this ?

Is there somebody who can give me some pointers how to add a new report ?

bernhardrusch
  • 11,670
  • 12
  • 48
  • 59
  • If you have several sales order layouts, how would you decide which one you will use for a particular case? Is there going to be some kind of validation required for choosing the correct layout? – César Oct 31 '14 at 14:56
  • No. This is just a users' choice at this point. – bernhardrusch Nov 03 '14 at 07:41
  • Well in that case you should use the `t-call` according to user choice: [calling sub-templates](https://www.odoo.com/documentation/8.0/reference/qweb.html#calling-sub-templates). Also, you should show some code of what you've been trying at this point – César Nov 03 '14 at 14:28
  • 1
    I've written my solution as an answer to the question - thank you for your help ! – bernhardrusch Nov 06 '14 at 15:07

1 Answers1

3

After searching around I've come to this solution. I've translated all the menu headers from German, because I'm using Odoo in German.

  • reports are listed in Settings / Reporting / Reports
  • you can click one of the reports
  • if you edit one of the reports you can click on "Search for linked QWeb Views" - you can click and change these views. They are in HTML and are used for the data in the reports

New reports are typically added with a plugin.

If you would like to change the report with the website editor you can install the website builder. If you change one of the reports from PDF to HTML (in Settings / Reporting / Reports) you get a popup when you're generating the report.

In this popup you can change the report template. With this you can change the template with the website builder tools.

These reports are saved in the database in the table ir_ui_view. If you change to another database they still have the original reports (this was my big fear - that changing the reports changes them for all databases).

Header and footer are still changed in the company settings with RDL.

So basically everything from the odoodays-2014 document is working like they've showed on this website - it was just pretty hard to find out how these things worked.

bernhardrusch
  • 11,670
  • 12
  • 48
  • 59