Odoo Help

2

0
8 Answers
4
Avatar

Malay B Khamar India

--Malay B Khamar--

2011
| 3 2 5
Kalol, India
--Malay B Khamar--

Odoo/OpenERP Developer

Malay B Khamar India
9/30/19, 3:31 AM

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

1
Avatar

Jagdish Panchal India

--Jagdish Panchal--

2791
| 6 4 8
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal India
10/1/19, 1:10 AM

Hello Nikul

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

-1
Avatar

Ravi Gadhia India

--Ravi Gadhia--

8389
| 2 2 5
Gandhinagar, India
--Ravi Gadhia--


Ravi Gadhia India
9/30/19, 5:21 AM

you can achieve it by overriding of read_group.

-3
Avatar

Avinash Nk India

--Avinash Nk--

11949
| 6 5 9
Calicut, India
--Avinash Nk--




Avinash Nadu Kandy

Techno-Functional Consultant

Linked-Inhttps://in.linkedin.com/in/avinash-nk

WhatsApp: +91 9746 626 678


Feel Free To Connect  


Avinash Nk India
9/30/19, 1:44 AM

Hello Nikul,

I think you are trying to add % symbol after a field.

Try like this.

<form>
<group>
<group>
<field name="other_fields" />
<field name="other_fields" />
</group>
<group>
<field name="other_fields" />
<field name="other_fields" />
<label for="field_name"/>
<div class="o_row">
<field name="field_name" />
<span class="o_form_label">%</span>
</div>

</group>
</group>
</form>


Thanks & Regards

Avinash N K

3 Comments
Sudhir Arya (ERP Harbor Consulting Services) India
9/30/19, 1:53 AM

No, he is trying to show % symbol when records are grouped by in the tree view.

Nikul Chaudhary India
9/30/19, 1:59 AM

Yes Exactly Sudhir Arya

Avinash Nk India
9/30/19, 2:08 AM

Ohh. I take it as mistaken because you are mention form view in the question.

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now