Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

請教DataError: invalid input syntax for integer: "False"是何原因



  • 我寫了一個wizard要直接將資料寫入purchase_order,purchase_order_line
    但執行時發生DataError: invalid input syntax for integer: "False"的錯誤視窗
    自認SQL語句無誤 請教是何原因造成  如何解決??
    感恩
    Code:
    [size=10pt]cr.execute("""INSERT INTO purchase_order(create_uid, create_date, write_date, write_uid, origin, partner_address_id, warehouse_id, partner_ref, date_order, location_id, amount_untaxed, name, shipped, partner_id, notes, company_id, amount_tax, invoice_method, state, validator, minimum_planned_date, pricelist_id, amount_total) values('1','"""+DT+"""','"""+DT+"""','1','','"""+S_ADD_ID+"""','1','','"""+date_purchase+"""','12',"""+amount_untaxed+""",'"""+pord_name+"""',TRUE,'"""+supply_id+"""','','1',0.00,'order','draft','1','"""+minimum_planned_date+"""','2',"""+amount_total+""")""")


    cr.execute("""INSERT INTO purchase_order_line(create_uid, create_date, write_date, write_uid, product_uom, order_id, price_unit, product_qty, partner_id, invoiced, name, date_planned, notes, company_id, state, product_id) values('1','"""+DT+"""','"""+DT+"""','1','"""+UOM_ID+"""','"""+PO_ID+"""','"""+str(price_unit_purchase)+"""','"""+str(product_qty)+"""','"""+supply_id+"""',TRUE,'"""+PRO_NAME+"""','"""+date_purchase+"""','','1','draft','"""+product_name+"""')""")[/size]


Log in to reply