Hello,

I need to integrate that via API:

How I am passing:

*{*
* "method": "model.party.contact_mechanism.write",*
* "params": [UserID, "AccessToken", [Edit_PartyID], {*
* "skype": "Edit SkypeName"*
* }, {*
* "ids": [**Edit_PartyID**],*
* "values": {*
* "skype": "**Edit SkypeName**"*
* }*
* }]*
*}*


On Friday, May 27, 2016 at 5:13:03 PM UTC+5:30, Sergi Almacellas Abellana 
wrote:
>
> El 27/05/16 a les 07:00, Akshay patel ha escrit: 
> > Hello, 
> > 
> > I try to edit contact as follow: 
>
> Why are you using directly the API instead the tryton client or proteus 
> or some web wrapper like flask-tryton? 
> > 
> > *{* 
> > *"method": "model.party.contact_mechanism.write",* 
> > *"params": [5, "dcf8e8132dbc4c8986f3e6716b762xa5", [5], {* 
> > *"skype": "XXXXX"* 
> > *}, {* 
> > *"ids": [5],* 
> > *"values": {* 
> > *"skype": "XXXXX"* 
> > *}* 
> > *}]* 
> > *}* 
>
> You have to pass a list of ids, values, ids, values. See: 
>
>
> http://doc.tryton.org/4.0/trytond/doc/ref/models/models.html?highlight=write#trytond.model.ModelStorage.write
>  
>
> Why are you passing two times the same id? 
>
> Why you put the ids inside of the second values? 
>
> > * 
> > * 
> > *But I getting Error:* 
> > * 
> > * 
> > { 
> >    "id": 0, 
> >    "error": [ 
> >      "UserError", 
> >      [ 
> >        "You try to write on records that don't exist anymore.\n(Document 
> > type: party.contact_mechanism)", 
> >        "" 
> >      ] 
> >    ] 
> > } 
> > 
> > 
> > Even though Record Exists & I am able to change its name. 
> > 
> > Thank you 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "tryton" group. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/tryton/01fcfb96-7d3e-4941-a8ec-ffcd6bcf7e68%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/tryton/01fcfb96-7d3e-4941-a8ec-ffcd6bcf7e68%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
>
>
> -- 
> Sergi Almacellas Abellana 
> www.koolpi.com 
> Twitter: @pokoli_srk 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/f9f0cdcb-519e-47de-8d75-637c1a76773f%40googlegroups.com.

Reply via email to