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

im trying to insert in res.users with this code:

$values= array( "name"=>new xmlrpcval($name,"string"), "login"=>new xmlrpcval($login,"string"), "password"=>new xmlrpcval($psw,"string"), "lang"=>new xmlrpcval("it_IT","string"), "company_id"= new xmlrpcval($company,"many2one"); ); echo $id= $this->create($values,"res.users");

Im using a user with all the possible privileges...

The function return a -1 state that means that i ve no permission or the format is not corrected.

아바타
취소
베스트 답변

Nicola,

If you want to insert the Current User's company to the new user record, do not do that. The _defaults already adds the current company by default.

If you want to create a new company, you have to make sure that your current user has enough permission to create the company.

Thanks.

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

Hi, thx for the answer.

But i want to add a new user with a company_id different from the current user's company_id so i can't use the default value.

And the the webservice seems that don't let me do that.

 

아바타
취소
관련 게시물 답글 화면 활동
0
3월 18
3711
1
3월 15
6807
1
1월 23
4569
1
4월 21
6707
1
5월 18
5293