[IMP] sale: do not display 'Create Invoice' button without sale_management
This commit is contained in:
@@ -184,12 +184,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order" class="o_sale_order">
|
||||
<header>
|
||||
<button name="%(action_view_sale_advance_payment_inv)d" string="Create Invoice"
|
||||
type="action" class="btn-primary"
|
||||
attrs="{'invisible': [('invoice_status', '!=', 'to invoice')]}"/>
|
||||
<button name="%(action_view_sale_advance_payment_inv)d" string="Create Invoice"
|
||||
type="action" context="{'default_advance_payment_method': 'percentage'}"
|
||||
attrs="{'invisible': ['|',('invoice_status', '!=', 'no'), ('state', '!=', 'sale')]}"/>
|
||||
<button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="btn-primary"/>
|
||||
<button name="action_quotation_send" type="object" string="Send PRO-FORMA Invoice" groups="sale.group_proforma_sales" class="btn-primary" attrs="{'invisible': ['|', ('state', 'in', ['sent', 'sale']), ('invoice_count','>=',1)]}" context="{'proforma': True}"/>
|
||||
<button name="print_quotation" string="Print" type="object" states="draft" class="btn-primary o_sale_print"/>
|
||||
|
||||
@@ -81,6 +81,14 @@
|
||||
<xpath expr="//group[@name='sale_pay']/field[@name='invoice_status']" position="attributes">
|
||||
<attribute name="invisible" eval="False"/>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='action_quotation_send']" position="before">
|
||||
<button name="%(sale.action_view_sale_advance_payment_inv)d" string="Create Invoice"
|
||||
type="action" class="btn-primary"
|
||||
attrs="{'invisible': [('invoice_status', '!=', 'to invoice')]}"/>
|
||||
<button name="%(sale.action_view_sale_advance_payment_inv)d" string="Create Invoice"
|
||||
type="action" context="{'default_advance_payment_method': 'percentage'}"
|
||||
attrs="{'invisible': ['|',('invoice_status', '!=', 'no'), ('state', '!=', 'sale')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user