Help

6

How to remove field from the Measures dropdown in pivot and graph view

Hello,

I made a graph and pivot view for my model. By default all fields(that are numeric as well as stored) are available in Measures drop-down. I want to exclude some fields.

How can i do that?



Avatar
Discard
2 Answers
0
Avatar
Hamza Larmoud
Best Answer

Hello, 

If you want to remove some of fields from the measure drop-down list, you need to remove their fields in the python code.

For exemple, if you want to remove a measure called "Price", go to the classe of the report in python and search for the field with the description "Price" and remove/comment it. and also check if this field is used in the xml of the report in pivot view, and remove it from the xml

Don't forget to reset the Odoo server and upgrade your module.

I hope that solution will help you.



 

Avatar
Discard
0
Best Answer

Hello Dhaval,


Mentions those field which you want to in measurement.

like <field name="your_field" type="measure"/> in your pivot view.

2 Comments
Avatar
Discard

Thanks for reply But this is not what i want. Your solution only select specified field by default. Other fields are still there in the drop-down list. I want to remove them.

Avatar
Mohammad Hassanzadeh
-

can you find any solution for this? I need to this too.