[IMP] account: better display name for journal entries

Task 2008956
This commit is contained in:
qdp-odoo
2019-09-04 09:00:03 +00:00
committed by wan
parent 0a5955bff6
commit 1eb931f84b
+5 -1
View File
@@ -1482,7 +1482,11 @@ class AccountMove(models.Model):
result = []
for move in self:
if self._context.get('name_groupby') and not (move.type == 'entry' and move.state == 'draft'):
name = '**%s**, %s %s' % (format_date(self.env, move.date), move.name, move.partner_id.name or '')
name = '**%s**, %s' % (format_date(self.env, move.date), move.name or '')
if move.ref:
name += ' (%s)' % move.ref
if move.partner_id.name:
name += ' - %s' % move.partner_id.name
elif move.type == 'entry':
# Miscellaneous operation.
if move.state == 'draft':