Skip to content
Snippets Groups Projects
Commit 9919707e authored by Arthur Maniet's avatar Arthur Maniet
Browse files

[REF] account check printing: when using pre-numbered check paper, ask user...

[REF] account check printing: when using pre-numbered check paper, ask user for the number of the next pre-printed check upon printing so that payments can be attributed the number of the check they are printed on.

And while at it, [FIX] some broken icons (SEPA and checks).
parent cf8b61c3
No related branches found
No related tags found
No related merge requests found
......@@ -11,9 +11,10 @@ class account_register_payments(models.TransientModel):
check_amount_in_words = fields.Char(string="Amount in Words")
check_manual_sequencing = fields.Boolean(related='journal_id.check_manual_sequencing')
check_number = fields.Integer(string="Check Number", readonly=True, copy=False,
help="The selected journal is configured to print check numbers. If your pre-printed check paper already has numbers "
"or if the current numbering is wrong, you can change it in the journal configuration page.")
# Note: a check_number == 0 means that it will be attributed when the check is printed
check_number = fields.Integer(string="Check Number", readonly=True, copy=False, default=0,
help="Number of the check corresponding to this payment. If your pre-printed check are not already numbered, "
"you can manage the numbering in the journal configuration page.")
@api.onchange('journal_id')
def _onchange_journal_id(self):
......
......@@ -12,7 +12,7 @@
<record model="ir.actions.server" id="action_account_send_checks">
<field name="name">Send Checks</field>
<field name="name">Print Checks</field>
<field name="model_id" ref="account.model_account_payment"/>
<field name="code">
if context.get('active_model') == 'account.payment' and context.get('active_ids'):
......@@ -22,7 +22,7 @@
<record model="ir.values" id="account_send_checks">
<field name="model_id" ref="account.model_account_payment" />
<field name="name">Send Checks</field>
<field name="name">Print Checks</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.server,' +str(ref('action_account_send_checks'))" />
<field name="key">action</field>
......
......@@ -14,7 +14,7 @@
</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_writing'), ('check_manual_sequencing', '=', False)]}"/>
<field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_writing'), ('check_number', '=', 0)]}"/>
</xpath>
</field>
</record>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment