← Back to team overview

openerp-expert-production team mailing list archive

[Bug 616634] Re: deleting a product would better cascade delete related stock.moves

 

Hello ViktorNagy,

   It's not feasible to delete the stock moves when we delete a product.
As It can be a scenario that a company is having a product and it has
stock moves as its being sold, purchased or manufactured. Now when a
company stops dealing with this product so the product is deleted, but
the past stock moves should be there as they are the actual moves that
existed in the past. And one may want to see all the stock moves in the
past then these stock moves might get lost. So IMHO the moves should not
be deleted on deleting a product.

Thanks.

** Changed in: openobject-addons
       Status: New => Opinion

-- 
deleting a product would better cascade delete related stock.moves
https://bugs.launchpad.net/bugs/616634
You received this bug notification because you are a member of OpenERP
Manufacturing Experts, which is a direct subscriber.

Status in OpenObject Addons Modules: Opinion

Bug description:
Similar to #526081, but concerns the stock module.

Deleting a product gives the well-known error:
„null value in column "product_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."stock_move" SET "product_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "product_id""

I would suggest cascade delete.