I got this error when i click on "Run Procurement" button in the module "Inventory" or when I click 'Confirm Sale' in module 'Sale'.
Odoo Warning - Validation Error
Error while validating constraint
'purchase.order.line' object has no attribute 'purchase_id'
Note that the route of the product listed in the sales order has been set to 'Buy' and 'Make to Order'. Also I created a reordering rule for this product. I I wanted is to trigger a purchase order whenever the stock reaches the minimum level. I am using odoo version 9.0c-20170906