summaryrefslogtreecommitdiff
path: root/addons/account_check_printing/views
diff options
context:
space:
mode:
authorArthur Maniet <arthurmaniet@me.com>2015-06-29 11:54:58 +0200
committerArthur Maniet <arthurmaniet@me.com>2015-08-10 13:48:55 +0200
commit5ff410d01a9e4d3f52583edd8c58c307e5376a45 (patch)
tree1a8a71be997062a6559e2bd839717c3d72f25d49 /addons/account_check_printing/views
parent2328fa655e3165d961de4083adf0903c3eb54173 (diff)
[REF] account check printing: base module is a hidden dependency
The account_check_writing module offers the structure for other modules to add check printing facilities (like l10n_us_check_printing), in and of itself it brings no functionality.
Diffstat (limited to 'addons/account_check_printing/views')
-rw-r--r--addons/account_check_printing/views/account_journal_dashboard_view.xml24
-rw-r--r--addons/account_check_printing/views/account_journal_view.xml20
-rw-r--r--addons/account_check_printing/views/account_payment_view.xml64
3 files changed, 108 insertions, 0 deletions
diff --git a/addons/account_check_printing/views/account_journal_dashboard_view.xml b/addons/account_check_printing/views/account_journal_dashboard_view.xml
new file mode 100644
index 00000000000..8ce220b7eee
--- /dev/null
+++ b/addons/account_check_printing/views/account_journal_dashboard_view.xml
@@ -0,0 +1,24 @@
+<openerp>
+ <data>
+ <record id="account_journal_dashboard_kanban_view_inherited" model="ir.ui.view">
+ <field name="name">account.journal.dashboard.kanban.inherited</field>
+ <field name="model">account.journal</field>
+ <field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
+ <field name="arch" type="xml">
+ <xpath expr="//t[@t-name='JournalBodyBankCash']//div[contains(@class, 'o_kanban_primary_right')]" position="inside">
+ <div t-if="journal_type == 'bank' and dashboard.num_checks_to_print != 0">
+ <div class="row">
+ <div class="col-xs-12">
+ <a type="object" name="action_checks_to_print">
+ <t t-esc="dashboard.num_checks_to_print"/>
+ <t t-if="dashboard.num_checks_to_print == 1">Check to print</t>
+ <t t-if="dashboard.num_checks_to_print != 1">Checks to print</t>
+ </a>
+ </div>
+ </div>
+ </div>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/account_check_printing/views/account_journal_view.xml b/addons/account_check_printing/views/account_journal_view.xml
new file mode 100644
index 00000000000..9f180bb099b
--- /dev/null
+++ b/addons/account_check_printing/views/account_journal_view.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_account_journal_form_inherited" model="ir.ui.view">
+ <field name="name">account.journal.form.inherited</field>
+ <field name="model">account.journal</field>
+ <field name="inherit_id" ref="account.view_account_journal_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//page[@name='advanced_settings']/group" position="inside">
+ <group string="Check Printing" attrs="{'invisible': [('check_printing_payment_method_selected', '=', False)]}">
+ <field name="check_printing_payment_method_selected" invisible="1"/>
+ <field name="check_sequence_id" invisible="1"/>
+ <field name="check_manual_sequencing"/>
+ <field name="check_next_number" attrs="{'invisible': [('check_manual_sequencing', '=', False)]}"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/account_check_printing/views/account_payment_view.xml b/addons/account_check_printing/views/account_payment_view.xml
new file mode 100644
index 00000000000..d140af29f4f
--- /dev/null
+++ b/addons/account_check_printing/views/account_payment_view.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <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='post']" position="before">
+ <button name="print_checks" class="oe_highlight" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('state', 'not in', ('posted', 'sent'))]}" string="Print 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')], 'readonly': [('state', '!=', 'draft')]}"/>
+ </xpath>
+ <xpath expr="//field[@name='communication']" position="after">
+ <field name="check_manual_sequencing" invisible="1"/>
+ <field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('check_number', '=', 0)]}"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="view_account_payment_invoice_form_inherited" model="ir.ui.view">
+ <field name="name">account.payment.invoice.form.inherited</field>
+ <field name="model">account.payment</field>
+ <field name="inherit_id" ref="account.view_account_payment_invoice_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//div[@name='amount_div']" position="after">
+ <field name="check_amount_in_words" attrs="{'invisible': [('payment_method_code', '!=', 'check_printing')]}"/>
+ </xpath>
+ <xpath expr="//field[@name='communication']" position="after">
+ <field name="check_manual_sequencing" invisible="1"/>
+ <field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('check_manual_sequencing', '=', False)]}"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="view_account_payment_from_invoices_inherited" model="ir.ui.view">
+ <field name="name">account.register.payments.wizard.inherited</field>
+ <field name="model">account.register.payments</field>
+ <field name="inherit_id" ref="account.view_account_payment_from_invoices" />
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='amount']" position="after">
+ <field name="check_amount_in_words" attrs="{'invisible': [('payment_method_code', '!=', 'check_printing')]}"/>
+ </xpath>
+ <xpath expr="//field[@name='communication']" position="after">
+ <field name="check_manual_sequencing" invisible="1"/>
+ <field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('check_manual_sequencing', '=', False)]}"/>
+ </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='state_sent']" position="before">
+ <filter string="Checks To Print" domain="[('payment_method_id.code', '=', 'check_printing'), ('state','=','posted')]" name="checks_to_send"/>
+ </xpath>
+ </field>
+ </record>
+
+ </data>
+</openerp>