Skip to Content
मेन्यू
This question has been flagged
2 Replies
1801 Views

I create custom module ....... it contain field from res.company module

when i update this field in my module it did not update in res.company module 

How can i update this field from my module

Avatar
Discard
Best Answer

Hi,

Not sure of what you are looking to do. Do you need to add any new field into res.company model ? If yes, you can inherit the model and view, and add the new field into it.

If you need a field from company model in your model, as a related field, you can check the related field concept in odoo.

Related Field: How To Add Related Fields In Odoo

Add New Fields: https://www.youtube.com/watch?v=46yecsKX2tw

If this is not what you are looking for, please provide more details

Thanks

Avatar
Discard
Best Answer

1- You have to put base in your manifest depends :

'depends': [
'base',
],

2- then you need to inherit res.company model

_inherit = "res.company"

target_field = yourfield data type or any new field 


3- if the field is already exist you don't need to xpath it if you need to add new field in company screen you have to inherited and x path your new field after or before


4- Upgrade your module.


hope this will help you 



Avatar
Discard
Author

i do not want to xpath re.company view I want to use field in my module view