Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
6 Trả lời
5975 Lượt xem

Hi,

after invoice report inheritance's the report aoutput still in english. but my customer language setting is in french. Below the code.


<template id="report_invoice_document_hotel" inherit_id='account.report_invoice_document'>
<div class='page' position="replace">


After </template>

i add another template for the translation.

   <template id="report_invoice_hotel" inherit_id="account.report_invoice">    
<t t-call="report.html_container" position="replace">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="hotel.report_invoice_document_hotel" t-lang="o.partner_id.lang"/>
</t>
</t>
</t>
</template>

I oblige to to add this second template because Odoo still load the parent template(account.report_invoice_document).

It is so urgent for me!

Thanks

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Hi,

I find the solution. My first code is correct. My problem come from the fact that the invoice report is set by default to reprint the old version of the report. I change this configuration on the report technical menu and then i regenerate the transalation and every thinks is ok.

Thanks.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

delete the existing invoice from database. once it is generated, it keeps downloading...

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Fatih,

i did like you said. It is not working

did you re-generate the translation terms and updated? noticed you have different ID for your invoice template.

Tác giả

Yes i re-generate translation terms and update.

I also set different ID for my custom invoice template :

<template id="report_invoice_document_hotel" inherit_id='account.report_invoice_document' primary="True">

can you pick some terms and search them in translations to see how many opts are in db and their target language. if still nothing is happening, force reloading with override from shell, then clean up again.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 25
4893
0
thg 6 23
1897
0
thg 7 21
2150
8
thg 6 20
61636
1
thg 3 19
6943