19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:07 +01:00
parent ba20ce7443
commit 768b70e05e
2357 changed files with 1057103 additions and 712486 deletions

View file

@ -6,7 +6,7 @@ from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class PrintPreNumberedChecks(models.TransientModel):
class PrintPrenumberedChecks(models.TransientModel):
_name = 'print.prenumbered.checks'
_description = 'Print Pre-numbered Checks'
@ -23,7 +23,7 @@ class PrintPreNumberedChecks(models.TransientModel):
number_len = len(self.next_check_number or "")
payments = self.env['account.payment'].browse(self.env.context['payment_ids'])
payments.filtered(lambda r: r.state == 'draft').action_post()
payments.filtered(lambda r: r.state == 'posted' and not r.is_move_sent).write({'is_move_sent': True})
payments.filtered(lambda r: r.state == 'in_process' and not r.is_sent).write({'is_sent': True})
for payment in payments:
payment.check_number = '%0{}d'.format(number_len) % check_number
check_number += 1

View file

@ -13,7 +13,7 @@
</group>
<footer>
<button name="print_checks" string="Print" type="object" class="oe_highlight" data-hotkey="q"/>
<button string="Cancel" class="btn btn-secondary" special="cancel" data-hotkey="z"/>
<button string="Cancel" class="btn btn-secondary" special="cancel" data-hotkey="x"/>
</footer>
</form>
</field>