跳至内容
菜单
此问题已终结
2 回复
2343 查看


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

形象
丢弃
相关帖文 回复 查看 活动
2
8月 25
2637
1
7月 25
1027
1
8月 25
1151
0
5月 25
1483
2
4月 25
3638