So: that bug occurs when you enter bad data in OpenERP: when the default purchase UOM, at the bottom of the product form doesn't belongs to a different UOM category than the procurement UOM (probably because you sold in a bad unit).
You can detect all the procurements that have such an issue with the following SQL query:
select procurement_order.id, procurement_order.state, product_uom, product_uom.category_id as product_uom_categ_id, product_template.uom_po_id, t.category_id as proc_uom_categ_id
from procurement_order
join product_template on product_id=product_template.id
join product_uom on product_template.uom_po_id=product_uom.id
join product_uom as t on procurement_order.product_uom=t.id
where t.category_id != product_uom.category_id;
That might help you to spot the problem and fix your data.
Now, I think OpenERP should apply my attached patch: it will test the UOM category right at the before trying to run the procurement and if there is some UOM miss match, then it will let the procurement in an "exception" state with a specific message: "Procurement UOM and product purchase UOM categories mismatch!"
so you can find those errors and fix them. It's exactly the same error management as when the product has no supplier for instance so I believe this is correct.
We have been working for Kyle (bug reporter) lately and I can assure this patch fixes the bug at their installation.
Hello guys,
the good news is I HAVE A PATCH FOR THIS!
So: that bug occurs when you enter bad data in OpenERP: when the default purchase UOM, at the bottom of the product form doesn't belongs to a different UOM category than the procurement UOM (probably because you sold in a bad unit).
You can detect all the procurements that have such an issue with the following SQL query:
select procurement_ order.id, procurement_ order.state, product_uom, product_ uom.category_ id as product_ uom_categ_ id, product_ template. uom_po_ id, t.category_id as proc_uom_categ_id id=product_ template. id template. uom_po_ id=product_ uom.id order.product_ uom=t.id uom.category_ id;
from procurement_order
join product_template on product_
join product_uom on product_
join product_uom as t on procurement_
where t.category_id != product_
That might help you to spot the problem and fix your data.
Now, I think OpenERP should apply my attached patch: it will test the UOM category right at the before trying to run the procurement and if there is some UOM miss match, then it will let the procurement in an "exception" state with a specific message: "Procurement UOM and product purchase UOM categories mismatch!"
so you can find those errors and fix them. It's exactly the same error management as when the product has no supplier for instance so I believe this is correct.
We have been working for Kyle (bug reporter) lately and I can assure this patch fixes the bug at their installation.