Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to display List returned by Web Service - Odoo 8 -

By
Salma
on 3/2/16, 3:47 AM 374 views

I'm using odoo version 8 and I would like to call web service and get list of product from another application so I add a new button : 

 <record id="product_template_form_view" model="ir.ui.view">

<field name="name">product.template.common.form</field>

<field name="model">product.template</field>

 [...]

<form string="Product">
[...]

<button class="oe_stat_button" string="Disponibilité" name="disponibilite_object" type="object" icon="fa-search"/>
-----------------------------------------------------------------
After that I declared a new function in :
-----------------------------------------------------------------

class product_template(osv.osv):

@api.one

def disponibilite_object(self):

ntlm = WindowsHttpAuthenticated(username='xxxx', password='yyyy')

url = 'http://Web Service url'

client = Client(url, transport=ntlm)

result = client.service.Read(Serial_No='00001')

print result # the result is printed on the console just to test it and I will remove it later
------------------------------------------------------------------------------------------------
So I want to create a view to display the list which is returned by the Web Service, Please help me !

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/2/16, 3:47 AM
Seen: 374 times
Last updated: 3/2/16, 3:48 AM