How do i remove Preview Button in draft Invoice \https://imgur.com/a/dH8h0Jv
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi,
You can add one more condition to the corresponding button, if you activate the developer mode and if you click the Debugger button -> Edit: View Form, you can see the code of corresponding views, from it you can see the Preview Button,
<!-- Preview (only customer invoices) -->
<button name="preview_invoice" type="object" string="Preview"
attrs="{'invisible': [('type', 'not in', ('out_invoice', 'out_refund'))]}"/>
So by default there is a condition to make the button invisible , so you have to add one more condition into it,
attrs="{'invisible': ['|', ('type', 'not in', ('out_invoice', 'out_refund')), ('state', '=', 'draft')]}"
This will make the button invisible in the draft state. Right now i have shown it by editing the code from UI/source code, you can apply same logic via custom module.
Thanks
hi, thanks for helping
i know how to activate developer mode but i can't find 'click the Debugger button -> Edit: View Form'
Make sure that you are admin or able to access tech features, for activating debug mode: https://www.youtube.com/watch?v=sRc4xYPza7g
Thanks a lot . it worked!
Hi, how can I disable print in draft invoice. (so many print button in odoo -.-)
https://imgur.com/a/nRs0eHD I want to disable my employee printing and deleting draft invoice.
Please help.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up