l10n-switzerland-flectra/l10n_ch_qr_bill/views/account_invoice_view.xml
Raphael Ritter 14a109dc87 [ADD] l10n_ch_payment_slip
[ADD] l10n_ch_zip
[ADD] l10n_ch_bank_statement_import_postfinance
2021-07-16 16:21:21 +02:00

50 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data>
<record id="qrr_invoice_form" model="ir.ui.view">
<field name="name">l10n_ch.account.move.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_has_outstanding']" position="after">
<field name="l10n_ch_qrr_sent" invisible="1"/>
<field name="l10n_ch_currency_name" invisible="1" readonly="1"/>
</xpath>
<xpath expr="//page[@name='other_info']//field[@name='partner_bank_id']" position="attributes">
<attribute name="attrs">{'readonly': [('state', 'not in', ['draft', 'open'])]}</attribute>
<attribute name="invisible">0</attribute>
</xpath>
<xpath expr="//page[@name='other_info']//field[@name='ref']" position="after">
<field name="l10n_ch_qrr_name" readonly="1" />
</xpath>
<xpath expr="//button[@name='action_register_payment']" position="before">
<button
name="print_ch_qr_bill"
string="Print QR-bill"
type="object"
attrs="{'invisible':['|', ('state', '!=', 'open'),
'|', ('l10n_ch_qrr_sent', '=', True),
('l10n_ch_currency_name', 'not in', ['EUR', 'CHF'])]}"
groups="base.group_user"
class="oe_highlight"
/>
<button
name="print_ch_qr_bill"
string="Print QR-bill"
type="object"
attrs="{'invisible':['|', ('state', '!=', 'open'),
'|', ('l10n_ch_qrr_sent', '=', False),
('l10n_ch_currency_name', 'not in', ['EUR', 'CHF'])]}"
groups="base.group_user"
/>
</xpath>
</field>
</record>
</data>
</flectra>