Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
6867 Lượt xem

I used a Percent(%) in form view but when I used in Groupby Symbol is not display.

Anyone can help here?

Ảnh đại diện
Huỷ bỏ

What did you tried so far?

Câu trả lời hay nhất

Hello Nikul,

You can add character function field with and store=True, which returns the string with percentage sign appends, like this :

@api.depends('basic')
def _compute_percent(self):
    for rec in self:
       rec.per_net_amt = str(rec.basic) + " %"

per_net_amt = fields.Char(compute='_compute_percent', string="percent field", store=True)
​basic = fields.Float("Basic Amount")

Hope it will help you.
Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Nikul

Check this app store module will help you https://apps.odoo.com/apps/modules/12.0/percent_field/

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

you can achieve it by overriding of read_group.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 24
4300
2
thg 9 23
9968
1
thg 4 22
4268
0
thg 10 21
2701
0
thg 8 19
2344