diff options
| author | Arthur Maniet <arthurmaniet@me.com> | 2015-06-29 11:54:58 +0200 |
|---|---|---|
| committer | Arthur Maniet <arthurmaniet@me.com> | 2015-08-10 13:48:55 +0200 |
| commit | 5ff410d01a9e4d3f52583edd8c58c307e5376a45 (patch) | |
| tree | 1a8a71be997062a6559e2bd839717c3d72f25d49 /addons/account_check_printing/wizard | |
| parent | 2328fa655e3165d961de4083adf0903c3eb54173 (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/wizard')
3 files changed, 46 insertions, 0 deletions
diff --git a/addons/account_check_printing/wizard/__init__.py b/addons/account_check_printing/wizard/__init__.py new file mode 100644 index 00000000000..0d305b91dc3 --- /dev/null +++ b/addons/account_check_printing/wizard/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +import print_pre_numbered_checks diff --git a/addons/account_check_printing/wizard/print_pre_numbered_checks.py b/addons/account_check_printing/wizard/print_pre_numbered_checks.py new file mode 100644 index 00000000000..4bf1d912bda --- /dev/null +++ b/addons/account_check_printing/wizard/print_pre_numbered_checks.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from openerp import api, fields, models + +class print_pre_numbered_checks(models.TransientModel): + _name = 'print.prenumbered.checks' + _description = 'Print Pre-numbered Checks' + + next_check_number = fields.Integer('Next Check Number', required=True) + + @api.multi + def print_checks(self): + check_number = self.next_check_number + payments = self.env['account.payment'].browse(self.env.context['payment_ids']) + for payment in payments: + payment.check_number = check_number + check_number += 1 + return payments.do_print_checks() diff --git a/addons/account_check_printing/wizard/print_pre_numbered_checks.xml b/addons/account_check_printing/wizard/print_pre_numbered_checks.xml new file mode 100644 index 00000000000..482462a5017 --- /dev/null +++ b/addons/account_check_printing/wizard/print_pre_numbered_checks.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" ?> +<openerp> + <data> + + <record id="print_pre_numbered_checks_view" model="ir.ui.view"> + <field name="name">Print Pre-numbered Checks</field> + <field name="model">print.prenumbered.checks</field> + <field name="arch" type="xml"> + <form string="Print Pre-numbered Checks"> + <p>Please enter the number of the first pre-printed check that you are about to print on.</p> + <p>This will allow to save on payments the number of the corresponding check.</p> + <group> + <field name="next_check_number"/> + </group> + <footer> + <button name="print_checks" string="Print" type="object" class="oe_highlight"/> + or + <button string="Cancel" class="oe_link" special="cancel"/> + </footer> + </form> + </field> + </record> + + </data> +</openerp> |
