跳至内容
菜单
此问题已终结
2 回复
727 查看

I need to hadd the Products and the Products quantities in the Sales Order List view, so that we can also check it in the pivot view, but apparently the sales.order.line is not available to fetch this information.
I struggled checking it for last hours, also working on the XML, but I couldn't find a way.

Anybody who can help? Thanks

形象
丢弃
最佳答案

Hi,

It sounds like you want to display product details, including quantities, directly in the Sales Order List view and also ensure that this information is available in the Pivot view for analysis. You're right that the sale.order.line is the model that holds the product and quantity information, but typically this isn't directly accessible from the sale.order model in list views.

You can add a related field in the sale.order model that pulls data from sale.order.line. However, the challenge is that a sale order can have multiple lines, so displaying multiple product names and their corresponding quantities needs some customization.

Add a custom compute field in the sale.order model to gather the products and their quantities from the sale.order.line model. This will make the information available in the list and pivot views.



形象
丢弃
编写者 最佳答案

Thanks a lot for your reply. Given that I'm not very familiar with the code, should I work directly in the Studio using the XML code or is it something that requires access to the python code?

A bit of guidance here would be much appreciated, thanks

形象
丢弃