Tower: upload laundry_management 19.0.19.0.4 (via marketplace)
This commit is contained in:
30
addons/laundry_management/views/account_move_views.xml
Normal file
30
addons/laundry_management/views/account_move_views.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Hide standard "Register Payment" buttons on laundry invoices.
|
||||
Cashiers must pay via the laundry order wizard, not the invoice form. -->
|
||||
<record id="view_move_form_laundry_inherit" model="ir.ui.view">
|
||||
<field name="name">account.move.form.laundry</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<!-- Inject hidden helper field so invisible expressions can reference it -->
|
||||
<xpath expr="//header" position="inside">
|
||||
<field name="is_laundry_invoice" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Primary Pay button (no outstanding) -->
|
||||
<xpath expr="//button[@id='account_invoice_payment_btn']" position="attributes">
|
||||
<attribute name="invisible">is_laundry_invoice or state != 'posted' or payment_state not in ('not_paid', 'partial', 'in_payment') or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt') or invoice_has_outstanding</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Secondary Pay button (with outstanding) -->
|
||||
<xpath expr="//button[@id='account_invoice_payment_secondary_btn']" position="attributes">
|
||||
<attribute name="invisible">is_laundry_invoice or state != 'posted' or payment_state not in ('not_paid', 'partial', 'in_payment') or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt') or not invoice_has_outstanding</attribute>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user