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

When creating records using a CSV file, is it necessary to have the columns for all the fields in the model used?
If the fields not placed in the CSV are not required, will odoo place them as null?

頭像
捨棄
最佳答案

You don't need all columns.

Columns not provided will result in either a NULL value or a DEFAULT value, depending on the field.

Create a record via the UI and supply the same fields manually to see which other ones get filled in to know exactly. 


See also https://www.odoo.com/documentation/14.0/applications/general/export_import_data.html#import-data-into-odoo

頭像
捨棄
最佳答案

You don't have to include all the fields, only those that are relevant to you and the "required" ones. 
You can see which fields are required by looking at the menu option (in debug mode) "Settings/Technical/Models".
The fields without assigned values will be set to "null" or to the default value, if any.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
6月 25
1268
0
5月 25
12
2
1月 25
2792
1
12月 24
6482
1
11月 24
2909