Odoo Help

Welcome!

This community 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.

0

Custom Report Translations

By
Ayyappan
on 3/10/14, 5:50 AM 943 views

I have created the custom accounting report that is as same as accounting invoice template. I didn't change the template format also. While i am printing the report that is not changing the language based on customer language. I have tried what the below links mentioned but i ain't able to get the solution.

Links:

https://accounts.openerp.com/forum/Help-1/question/13723/ https://accounts.openerp.com/forum/Help-1/question/13210

My code:

my_module_name/report/my_report_file_name.py

import time
from openerp.report import report_sxw

class account_invoice_new(report_sxw.rml_parse):
    def __init__(self, cr, uid, name, context):
        super(account_invoice_new, self).__init__(cr, uid, name, context=context)
        self.localcontext.update({
            'time': time,
        })
report_sxw.report_sxw(
    'report.invoice',
    'account.invoice',
    'addons/account/report/account_print_invoice.rml',
    parser=account_invoice_new
)

my_module_name/my_xml_file.xml

<openerp> <data>

    <report
        auto="False"
        id="account_invoice_new"
        model="account.invoice"
        name="invoice"
        rml="account/report/account_print_invoice.rml"
        string="Invoice New"
        />

</data>

</openerp>

Note: I have also copied the "i18n" folder from accounting module and put in my module.

Please anyone can help me to translate the custom report.

please give me a guidance. i am getting stuck more than 2 days.

Ayyappan
on 3/11/14, 7:20 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/10/14, 5:50 AM
Seen: 943 times
Last updated: 3/16/15, 8:10 AM