summaryrefslogtreecommitdiff
path: root/addons/account_check_printing/views/account_payment_views.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/account_check_printing/views/account_payment_views.xml')
-rw-r--r--addons/account_check_printing/views/account_payment_views.xml39
1 files changed, 39 insertions, 0 deletions
diff --git a/addons/account_check_printing/views/account_payment_views.xml b/addons/account_check_printing/views/account_payment_views.xml
new file mode 100644
index 00000000..d8c52557
--- /dev/null
+++ b/addons/account_check_printing/views/account_payment_views.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="view_account_payment_form_inherited" model="ir.ui.view">
+ <field name="name">account.payment.form.inherited</field>
+ <field name="model">account.payment</field>
+ <field name="inherit_id" ref="account.view_account_payment_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//button[@name='action_post']" position="before">
+ <button name="print_checks" class="oe_highlight" attrs="{'invisible': ['|', '|', ('payment_method_code', '!=', 'check_printing'), ('state', '!=', 'posted'), ('is_move_sent', '=', True)]}" string="Print Check" type="object"/>
+ <button name="action_unmark_sent" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('is_move_sent', '=', False)]}" string="Unmark Sent" type="object"/>
+ <button name="action_void_check" attrs="{'invisible': ['|', '|', ('payment_method_code', '!=', 'check_printing'), ('state', '!=', 'posted'), ('is_move_sent', '=', False)]}" string="Void Check" type="object"/>
+ </xpath>
+ <xpath expr="//div[@name='amount_div']" position="after">
+ <field name="check_amount_in_words" attrs="{'invisible': [('payment_method_code', '!=', 'check_printing')]}" groups="base.group_no_one"/>
+ </xpath>
+ <xpath expr="//field[@name='ref']" position="after">
+ <field name="check_manual_sequencing" invisible="1"/>
+ <field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('check_number', '=', False)]}"/>
+ </xpath>
+ <xpath expr="//field[@name='name']" position='before'>
+ <widget name="web_ribbon" title="Sent" attrs="{'invisible': [('is_move_sent', '!=', True)]}"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="view_payment_check_printing_search" model="ir.ui.view">
+ <field name="name">account.payment.check.printing.search</field>
+ <field name="model">account.payment</field>
+ <field name="inherit_id" ref="account.view_account_payment_search"/>
+ <field name="arch" type="xml">
+ <xpath expr="//filter[@name='activities_overdue']" position="before">
+ <separator/>
+ <filter name="checks_to_send" string="Checks to Print" domain="[('payment_method_id.code', '=', 'check_printing'), ('state', '=', 'posted'), ('is_move_sent', '=', False)]"/>
+ <separator/>
+ </xpath>
+ </field>
+ </record>
+
+</odoo>