Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm trying to create a model named 'mantenimiento' based on project.task, but want to omit one or two columns from it.
I have this so far:
_name = "project.mantenimientos"
_description = "Mantenimientos"
_inherit = 'project.task'
How could I do it?
Hi Marie Pinto,
There are two possiblities to remove columns.
1) Easier way: Either inherit view and just invisible those columns which you don't want to show to user.
2) little tricky: override def init(self, cr): method of this model and execute query to drop columns by altering table as suggest by vivek.
Risk factor in second step : If your are altering the table and removing any columns from table make sure those fields are not used in any views you have to remove it from there. if those fields are used in any base module view you have to replace it by inheriting views.
Hope this would clear more idea.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/16/15, 12:59 PM|
|Seen: 1551 times|
|Last updated: 9/18/15, 2:08 AM|