[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
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user