我正在根据文档使用Odoos API:https ://www.odoo.com/documentation/13.0/webservices/odoo.html
尝试将服务产品添加到销售订单行时,出现错误:
xmlrpc.client.Fault: <Fault 2: "('Record does not exist or has been deleted.\\n(Record: product.product(14589,), User: 2)', None)">
这仅在我尝试添加新创建的服务产品时发生。但是,当添加迁移到Odoo 13之前已经存在的旧服务产品时,它可以正常工作。
我要添加服务产品订单行,如下所示:
order_line_id = models.execute_kw(db, uid, password, 'sale.order.line', 'create', [{
'order_id':sales_order_id
,'product_id':odoo_product_id
,'name': product_sku
,'price_unit':product_price
,'product_uom_qty':product_quantity
,'state':'sale'
,'qty_delivered_method': 'manual'
,'customer_lead': 0.0
,'invoice_status':'no'
,'product_type': 'service'
}])
有谁知道这可能是什么原因?
确保您使用product.product
而不是product.template
,这是一个常见错误。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句