mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Merge pull request #749 from ursais/bodedra_fix_748
[FIX] ValueError: min() arg is an empty sequence
This commit is contained in:
@@ -69,6 +69,7 @@ Contributors
|
||||
------------
|
||||
|
||||
* Enric Tobella <etobella@creublanca.es>
|
||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
"name": "Account Loan management",
|
||||
"version": "11.0.1.1.0",
|
||||
"version": "11.0.1.1.1",
|
||||
"author": "Creu Blanca,Odoo Community Association (OCA)",
|
||||
"website": "http://github.com/OCA/account-financial-tools",
|
||||
"license": "AGPL-3",
|
||||
|
||||
@@ -390,6 +390,8 @@ class AccountLoan(models.Model):
|
||||
"""
|
||||
lines = self.line_ids.filtered(lambda r: not r.move_ids)
|
||||
amount = 0
|
||||
if not lines:
|
||||
return
|
||||
final_sequence = min(lines.mapped('sequence'))
|
||||
for line in lines.sorted('sequence', reverse=True):
|
||||
date = datetime.strptime(
|
||||
|
||||
Reference in New Issue
Block a user