Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
2348 Представления


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.


Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Лучший ответ


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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
авг. 25
2661
1
июл. 25
1056
1
авг. 25
1151
0
мая 25
1498
2
апр. 25
3648