跳至內容
選單
此問題已被標幟
2 回覆
2141 瀏覽次數


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
4月 25
2233
1
2月 25
670
2
2月 25
1172
2
1月 25
1292
1
12月 24
2229