跳至内容
菜单
此问题已终结
2 回复
1797 查看

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

形象
丢弃
最佳答案

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

形象
丢弃
最佳答案

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 



形象
丢弃
编写者

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