Odoo Help

9
9 Answers
13
Avatar

IBS Group

--IBS Group--
1332
| 4 6 8
Tetouan, Morocco
--IBS Group--

We are ranked Top 3 🥉  in odoo's 🔐 Security Research Program.

We develop and maintain Odoo applications and Mobile apps for more than 25 businesses and SMEs around the world operating in logistics, trade, industry and services.

We also extend existing Odoo implementations beyond their functional and technical limitations, by integrating new modules like ones related to Data Migration, Business Intelligence and Data Analytics.

We also connect odoo to any external system like Salesforce, Magento, Prestashop, ...

We speak 🇲🇦 (Arabic) 🇬🇧 (English) 🇫🇷 (French) 🇪🇸 (Spanish)

We operate from 🇲🇦 (Morocco) and 🇧🇪 (Belgium)

📫 us at contact@odoo.ma or 🤙 📱 at +212 (0) 539 99 29 18 / +32 (0) 2 361 40 88
🔗 Visit our website http://www.odoo.ma

IBS Group
3/26/13, 5:37 PM

Note: Make sure you have administration privileges and in user Access Rights you have Technical Features checked.

You need the following:

  • A new/modified/existing RML invoice template that should be saved in addons/account/report or anywhere you like.
  • a new Report Action
  • and an Action Binding for it.

Report Action

  • Go to Settings->Technical->Actions->Reports and search for invoice
  • click the More drop down list and select Duplicate to create a new identical entry, all you have to change is the Name and the Report File location

Action Binding

  • Go to Settings->Technical->Actions->Action Bindings
  • Again look up invoice
  • Duplicate it the same way you did for the report, but in Action (change only) write the name of the new report you just created earlier.

You are done, you will now have 2 options in the invoice Print drop down list.

You can have as many reports as you like and this works for all other types of reports, not just invoices.

PS: Make sure that the Action Binding for the new Report has the Qualifier set to client_print_multi

Update: You need a report python file to define the report service, this is an example for a secondary invoice report:

import time

from openerp.report import report_sxw

class account_invoice_secondary(report_sxw.rml_parse):
    def __init__(self, cr, uid, name, context=None):
        super(account_invoice_secondary, self).__init__(cr, uid, name, context=context)
        self.localcontext.update({
            'time': time, 
        })

report_sxw.report_sxw( 'report.account.invoice.secondary', 'account.invoice', 'account/report/account_invoice_secondary_report.rml', parser = account_invoice_secondary )

Make sure to configure your report to have the service name account.invoice.secondary

name your file account_invoice_secondary_report.py and put it in account/report/ and lastly, import it in accounts/report/__init__.py

Restart your server and it should work.

24 Comments
Christian Douville
3/29/13, 2:22 PM

Hi, just wondering how you sorted it out. I followed step by step the whole procedure, and still the same first rml report is used, whatever the line i am using in the Print drop down list.

IBS Group
3/29/13, 2:27 PM

Did you change the Report File field in your new report? Because it should be different from the default one.

Christian Douville
4/2/13, 8:38 AM

Yes, this was the first field value changed. Does it work on your side with two different Report files ?

IBS Group
4/2/13, 9:16 AM

It should, is your server on a Windows machine?

Christian Douville
4/2/13, 9:18 AM

Nope, this is a Linux one

Christian Douville
4/4/13, 5:20 AM

Hello. Looking now to the script from the module, i seems the module is able to process only one single entry (the first one) within the Settings - Technical/Actions/Reports record set. Hence, it cannot work the way i was expecting. And the only way i can imagine now is to manage the Security tab so that i make sure that a User can "see" only one entry within the set, and so should the expected behavior be ensured.

IBS Group
4/4/13, 9:52 AM

Did you make sure that the corresponding Action Binding has the Qualifier set to client_print_multi ?

Christian Douville
4/4/13, 9:56 AM

Yes, i did. As i am not able to illustrate the module script which keep the only first occurrence for processing, there is nothing much i can provide, else than a suspicion on the script from the module. Thanks.

Rebel
4/9/13, 10:02 AM

I have followed your instructions to the letter, but I still have only one option under my dropdown. I am using Windows, does this work differently for this OS?

IBS Group
4/9/13, 7:54 PM

It should work for Windows, please make sure that the Action Binding for the new Report has the Qualifier set to client_print_multi

Rebel
4/10/13, 8:04 AM

Well I tried numerous times but haven't got it set up yet. :(

To recapitulate, there are two things which I am not entirely certain of; based on your description. For "Action Bindings" you say "look up Invoice"; do you mean the binding "Invoice" (account.analytic.account) or "account.invoice" (account.invoice)? [I already tried both, but want to be sure now]

Also for the "Action (change only)" field, I am not sure if I did it right. I made a new record with: Name = account_print_invoice_FR.rml, Type of action = ir.actions.report.xml. Do I need to select an existing record, which one?

Rebel
4/10/13, 8:05 AM

I already had the qualifier set to client_print_multi, as you recommended higher up in the thread.

UPDATE: I can't edit the above comment, but I figured I should use "ir.actions.act_window" as type for the action instead of what I specified earlier. I also guess I should use "Invoice" (account.analytic.account), rather than "account.invoice"; because otherwise it will result in view errors on the invoices. HOWEVER: it still doesn't work. :/ I can't figure out what I'm doing wrong, as I've done it over 10 times by now - and am convinced my settings appear to be configured correctly.

IBS Group
4/20/13, 3:19 PM

What is the name of the report you are trying to print?

Rebel
5/2/13, 11:40 AM

currenrtly invoiceFR.rml

Mibo, Michael Bos
6/22/13, 7:57 AM

I tried this solution and It worked perfect for me!

Many, Many thanks for your answer Karim!

If anybody want to know my exact steps please let me know.

With Kind regards,

Michael Bos

Ps. I made a brand new incoming shipment document, with print options and all.

Mahmoud
7/8/13, 6:51 AM

the same like the old report, Kindly Michael let me know how i can do it

Mohamed Essakali
7/14/13, 4:21 PM

thanks it works for me

Macopedia Sp. z o.o, Dariusz Kubiak
7/30/13, 1:26 PM

I have two invoices: have account_print_invoice.rml and account_print_invoice_new.rml I duplicated invoice records in Reports and Action Bindings. The name in Reports is Invoice New and Report File is account/report/account_print_invoice_new.rml The name in Action Bindings is Invoice New and Action Reference is ir.actions.report.xml,334 – which links to Reports / Invoice New. There are two options under Invoice / Print button: Invoice and Invoice New, which is correct. The PROBLEM is both print account_print_invoice_new.rml. I can not print the default account_print_invoice.rml anymore. Why???

Mayte Montaño
8/7/13, 2:25 PM

I have the very same problem as 62552; both print the same form; I am using v7 for Windows and just cant figure out WHY!

phoebe
8/20/13, 3:35 AM

same problem with 62552, 57672, I'm using ubuntu 12.04 , openerp v7. Anyone know how to solve this?

waqar
9/12/13, 5:47 AM

This is really nice solution but i got a problem (Report has not been downloaded Detail: URL seems to be an unsupported one) when i try to modify new report through openoffice (modify existing report).

Manuel Fernando Caicedo
12/3/13, 3:08 PM

Michael Bos let us know how do yo do it?

Mibo, Michael Bos
12/11/13, 3:02 AM

I am sorry for my late reaction. I am not nearby a real computer untill the weekend. I will then post this as a solution. Thank you!

Atul Kumar jain
6/2/14, 8:36 AM

Hello Thanks it's work for me , but the problem in traslation i can not translate my second invoice which directory is same as invoice directory

2
David Birchmier
12/27/14, 8:50 PM

I created a step by step guide with screenshots on how to do this using Odoo v8. I struggled with this for a long time (being new to Odoo myself) and I hope this guide will help save others the same frustration I went through.

 

Here's the guide to Create Multiple Invoice Templates in Odoo v8:
http://www.askmpa.com/creating-multiple-invoice-templates-in-odoo-v8/

2 Comments
Pascal Tremblay
2/10/15, 7:38 AM

link is dead

David Birchmier
2/11/15, 1:20 AM

Still working here, Pascal: http://www.askmpa.com/creating-multiple-invoice-templates-in-odoo-v8/ Is there an error you're getting?

2
Sandra Weiß
2/4/14, 10:04 AM

hi all,

we spent a lot of time figuring out how to make multiple layouts working. finally we did it and we wan't to share our experiences with you.

for a detailed documentation about creating multiple sale order layouts have a look at the following link. this documentation may also be used to create other additional layouts/reports.

10 seconds later: when trying to post this answer I received: "Could not post, because your karma is insufficient to publish links"

therefore: please go to www.onestep2.at/en -> Support -> Knowledge database -> OpenERP - FAQ -> OpenERP7 - Multiple sale order, invoice layouts, reports

we used a lot of images for documentation purposes. therefore we're not able to do a simple copy/paste to this forum.

direct link to the documentation article at oneStep2: www.onestep2.at/en/forum/openerp7-multiple-sale-order-invoice-layouts-reports

kind regards, sandra oneStep2

3 Comments
Iñaki Resúa Villanueva
2/4/14, 12:11 PM

Thank's Sandra. I follow your steps but when I duplicate the action binding I can't see the action (change only) previusly created. I don't have Quotation / Order / Other_layout because It isn't an action it's an action report. Thanks in advance

Sandra Weiß
2/10/14, 5:19 AM

Hi, yes, it is an action, but it can be selected if you have previously created this new report...did you follow step by step our documentation?

Atul Kumar jain
6/2/14, 8:37 AM

Hello Thanks it's work for me , but the problem in traslation i can not translate my second invoice which directory is same as invoice directory

1
yeshwanth
2/10/15, 5:31 AM

Friends i too faced the same problem and got a solution. 

We can create a duplicate invoice from the existing one. check this link : http://www.askmpa.com/creating-multiple-invoice-templates-in-odoo-v8/

Thank you and Enjoy

0
Mantavya Gajjar (mga)
7/15/14, 12:43 AM

It is not that much complex to define multiple invoices for the invoice, you might not have seen https://www.odoo.com/apps/7.0/l10n_in_tax_retail_invoice/ module that already support printing of multiple invoices with configuration. of course if your own custom format installed it will detect and print up on the configuration

May be it is not direct solution but it gives you best example to keep and print invoices in multiple layouts.

0
Julius
10/23/13, 1:54 PM

I have two invoices: have account_print_invoice.rml and account_print_invoice_new.rml I duplicated invoice records in Reports and Action Bindings. The name in Reports is Invoice New and Report File is account/report/account_print_invoice_new.rml The name in Action Bindings is Invoice New and Action Reference is ir.actions.report.xml,334 – which links to Reports / Invoice New. There are two options under Invoice / Print button: Invoice and Invoice New, which is correct. The PROBLEM is both print account_print_invoice_new.rml. I can not print the default account_print_invoice.rml anymore. Why???

I can confirm this bug is lasting for months ... The two reports print the same thing, when they're created as explained by Karim

2 Comments
adn
10/26/13, 8:46 AM

prueba modificando los ficheros: __init__.py y account_print_invoice_new.py

Atul Kumar jain
6/2/14, 8:39 AM

Hello Thanks it's work for me , but the problem in traslation i can not translate my second invoice which directory is same as invoice directory

0
Ben Brosch
11/14/14, 11:03 AM

I found this article for Odoo 8 using multiple QWeb reports: http://odoo.guide/multiple-report-layout-step-by-step/

It worked for me in testing environment. But I'm not sure if one should use direct table manipulation via SQL statements in production systems.

0
Mahmood AlAsfoor
8/29/14, 4:08 PM

Thanks for this great enhancement How can I print customer detail on POS Receipt/tickets

0
Avatar

patrick

--patrick--

1961
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
3/26/13, 1:47 PM

I have noticed that when you use the default invoices, it will be translated into the language of the language you have defined the user. I have not checked what will happen if you have a customer/company in language A and the invoice address is with someone in language B.

I expect that it will use the language depending on whom you send the various reports/orders.

In order for the documents to be translated, you have to load / import the appropriate language.

Settings -> Load a Translation.

After this, you can specify another language on the user, so the system might try to translate (using strings in the database, don't expect magic) the standard documents.

If you have customized documents and/or modified text, you have to add those strings to the database as well. I have not done that yet, so I cannot give you any answers/hints regarding this issue.

2 Comments
waqar
9/12/13, 5:54 AM

This is really a nice tutorial but I got problem (Report has not been downloaded Detail: URL seems to be an unsupported one) when I tried to modify new report through openoffice(modify existing report). I just copy purchase_requisition.rml file and paste somewhere else and rename this file comparative_statement.rml and again paste this file in report folder of purchase requisition and follow the procedure that you have mentioned above, now I am able to see two option under print button both are working but my question is how to modify new report comparative statement?

Atul Kumar jain
6/2/14, 8:38 AM

Hello Thanks it's work for me , but the problem in traslation i can not translate my second invoice which directory is same as invoice directory

Ask a Question
Writer
Keep Informed
14 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now