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

I build a page following this https://www.odoo.com/documentation/9.0/api_integration.html

$models->execute_kw($db, $uid, $password, 
    'product.product', 'search_read',
    array(array(array('supplier_id', '=', 13))),
    array('fields'=>array('name','supplier_id')));

but the filter does not filter my results, i obtain something like :

{
    ["id"]=> int(81)
    ["supplier_id"]=>       array(2) {
          [0]=> int(25)
          [1]=> string(11) "a supplier name"
    }
    ["name"]=> string(32) "a product name"
}

How must I set the filter to obtain only this products from a supplier with a specific int ou a specific name ?

Thanks for help

아바타
취소
작성자 베스트 답변

need I change the model name ?
The relation is Many2Many, how to filter with this type of relation ? 
 

아바타
취소
관련 게시물 답글 화면 활동
1
12월 17
7820
2
12월 23
20260
1
8월 25
556
1
8월 25
737
2
7월 25
3307