diff --git a/addons/account_check_writing/account_payment.py b/addons/account_check_writing/account_payment.py index db54215d43aeca0af45f474848a295465723ee20..5658ea86e38ad2745972c66d6fe7e618bda849a5 100644 --- a/addons/account_check_writing/account_payment.py +++ b/addons/account_check_writing/account_payment.py @@ -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): diff --git a/addons/account_check_writing/data/check_writing.xml b/addons/account_check_writing/data/check_writing.xml index 8ee7144322751c37f35e60c5885386c0e6b8d20b..d76e9cae243ac24bfcb396a17a5acada4e031ba9 100644 --- a/addons/account_check_writing/data/check_writing.xml +++ b/addons/account_check_writing/data/check_writing.xml @@ -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> diff --git a/addons/account_check_writing/views/account_payment_view.xml b/addons/account_check_writing/views/account_payment_view.xml index fccfa1255a95e55bbcb3c5ad6f36066ce75d1757..f711f9a8d5699cf55a1d742ac41fe893df146754 100644 --- a/addons/account_check_writing/views/account_payment_view.xml +++ b/addons/account_check_writing/views/account_payment_view.xml @@ -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>