Skip to content

Commit

Permalink
[ADD] account_debt_report: make method more heritable
Browse files Browse the repository at this point in the history
  • Loading branch information
zaoral committed Jun 2, 2023
1 parent 1947123 commit 32a340e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions account_debt_report/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 32a340e

Please sign in to comment.