Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
2350 Ansichten

Hi,

I am working on a requirement to show a user open purchase and sales details. However, I want the structure just like Inventory valuation report. Like, first there is a screen that has a radio buttons. When I click submit. It shows columns like Vendor, Order Ref., Order Date, PO Amount, SO Amount. 

I know from which model I have to fetch the data and manipulate however, I am confused how to create this report as same structure as Inventory Report. The screens and how to populate the data, I have to fetch manipulate the data each time the data is requested so do I need to create a new model? How do I populate the data in collapsed and expanded form? Below is the Inventory report sample. I need some assist


Avatar
Verwerfen
Beste Antwort

You're asking about how to set up an Inventory Valuation report to display purchase and sales details. It's a bit tricky if you want to match Odoo's existing report structure exactly, but here's how you can start. Instead of creating a brand new modle, you can work with Odoo's existing framework.


First off, check out the `Report` and `Wizard` functionalities in Odoo. For those radio buttons and submit screens, a Wizard is your friend. Wizards act like temporary models, guiding the user through actions, making them ideal for grabbing radio button selections.


You'll want to create a Wizard modle with fields for your inputs. Then, set up a button in a form view that triggers a Python function when clicked. This function should pull data from source models like `purchase.order` or `sale.order`, and restructure it for your report.


The collapsing/expanding data behavior is managed through tree and form views, or maybe even JavaScript if you're into that. For making reports, QWeb is good for flexible HTML/PDF outputs that can mirror existing report styles.


Yeah, Odoo can be a bit weird with its logic. This stuff can get complex, so keep in mind testing is a must. Adjust your dev environment first, and think about user-friendliness since the end-users will navigate these screens.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juni 20
3099
1
Juli 19
8276
2
Nov. 20
9170
2
Juni 19
8685
1
Aug. 25
1027