Skip to content
Snippets Groups Projects
Commit 93614a35 authored by Jorge Pinna Puissant's avatar Jorge Pinna Puissant
Browse files

[FIX] account: invoice outstanding credits display

Before this commit, in the customer invoice form, when the outstanding
credits have a big reference or name, the form displayed the name in a
multiple line which made difficult to read and to understand when a
credit starts, and when a credit stops. It also overlapped the name and
the amounts.

Now, when the name is too big, it's truncated, and the full name is
shown when the mouse hovers the field.

OPW-1915966

closes odoo/odoo#30518
parent c5eeae0d
No related branches found
No related tags found
No related merge requests found
......@@ -144,8 +144,13 @@ class AccountInvoice(models.Model):
amount_to_show = line.company_id.currency_id.with_context(date=line.date).compute(abs(line.amount_residual), self.currency_id)
if float_is_zero(amount_to_show, precision_rounding=self.currency_id.rounding):
continue
if line.ref :
title = '%s : %s' % (line.move_id.name, line.ref)
else:
title = line.move_id.name
info['content'].append({
'journal_name': line.ref or line.move_id.name,
'title': title,
'amount': amount_to_show,
'currency': currency_id.symbol,
'id': line.id,
......
......@@ -16,8 +16,8 @@
<td>
<a title="assign to invoice" role="button" class="oe_form_field outstanding_credit_assign" t-att-data-id="line.id" style="margin-right: 10px;">Add</a>
</td>
<td>
<span class="oe_form_field" style="margin-right: 30px;"><t t-esc="line.journal_name"></t></span>
<td style="max-width: 10em;">
<div class="oe_form_field" style="margin-right: 30px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;" t-att-title="line.title"><t t-esc="line.journal_name"></t></div>
</td>
</t>
<t t-if="!outstanding">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment