[FIX] check number not assigned correctly
When printing a check from a payment the check number wizard shows the number 1 for the next check... it should show the last check added one +1, it doesn't because it doesn't exclude the account.payments without checknumber. This fix excludes the account.payments without checknumber so that it doesn't shows "1" as the next check number when there are multiple new checks to be printed X-original-commit: adfb8299141cb8fe9883741c43871a51f849655e
This commit is contained in:
@@ -123,6 +123,7 @@ class AccountPayment(models.Model):
|
||||
FROM account_payment payment
|
||||
JOIN account_move move ON movE.id = payment.move_id
|
||||
WHERE journal_id = %(journal_id)s
|
||||
AND check_number IS NOT NULL
|
||||
ORDER BY check_number::INTEGER DESC
|
||||
LIMIT 1
|
||||
""", {
|
||||
|
||||
Reference in New Issue
Block a user