Some time ago, I had someone help me by adding a custom field to a contact. They created a file:
/opt/odoo/customized_addons/odoo-custom-addons/partner_extra/models/res_partner.py
which contains this code:
class ResPartner(models.Model):
"""Adds ."""
_inherit = "res.partner"
recruitment = fields.Selection([
('c2c', 'Corp to Corp (C2C)'),
('w2', 'Full Time (W-2)')
],'Recruiter'
)
And this works ok. But I would like to add additional options and maybe even additional whole fields. I am fluent in Python and have worked with Django and other things so I'm familiar with MVC and databases etc. But I have never written custom code for Odoo before.
I have changed the above to add an option like so:
recruitment = fields.Selection([
('c2c', 'Corp to Corp (C2C)'),
('w2', 'Full Time (W-2)'),
('new option','New Option'),
],'Recruiter'
)
and deleted the compiled and cached __pycache__/res_partner.cpython-36.pyc but the change does not appear in Odoo. Is there some other step I need to take? Maybe some command I need to run to update the database schema to allow for this new option?
Thanks!
I forgot to mention that I was restarting odoo after my change. But you gave me an important clue that I was missing: I needed to upgrade the app in by clicking the three dots on the tile in the odoo apps screen. Then my changes appeared! Thanks! Upvoting and marking your answer correct...