← Back to team overview

openerp-community-reviewer team mailing list archive

[Bug 1197467] Re: duplicate inventory lines produce wrong posted inventories

 

Hi,

I had the same problem.
Like Lionel Sausin, I think there are real cases with several entries with same product/location.
The user's warehouse is not as tidy as OpenERP's. There may be products of same kind on different places, and user won't look for the line already entered.

Julien Weste's code seems a good solution, but I'll have 2 things to say :
 - First, although I'm ok with merging stock moves, is it good to merge inventory lines? User might want to check it and not understand.
- Second, there is another problem, and I don't know if it's the right place to discuss it, but we could kill two birds with one stone : currently if we enter an inventory line with uom different from product's default uom, there may result in an incorrect move line.

explanation of the bug :
Let say I have 14 eggs in OpenERP (default product uom)
In annual inventory I find and enter 2 dozens (which may be purchase uom)
Currently, OpenERP rounds 14 eggs to 1 dozen, and generates a +12 eggs stock move, which makes 26 instead of 24

So if we change just a little Julien Weste's code, converting quantities
to default product uom in the first loop (when lines dict is filled),
this bug would be fixed

Regards,

-- 
You received this bug notification because you are a member of Stock and
Logistic Core Editors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1197467

Title:
  duplicate inventory lines produce wrong posted inventories

Status in OpenERP Addons (modules):
  In Progress

Bug description:
  When you enter an inventory with several lines containing the same (product,location,prodlot) tuple, the posted inventory is not consistent : all lines are processes independently of each others, but they all relate to the same initial quantity.
  As a consequence, differences are found even when the total of all the "duplicate" lines is right. Please see the attached screencast for an illustration of the problem, where I can make the stock wrong twice even though I entered correct quantities, split in 2 lines.

  The simplest solution would be to forbid "duplicate" inventory lines
  with the same (product,location,prodlot) tuple.

  Another possible solution would be to let users insert duplicates, but
  sum them up before computing the difference with the initial stock.
  This would be interesting as it would allow users to enter products
  one by one (possibly with a barcode scanner).

  Lionel Sausin.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1197467/+subscriptions