This question has been flagged
2 Replies
1276 Views

Hello,

It's been a few days now that I have been working on creating an application in Odoo 16 so that I can directly import it into the application module!
Let me explain, I have created a folder that we will name D1, it contains 4 sub-folders that we will name: models, controllers, views, and report.
The error message that Odoo displays when importing the zipped folder is:


Error while importing module 'D1'. Element odoo has extra content: data, line 2 Make sure those modules are installed and try again.


I was informed that this error message concerns the XML files in my folder and in the previously specified sub-folders!


- I have 3 XML files and here is their code, file menu_contrat.xml :







- The contrat_view.xml file contains the following code :




















And finally, the last XML file named contrat_report.xml:

#
#
#
#
#
#
#

#

Contrat


#

Nom:


#

Prénom:


#

Adresse:


#

Téléphone fixe:


#

Téléphone portable:


#

Débit:


#

Prix:


#

#
#
#
#
#
#

Do you think it's because of the spaces that Odoo16 displays this error message to me? Or is there a syntax error somewhere and I can't see it?

Can you please help me with this because when I try to import it, the application is installed correctly but Odoo won't let me activate my application!

If you would like to view my coding in python (if necessary), please let me know.

Thank you very much in advance for your help and answers!

PS: I added the '#' symbol just in this conversion, it's not in the code, please ignore these symbols thank you!

Avatar
Discard
Author Best Answer

Hi Apiuser,

I did include a manifest.py, but not an _init_.py, I don't know what to code, can you please give me a code? 


Another question, can you see my code? because I can't see what code I wrote in the conversation.

And by the way, thank you for your previous answer.

Avatar
Discard
Author

Thank you Niyas Raphy for your answer, I will immediately watch the video and I will come back in case of any problems!

Best Answer

Did you also include a _init_.py and _manifest_.py in D1?

Avatar
Discard