تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4587 أدوات العرض

I have the following code in an XML file:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
    
    <template id="my_po_body" inherit_id="purchase.report_purchasequotation_document">
        <xpath expr="div[@class='page']" position="replace">
                <div class="row mt32 mb32">
                    <div class="col-xs-6">
                        <p style="font: bold 16px Helvetica;"><strong>Shipped From:</strong></p>
                    </div>
                    <div class="col-xs-5 col-xs-offset-1">
                        <p style="font: bold 16px Helvetica;">Ship To:</p>
                    </div>
                </div>
        </xpath>
    </template>
    
    <template id="my_po_main" inherit_id="purchase.report_purchasequotation">
        <xpath expr="//t[3]" position="replace">
                <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'my_module.my_po_body')"/>
        </xpath>
    </template>    
    
</data>
</openerp>

When I try to print an RFQ (report output type='HTML') then Odoo says it can't find 'my_module.my_po_body'.  I have tried removing 'my_module' and just using 'my_po_body' as the parameter in the translate_doc call, but then Odoo just tries to use 'website' as the module, and still can't find the view.  Why can't Odoo find the first defined view?

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

May have been a bug in an older version of Odoo.  I updated and created a clean database, and things seem to be working as expected.  I would delete the question, but can't!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
3937
2
مارس 15
6091
4
أكتوبر 21
6773
11
سبتمبر 21
31997
1
ديسمبر 19
7955