CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have a custom field (on a view based on the object res.partner). It's not possible to edit the field size in Settings > Technical > Database Structure > Fields. I would like to change the length of this field. How can do it? Where can I find the related python script on my server?
field definitions are incremental. it means if you know what is the model this field belongs to, then you can inherit this model in your python code, add field with the same name and in field definition use the only attribute, the size. this way size will be changed, whereas all other properties will be preserved. say it's a Char field named "ex_field", then:
class my_model(models.Model): _inherit="parent.model" ex_field = fields.Char(size=256)
as noted above, ex_field is field you need to change size for.
About This Community
Odoo Training Center
|Asked: 10/15/15, 3:28 AM|
|Seen: 1169 times|
|Last updated: 2/19/16, 1:50 AM|