This question has been flagged
1 Reply
3198 Views

When I first began using Odoo, I used the technical interface to create new fields in existing models.  So for example I added a text field called x_Reseller_ID to the res.partners so I could store State Reseller Identification #'s. 

Now I am a little further along in my progress of understanding module development and have begun adding fields by installing addons.

My question is, what are the advantages and disadvantages of using both methods?  

For example, if I have 40 custom fields, if I made 40 addon's will this have an effect on performance (obviously in the real world I could consolidate fields into 1 addon) vs just adding the 40 fields to the existing models by adding them in the technical interface?

What happens when I update?  I expect I could lose my custom edited views, but can I lose data in my models?  

Reason I ask is I still have several fields with data in them that were created using technical interface.  I am wondering if I should go through the trouble of making modules for the same data and then migrating the data from x_Field to Module_field or if my data is safe.

Avatar
Discard
Best Answer

In my experience, I would recommend that you go with modules.

In the case you have to restore a DB backup or migrate it to another server and you chose to create custom fields you will have to create all those fields again, while if you have a module you just to place the module in its corresponding directory and all fields will show. 

Data for these fields will be in DB so you won't lose them. 

Performance won't be affected as these modules aren't processing any data, just giving an statement. 

I've even had cases where clients lose their fields and Odoo crashes after updating because of custom fields. 

So if you have the knowledge to create modules to suit your needs it will be better for you. 

Avatar
Discard