[6.1] purchase: changing a product uses wrong supplier info data

Bug #1048547 reported by Niels Huylebroeck
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP Publisher's Warranty Team
OpenERP Community Backports (Addons)
New
Undecided
Unassigned
6.1
Fix Released
Medium
Yann Papouin

Bug Description

Hi,

When entering purchase orders we get osv.except_osv raised because of some refactoring regression in the onchange_product_id function which mistakenly searches for the product_id in the table 'product.supplierinfo' which has a link to 'product.template' and NOT a 'product.product'. (See http://bazaar.launchpad.net/~openerp/openobject-addons/6.1/view/head:/purchase/purchase.py#L780 )

If you are not using product variants the error will not be easily spotted.

Note that this bug seemed to have fallen between test scenarios ?

Regression occurred in :
<email address hidden>

Tags: maintenance

Related branches

description: updated
Revision history for this message
Niels Huylebroeck (red15) wrote :

Attached is one way of solving the problem.

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Hello Niels,

Fixed in following branch,
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579011-rha
r6984, Revision ID: <email address hidden>

Thanks for providing patch, appreciated!

Regards.

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Niels Huylebroeck (red15) wrote :

Not yet committed, updated status.

Changed in openobject-addons:
status: Fix Committed → In Progress
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Revision 6985, Revision ID: <email address hidden>

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Christophe Combelles (ccomb) wrote :

The provided patch is not enough to fix the bug.

- if you have a product_product whose id is different from the product_template
- you create a supplier info in the product's supplier tab
- you create a purchase order, select the product
=> the price is not correct.

the additional fix is to replace product_id with tmpl_id in product/pricelist.py:204

Attached is the full patch

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.