跳至內容
選單
此問題已被標幟
1 回覆
1927 瀏覽次數

"x_composition_requirem_line_ids_fe755" is a custom field in the model called "x_composition_requirem." The goal of this field is to store information from an Odoo database ID and display it on an existing view called "Default form view for x_composition_requirements" in "Odoo". I created an automated action called "RFQ create composition requirements" with the model name "Purchase Order". How to extract the data from "x_composition_requirem_line_ids_fe755" and display on the RFQ create Composition requirements view using the "Execute Python Code" editor in "Odoo"?

頭像
捨棄
最佳答案

Hi,

1. Retrievethe "x_composition_requirem" record associated with the
Purchase Order record.
 
2 . Retrieve the IDs stored in the "x_composition_requirem_line_ids_fe755"
field of the "x_composition_requirem" record.
 
3 .Retrieve the data objects associated with the IDs using the search method of
the "x_composition.requirem.line" model.

4 .Use the return statement to display the data objects in a window using the
ir.actions.act_window model. Set the res_model to "x.composition.requirem.line", the view_mode to "tree,form", and the domain to a list containing a tuple that specifies the IDs of the data objects to display. You can also set the name and context to customize the window.

Regards

頭像
捨棄