콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
1793 화면

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