Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
1807 มุมมอง

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