.:: Jasa Membuat Aplikasi Website,Desktop,Android Order Now..!! | | Order Now..!! Jasa Membuat Project Arduino,Robotic,Print 3D ::.

How to use xmlrpc to upload an image into the partner ?

0 komentar


بِسْــــــــــــــــمِ اﷲِالرَّحْمَنِ اارَّحِيم
bismillaahirrahmaanirrahiim

السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
Assalamu'alaikum warahmatullahi wabarakatuh

Hi SME Odooer , the formal openerper , how is things ? Hope you are benefited from this powerful framework of Odoo , the formal OpenERP of Malaysia ,

today , i would like to share how to use xmlrpc to upload into partners ,
so the object to use are res.partner and ir.attachment ,

and you will need to use http://i-tools.org/base64 to upload some image and then click the
encode button


After you got the download file , copy the strings inside the file.

Here as usual, do your usual import
import xmlrpclib
          dbname  = 'somedb'
          usr = 'someusr'
          pwd ='somepass'
erp_client = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/common')
uid = erp_client.login(dbname ,usr ,pwd)
erp_client = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
          base64str_file  = <use the copied strings , paste here !>
          partner_id = <code to get the partner id >
values = {'name':'some.jpg',
                        'type':'binary',
                        'res_id': partner_id  ,
                        'res_model':'res.partner',
                        'partner_id' : partner_id  ,
                        'datas' : base64str_file  }
new_id = erp_client.execute(dbname, uid, pwd, 'ir.attachment', 'create', values )
 
after executed , we should expect a new attachment at this selected Partner  !
Hope this help , till next update,cheers!
 

Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
NB :: Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code, membeli hardware elektronika untuk kepentingan Perusahaan maupun Tugas Akhir (TA/SKRIPSI), Insyaallah Saya siap membantu, untuk Respon Cepat dapat menghubungi kami, melalui :

No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com


atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :

ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِين
Alhamdulilah hirobil alamin

وَ السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
wassalamualaikum warahmatullahi wabarakatuh


Artikel How to use xmlrpc to upload an image into the partner ?, Diterbitkan oleh scodeaplikasi pada Rabu, 10 Desember 2014. Semoga artikel ini dapat menambah wawasan Anda. Website ini dipost dari beberapa sumber, bisa cek disini sumber, Sobat diperbolehkan mengcopy paste / menyebar luaskan artikel ini, karena segala yang dipost di public adalah milik public. Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code ,Dengan Cara menghubungi saya Ke Email: Fajarudinsidik@gmail.com, atau No Hp/WA : (fajar) : 085369237896, (puat) : 085267792168.

Tawk.to