Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
2174 Vues


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
Ignorer
Meilleure réponse

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
Ignorer
Meilleure réponse


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
Ignorer
Publications associées Réponses Vues Activité
0
mai 25
107
2
avr. 25
2370
1
févr. 25
731
2
févr. 25
1236
2
janv. 25
1350