Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4 Vastaukset
6872 Näkymät

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

Anyone can help here?

Avatar
Hylkää

What did you tried so far?

Paras vastaus

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

Avatar
Hylkää
Paras vastaus

Hello Nikul

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

Avatar
Hylkää
Paras vastaus

you can achieve it by overriding of read_group.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
syysk. 24
4311
2
syysk. 23
9970
1
huhtik. 22
4277
0
lokak. 21
2706
0
elok. 19
2357