Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2335 Представления

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


Аватар
Отменить
Лучший ответ

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июн. 20
3082
1
июл. 19
8263
2
нояб. 20
9144
2
июн. 19
8682
1
авг. 25
1017