Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
2371 Visualizzazioni


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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore


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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
ago 25
2827
1
lug 25
1150
1
ago 25
1152
0
mag 25
1563
2
apr 25
3763