Skip to content

Commit

Permalink
[FIX] account: remove newId from display_name for invoices
Browse files Browse the repository at this point in the history
Steps to reproduce
==================

- Create a new Invoice

=> The tab title is `Odoo - Draft Invoice (* NewId_0x7f545c9d6980)`

Cause of the issue
==================

In 17, the display_name is computed for the tab title

https://github.com/odoo/odoo/blob/82fd8e702588d2cc5bdad474ed21188257cc7397/addons/web/static/src/views/form/form_controller.js#L342

opw-3794671

closes #159301

Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
  • Loading branch information
hubvd committed Mar 26, 2024
1 parent bfc62bc commit 80e0f34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/account/models/account_move.py
Expand Up @@ -3550,7 +3550,8 @@ def _get_move_display_name(self, show_ref=False):
}[self.move_type]
name += ' '
if not self.name or self.name == '/':
name += '(* %s)' % str(self.id)
if self.id:
name += '(* %s)' % str(self.id)
else:
name += self.name
if self.env.context.get('input_full_display_name'):
Expand Down

0 comments on commit 80e0f34

Please sign in to comment.