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

I'll try to be as clear as possible, don't hesitate to ask for more information. The following example as no purpose in itself.


So you have `product` which can have a `category`. `category` is a table and there can be more or less records in it.


You would like to make a `list` with a title, note and manually add then sort per `category` all your `product`s.


For this, you create a junction table, `list_product_rel` which contains `product` and `list` FK and an integer for the product placement in the list.


Now, editing the list in a form you could have a One2many and sort your `product`. But it would be for all the product you add to the list and not per product `category`. You want to have a One2many field per product category, in which you will sort the products.


In python, you can't make a One2many field per category (using domain) in `list` because records in `category` is unknown or maybe you can using a loop ? if so how to print all the fields in the form view ?


I tried in xml to have multiple times the one2many field with different domains but the view will use the last one defined (or i don't know how to do it)


아바타
취소
관련 게시물 답글 화면 활동
1
1월 22
2602
1
11월 22
2862
2
1월 22
48343
2
5월 24
8814
3
2월 24
5059