. I want to fetch the data and display in xml file. I watched this video it's help me alot to fetch data but how i can display data into xml file in pivot or tree view please help me in it.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Hi Muhammad if i'm right you do'nt need to create a function to get data in your report .
so wath i think you need to do is to create only a pivot view in xml file and customize it for your research
Example :
<record id="view_module_pivot_" model="ir.ui.view">
<field name="name">module.pivot</field>
<field name="model">Module</field>
<field name="arch" type="xml">
<pivot string="NAME YOUR REPORT">
<field name ="Your Field" type="col"/>
<field name="YOUR FIELD" type="row" />
</pivot>
</field>
</record>
And you need also to add pivot in your action
<field name="view_mode">tree,pivot,graph,form,kanban</field>
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
1
mrt. 20
|
3995 | ||
|
3
aug. 19
|
9737 | ||
|
0
jul. 19
|
4134 | ||
|
1
mrt. 20
|
9158 | ||
|
0
dec. 19
|
3010 |
Didn't getting what you exactly want? Please describe more and update question with code that you did.
Here is the my .py file function
def get_data(self):
counting = self.env['product.brand'].search([])
for rec in counting:
print("Name", rec.name)
It's fetch list of brands which want to show in pivot view in the sale analysis section. for checking profitability report of it.