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

I have a custom module in which i want to import some of the updated data but getting an error

Unknown error during import: : 'field1' at row 2 Resolve other errors first

I am getting this error in some of the fields not all.


Below are the type and description and parameters of the field in which i am getting this error:-


field1 = fields.Many2one(comodel_name="ab", string="Field1", required=False, )
field2 = fields.Many2one(comodel_name="bc", string="Field2", required=False, )
field3 = fields.Char('Field3', size=30, required=True)
field4 = fields.Char('Field4', size=30)
field5 = fields.Char('Field5', size=30, required=True)
After including these fields in export and import resolves this issue but if i remove any of the fields in export and import of data gives this issue again. Why is this happening?
Is this error related to migration or something else i am missing? Do anyone have any idea how to solve this issue?


Avatar
Verwerfen
Beste Antwort

As per you code you have only two required fields field3 and field5 so these fields need to be included in the import file. 

Did you change the module code lately by setting required to False and not upgrade the module?

 You can enable developer mode and go to settings -> Technical -> Fields and search for fields you got them in your error and see if the required is checked. If its checked and in your code set to False, thats mean your module is not upgraded and you need to upgrade it.

Avatar
Verwerfen
Autor

Hello Waleed, Thanks for the prompt response. My module is already upgraded and also as per your suggestion, I have checked those fields in which i am getting error while importing but they are not required.

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Mai 21
8378
1
Mai 23
1972
0
Aug. 21
2657
1
Mai 24
3139
5
Nov. 23
2979