Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
2346 Vizualizări


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.


Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns


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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
aug. 25
2655
1
iul. 25
1034
1
aug. 25
1151
0
mai 25
1492
2
apr. 25
3646