diff options
| author | Adrien Widart <awt@odoo.com> | 2020-11-19 15:20:05 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2020-11-26 07:00:10 +0000 |
| commit | 4dc4dc3d20114bea54266d97de29565a1a1ac230 (patch) | |
| tree | cc7b66a73c1ec3942a670452bb1922d1a726a5e0 /addons | |
| parent | 49b965eb1ec6a7ec6c07fa643cc6ae35ee8b5d91 (diff) | |
[FIX] account_check_printing: print check of payment group
When some bills are not paid, some with due date, some without, when registering the payment of these bills as a group payment with checks, it is not possible to print the check
To reproduce the error:
(Need account)
1. Go to Invoicing > Vendors > Bills
2. Create a new one
- Add at least one line
- Add the Payment Terms
3. Save & Post
4. Duplicate it, then Save & Post
5. Go back to Bills
6. Select the two bills
7. Click on Action > Register Payment
8. Select Checks, enable Group Payment
9. Click on Create Payment
10. Click on Print Check
11. Click on Print
=> An Odoo Error is raised
The user should be able to print it.
OPW-2389368
closes odoo/odoo#62365
X-original-commit: adeebc5dac0721af9439ad8846e9c22cac804151
Signed-off-by: adwid <adwid@users.noreply.github.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account_check_printing/models/account_payment.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py index 7325186f598..215af3ef922 100644 --- a/addons/account_check_printing/models/account_payment.py +++ b/addons/account_check_printing/models/account_payment.py @@ -205,7 +205,7 @@ class AccountPayment(models.Model): multi_stub = self.company_id.account_check_printing_multi_stub - invoices = self.move_id._get_reconciled_invoices().sorted(key=lambda r: r.invoice_date_due) + invoices = self.move_id._get_reconciled_invoices().sorted(key=lambda r: r.invoice_date_due or fields.Date.context_today(self)) debits = invoices.filtered(lambda r: r.move_type == 'in_invoice') credits = invoices.filtered(lambda r: r.move_type == 'in_refund') |
