Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3197 Prikazi

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.

Avatar
Opusti
Avtor

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

Related Posts Odgovori Prikazi Aktivnost
0
okt. 24
1837
0
avg. 24
1634
0
jan. 24
2123
1
nov. 23
1841
0
jun. 23
2220