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

Hello, I have 2 simple models:

 the first one is to create a product and it has name and quantity

the other one is to record how many products sold. 

I want to get the quantity value from the first model onto the second one and update it if something is sold, how can I do that? 

Thanks,,,

아바타
취소
베스트 답변

Hi,

You can create a Many2one field in the second model with first model as comodel. Then you can access the quantity field of first model as "many2one_fleld_id.quantity".

Regards

아바타
취소
관련 게시물 답글 화면 활동
1
8월 23
4233
0
4월 23
3140
5
6월 21
18112
1
3월 21
5924
1
11월 19
3831