Skip to Content
Menu
This question has been flagged
2 Replies
2138 Views


The account column (account_id) of the invoice shows the code and name of the account. How can you do just to show the code or just a few digits of the name. that way it takes up a lot of screen space for only 1 items.


Avatar
Discard
Best Answer

You can write as following :


class AccountAccount(models.Model):
     _inherit = 'account.account'

     @api.multi
     def name_get(self):
          result = []
          for account in self:
               name = account.code
               result.append((account.id, name))
          return result

Avatar
Discard
Best Answer


Hi,
   I think you can use the name_get function.just try that.Here is an example in version 8 Name Get

Just convert to your odoo version

Avatar
Discard
Related Posts Replies Views Activity
2
Apr 25
2201
1
Feb 25
647
2
Feb 25
1139
2
Jan 25
1262
1
Dec 24
2202