← Back to team overview

openerp-community-reviewer team mailing list archive

[Bug 1215578] Re: [6.1/7.0/trunk][purchase] changing PO partner_id after order is saved keeps corrupted partner_id at order_line level (fields.related)

 

Hello, as a note, a similar issue has been reported for sale order lines
on Github: https://github.com/odoo/odoo/issues/1629

-- 
You received this bug notification because you are a member of OpenERP
Community Backports, which is a bug assignee.
https://bugs.launchpad.net/bugs/1215578

Title:
  [6.1/7.0/trunk][purchase] changing PO partner_id after order is saved
  keeps corrupted partner_id at order_line level (fields.related)

Status in OpenERP Community Backports (Addons):
  Fix Committed
Status in OpenERP Community Backports (Addons) 6.1 series:
  Fix Committed
Status in OpenERP Community Backports (Addons) 7.0 series:
  Fix Committed
Status in Odoo Addons:
  Confirmed

Bug description:
  How to reproduce:

  on new install with demo data on head v7:

  Create a new purchase order with one purchase order line.
  Save the purchase order.
  Take the purchase order id  X from the URL and look at the result of this SQL query:
  select partner_id from purchase_order_line where order_id=X;

  This gives you Y the partner_id of the purchase order which is
  expected.

  Now edit the purchase order again, change the partner and save it. Run the same SQL query again.
  KABOOM! this gives you the old partner_id id which is now corrupted!

  I think the problem comes from the fact this is a fields.related with
  store=True and no proper cache invalidation function. This is a crazy
  bug because all SQL or ORM using that related field will give
  corrupted results once you change a purchase order partner, which is
  something pretty common.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ocb-addons/+bug/1215578/+subscriptions