[IMP] sale: hide cancel button if record not saved
Purpose of this task is to clean up the orders interface with keeping just the needed action buttons. So in this commit we hide cancel button if the order is not saved yet. it will also hide the cancel button for the rental order. closes odoo/odoo#47579 Taskid: 2080191 Closes: #47579 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Barad Mahendra
parent
d678d516ef
commit
ca666a7778
@@ -277,7 +277,7 @@
|
||||
attrs="{'invisible': [('state', 'not in', ['draft'])]}"/>
|
||||
<button name="action_quotation_send" type="object" string="Send PRO-FORMA Invoice" groups="sale.group_proforma_sales" attrs="{'invisible': ['|', ('state', '=', 'draft'), ('invoice_count','>=',1)]}" context="{'proforma': True}"/>
|
||||
<button name="action_quotation_send" string="Send by Email" type="object" states="sent,sale"/>
|
||||
<button name="action_cancel" states="draft,sent,sale" type="object" string="Cancel"/>
|
||||
<button name="action_cancel" type="object" string="Cancel" attrs="{'invisible': ['|', ('state', 'not in', ['draft', 'sent','sale']), ('id', '=', False)]}"/>
|
||||
<button name="action_draft" states="cancel" type="object" string="Set to Quotation"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,sent,sale"/>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user