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

Hello, I was trying to create a new report and was found out that <report> is already deprecated. May I know how can I use this binding_model_id?

<record id="account_invoices" model="ir.actions.report">
    <field name="name">Invoices</field>
    <field name="model">account.invoice</field>
    <field name="report_type">qweb-pdf</field>
    <field name="report_name">account.report_invoice</field>
    <field name="report_file">account.report_invoice</field>
    <field name="attachment_use" eval="True"/>
    <field name="attachment">(object.state in ('open','paid')) and
        ('INV'+(object.number or '').replace('/','')+'.pdf')</field>
    <field name="binding_model_id" ref="model_account_invoice"/>
    <field name="binding_type">report</field>
</record>
الصورة الرمزية
إهمال
أفضل إجابة

Hi , 

Odoo 14 deprecate <act_window> and <report> data tags.

If you define your report through a <record> instead of a <report> tag and want the action to show up in the Print menu of the model’s views, you will also need to specify binding_model_id from Bindings. It’s not necessary to set binding_type to report, since ir.actions.report will implicitly default to that.


Hope it Helps ,

Kiran K

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يوليو 22
40
2
يناير 23
7416
1
سبتمبر 24
7049
0
يناير 22
2224
0
أغسطس 21
0