def create_product(product_infos):
xml_data = prepare_xml_product(product_infos)
url="https://www.incwo.com/"+str(ID_USER)+"/customer_products.xml"
# print("sending create (POST request) to ",url," ...")
response = send_request("post", url, xml_data)
product_id = 0
for l in response.splitlines():
if "<id>" in l:
product_id = extract_value_from_xml(l)
print("product "+product_infos["name"]+" created with id "+product_id)
# log.debug(response)
break
if (product_id != 0):
manage_stock_movement(product_infos, product_id, None)
评论列表
文章目录