【问题标题】:automatic post data from other web to odoo自动从其他网站发布数据到 odoo
【发布时间】:2019-03-11 04:31:35
【问题描述】:

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

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

【问题讨论】:

    标签: python api odoo odoo-11 xmlrpcclient


    【解决方案1】:

    也许 Selenium 可以帮助你
    Selenium 可自动化支持 Internet Explorer、Chrome、Firefox ... 等的浏览器
    您可以发送键和单击按钮,其他所有事情。

    odoo 登录示例:

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-07
      相关资源
      最近更新 更多