Comment 3 for bug 526081

Revision history for this message
Raphaƫl Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 526081] Re: usability: deleting product would better cascade delete related order point rules

Hello gpa,

not sure for warehouse and location. I would say yes, but not 100% sure. And
by the way, it's really more exceptional you remove a warehouse or a
location so manual intervention in those cases is more tolerable. So I mean
please to it for products, would be nice in 5.0.7, as for warehouse and
location, do it if you gain more confidence, I'm launching the manufacturing
experts on it right now.

Thanks

On Fri, Feb 26, 2010 at 7:18 AM, gpa(Open ERP) <email address hidden> wrote:

> Hello Raphel,
>
> I agree completely for product_id to have ondelete='cascade'.
> I would like know whether its also useful o apply ondelete cascade to
> warehouse and location too?
>
> Thanks
>
> ** Changed in: openobject-addons
> Assignee: (unassigned) => gpa(Open ERP) (gpa-openerp)
>
> --
> usability: deleting product would better cascade delete related order point
> rules
> https://bugs.launchpad.net/bugs/526081
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in OpenObject Addons Modules: New
>
> Bug description:
> Hello,
>
> In the mrp module, in mrp.py file, in the stock.warehouse.orderpoint object
> definition, I think it would be more user friendly to add a delete cascade
> on the product_id key, so that when the user delete a product, it will also
> delete associated order point rules rather than break into that ugly
> exception:
> "
> Integrity Error
> null value in column "product_id" violates not-null constraint
> CONTEXT: SQL statement "UPDATE ONLY "public"."stock_warehouse_orderpoint"
> SET "product_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "product_id""
> "
>
> So if you think that's all right, please apply to provided patch; seems to
> work well for me.
>
> Hope this helps
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/openobject-addons/+bug/526081/+subscribe
>