diff --git a/account_debt_report/models/res_partner.py b/account_debt_report/models/res_partner.py index 98883206e..e9cbb8318 100644 --- a/account_debt_report/models/res_partner.py +++ b/account_debt_report/models/res_partner.py @@ -10,6 +10,13 @@ class ResPartner(models.Model): _inherit = 'res.partner' + def _get_debt_report_line_name(self, record): + name = record.move_id.name + # similar to _format_aml_name + if record.ref and record.ref != '/': + name += ' - ' + record.ref + return name + def _get_debt_report_lines(self): # TODO ver si borramos este metodo que no tiene mucho sentido (get_line_vals) def get_line_vals( @@ -104,10 +111,8 @@ def get_line_vals( '\n', ' ').replace('\r', ''), inv_line.quantity, inv_line_product_uom_id_name))) - name = record.move_id.name - # similar to _format_aml_name - if record.ref and record.ref != '/': - name += ' - ' + record.ref + + name = self._get_debt_report_line_name(record) date_maturity = record.date_maturity date = record.date