从其他网站自动发布数据到odoo

问题描述 投票:0回答:1

我必须使用python从其他网站获取数据并将该数据发布到odoo,这可能吗?

我已经尝试在odoo中创建python文档中的记录,但我不认为它可以自动生成,我的目标是自动将数据从该网站发布到odoo,但我的问题我不知道如何将数据发布到odoo自动,请帮帮我

python api odoo odoo-11 xmlrpcclient
1个回答
-2
投票

也许Selenium可以帮到你 Selenium自动化支持Internet Explorer,Chrome,Firefox等的浏览器 你可以发送钥匙和点击按钮,其他所有东西。

登录示例:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Chrome('chromedriver.exe')
driver.find_element_by_xpath('//*[@id="wrapwrap"]/header/div/div/div/a').click() // click the SIGN IN button
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, //*[@id="login"]))) // wait the login page
driver.find_element_by_xpath('//*[@id="login"]').send_keys('your id') // send your id the web
driver.find_element_by_xpath('//*[@id="password"]').send_keys('your pw') // send your pw the web
© www.soinside.com 2019 - 2024. All rights reserved.