[FIX] partner_statement: avoid showing lines with 0.00001 open amounts
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import api, models
|
||||
from odoo.tools.float_utils import float_is_zero
|
||||
|
||||
|
||||
class OutstandingStatement(models.AbstractModel):
|
||||
@@ -139,6 +140,11 @@ class OutstandingStatement(models.AbstractModel):
|
||||
res[row.pop("partner_id")].append(row)
|
||||
return res
|
||||
|
||||
def _add_currency_line(self, line, currency):
|
||||
if float_is_zero(line["open_amount"], precision_rounding=currency.rounding):
|
||||
return []
|
||||
return [line]
|
||||
|
||||
@api.model
|
||||
def _get_report_values(self, docids, data=None):
|
||||
if not data:
|
||||
|
||||
Reference in New Issue
Block a user