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

Hello there,

Example :

in my custom module, I inherit sale.report_saleorder_document to create a new mycustom.report_saleorder_document.

This mycustom.report_saleorder_document is used for each company in my multi-company setup of Odoo 8.

Question :

What would be the easiest approach to have different view or different report for each company in our multi-company setup? Each company should have his own mycustom.report_saleorder_document (for example).

 

Idea?

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

You inherit this xml code, and add t-if="user.company_id.id == XXX":

<template id="report_saleorder">
    <t t-call="report.html_container">
        <t t-foreach="doc_ids" t-as="doc_id">

<HERE T-IF>
            <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"/>

</HERE T>
        </t>
    </t>
</template>

الصورة الرمزية
إهمال
الكاتب

Oh! You are my best zbik!

الكاتب

In my multi-company setup, I want different pos receipt/ticket for each company. Should it work also in a file like /Volumes/odoo/addons/report_lapagept/static/src/xml/pos.xml ???

I think you have found a solution?

الكاتب

It worked! First shot! Thanks a lot zbik.

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
فبراير 19
7327
2
يونيو 15
14326
1
سبتمبر 21
3626
8
يونيو 15
7444
1
مارس 15
5233