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