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

Hello,

I am learning how to develop my own modules, and for it I need to create a new view with different pages inside.

I wish to be able to insert some of the fields in the main table created by the class, and the fields which are inside the page of the view into another table.

Is this possible? If someone can point me in the right direction I will appreciate it!

Thanks!

아바타
취소
베스트 답변

You can use fields of type related to update fields which are not part of the actual model.

Here is an example from model stock.move:

'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Source", store=True),

This code maps the origin of the stock.picking to the origin of the stock.move. So you can change the origin field of stock.picking from within the stock.move model.

Update:

You can also use a function field and define a method for argument fnct_inv. (See the Developer documentation)

아바타
취소
작성자

Perfect I think this will work. I will test and then come back to mark the answer right. Thanks a lot!

관련 게시물 답글 화면 활동
1
3월 15
12260
2
8월 24
2370
Sticky Field 해결 완료
1
11월 19
3568
1
3월 15
4937
1
3월 15
5390