Comment 5 for bug 1197467

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: OpenERP Enterprise Edition Bugfix: duplicate inventory lines produce wrong posted inventories

Le 12/07/2013 07:26, Rifakat Haradwala (rha) a écrit :
>
> Hi Lionel,
>
> In your case you might have using your date with timestamp 00:00:00,
> but what about other users?
> Normally no one would ever enter date with timestamp 00:00:00, (...)
>
The mandatory yearly inventory is part of the accounting/fiscal year
closing procedure: it MUST happen at the end of the period, so in all
logic it should be dated right after the last day, at 00:00:00 (local time).
Will all due respect, I think everyone should do it this way.
It's good practice and OpenERP supports it out of the box: it's a good
design except for this bug.
>
> (...)if I create constraint considering this date field then I have an
> impression that the constraint will never get executed as date
> normally will not match.
>
Yes of course: constraints only catch errors!

Anyway, it's would only be a workaround.
Now I think it's better to fix the bug than work around it. Stock Moves
should be created correctly when several inventory lines have the same
date+product+lot+location.
Maybe the problem just to that the Stock Moves dated at the exact same
date of the inventory are excluded from the computation?

> Do you suggest any generic possible solution which can work for any
> user? This looks more like your specific requirement and I can provide
> a patch for you.
>
It's not specific, I use only standard features in a way supported by
the standard: multiple concurrent inventories with precise dates.
Let's call it a corner case.

Sorry I kept you waiting so long. I hope this helps you progress towards
a solution. Thanks for your support.

Lionel.