← Back to team overview

openerp-india team mailing list archive

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

 

Public bug reported:

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.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1215578

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

Status in OpenERP Addons (modules):
  New

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/openobject-addons/+bug/1215578/+subscriptions


Follow ups

References