← Back to team overview

openerp-expert-production team mailing list archive

Re: Stock moves' and pickings' statuses are messed up

 

I can understand why audittrail would not suffice (not sure why it wouldn't
log stock_moves though, you can audit anything you like)

Even today you can delete stock moves depending on their status, so I think
you can agree this should be the first step then, eliminating the delete
operation.
What I would suggest is to use the 'active' field when something is
'deleted' then, at least it will not show up anywhere unless specifically
asked for.

Some code however does not check active because it bypasses the ORM and does
manual SQL queries, so I think we cannot afford to have records where
'active'=False and state <> 'cancel'.

So overriding stock.move.unlink() with something that just calls workflow
cancel status and sets active=False should go a long way...

I would find it surprising if OpenERP will integrate this into stable
though, best bet is to make an addon in extra_addons I think.

2010/8/30 Ferdinand Gassauer <office@xxxxxxxxxx>

> On Montag 30 August 2010 16:57:52 Niels Huylebroeck wrote:
> > Auditing ->
> > http://doc.openerp.com/technical_guide/audittrail.html#module-audittrail
>
> in V5 you can't rely on audit-trail
> it does not log stock_moves. it logs only stock_picking even if log
> stock_moves is set.
>
> And I wish everyone much good luck in reconstructing deleted pickings with
> associated deleted stock_moves.
> * product qty (and value cost of good sold)
> * stock location qty (and value cost of good sold),
> * changed average price for incoming goods and subsequent use of the new
> average price for outgoing products.
> * account_moves without stock_picking.

-- 
Niels Huylebroeck
Bubbles-IT
Tel. : +32 (0)9  328 33 88
Fax. : +32 (0)9 328 33 77
Web : http://www.bubbles-it.be

References