← Back to team overview

openerp-expert-production team mailing list archive

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

 

Is very easy to delete prodcts and stock moves in cascade, but pay
attention to this situation:
I suppse that two years ago my company used a product (incoming stock,
outgoing stock, invoice etc.) but in this year will be not used anymore,
and a new user decide to delete this product. What about historical
moves?

On Jo, 2010-08-12 at 06:35 +0000, ViktorNagy wrote:
> ** Patch added: "stock_move_ondelete.patch"
>    http://launchpadlibrarian.net/53540871/stock_move_ondelete.patch
>

-- 
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.