I am creating products on odoo based on json data from outside but they are not showing in the products view
but when i take the count of products and print the name of those records it is there in the list of products records.
def order_to_odoo(self):
url = 'http://htel.com/order_odoo.php'
response = urllib.urlopen(url)
data = json.loads(response.read())
for majorkey,subdict in data.iteritems():
for index,value in subdict.iteritems():
if index=='order_hotel_name':
pr_name=value
valsproduct = {'name': pr_name,
'categ_id': 1,
'public_categ_ids':[(6,0,[1,4])],
'status':'approved'
}
self.env['product.template'].create(valsproduct)