Skip to Content
Menu
This question has been flagged
1 Reply
3932 Views

look code menu report in odoo 14

/" rel="ugc">ir.actions.report">
Commande Outgoing
purchase.order
qweb-pdf
microcred_profile.optesis_outgoing_id
microcred_profile.optesis_outgoing

(object.state in ('draft', 'sent') and 'Request for Quotation - %s' % (object.name) or
'Purchase Order - %s' % (object.name))

report



how use a domaine condition for visibility of this menu 

hide menu using condition state draft ,sent or other

Avatar
Discard
Author

<record id="optesis_report_outgoing_menu" model="ir.actions.report">
<field name="name">Commande Outgoing</field>
<field name="model">purchase.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">microcred_profile.optesis_outgoing_id</field>
<field name="report_file">microcred_profile.optesis_outgoing</field>
<field name="print_report_name">
(object.state in ('draft', 'sent') and 'Request for Quotation - %s' % (object.name) or
'Purchase Order - %s' % (object.name))</field>
<field name="binding_model_id" ref="model_purchase_order"/>
<field name="binding_type">report</field>
</record>

Best Answer

Here you are a work around for this:
https://www.odoo.com/forum/help-1/hide-print-option-when-in-draft-154272

Avatar
Discard
Author

Thanks you , but I want not create button in form view ;le bouton je le veux sous la bouton action et effectuer l'operation laba;

Related Posts Replies Views Activity
4
Dec 21
22712
2
Feb 24
670
1
Mar 15
7313
2
Sep 21
8353
1
Dec 20
3540