← Back to team overview

openerp-india team mailing list archive

[Bug 980005] Re: [trunk]/[6.1] with different locations, shop and warehouse can sell and delivery products from other

 

Hello Compuservice,

I have completely traced this issue and I have also agree with you that
we have to allow out product based on our shop of the sale order. We
have already one error message (Not enough stock !) on sale order line
which will show us that you have currently some qty are available  and
you can not sale more then this qty. But this message checked the
quantity based on out product's qty (for the company), rather then it
will be checked on following manner.  Check our Sale order 's shop and
shop have m2o field warehouse, now this warehouse's stock location's
virtual stock should be checked on this message which will solved your
issue.

 We can not put a restriction on delivery order because in openerp have a force reservation option that allow us to negative qty.
 
I have try to fix it, but it requires a lots of changes. First we have to pass a shop_id as context on product_id_change after that we have to match those shop_id on shop's browse object and found the stock location of warehouse which warehouse assigned on shop. Location object contains virtual_stock and real_stock function field. So this  virtual_stock function field 's qty checked on compare_qty (1323# sale.py). Now here generate the question of product_id because stock location doesn't have the product_id field. So we can not found our virtual_stock based on the product. 

That's why this improvement needs a lot of changes. We already have an
another option here, which is pointing out same issue, Open the product
field with magnifier glass you can see the shop location's qty their
which help us to seen our product's qty on shop's stock location. So
this is not a blocking point rather than a good improvement.

That's why I am setting this as a "Wishlist".

Thanks for the understanding!

** Changed in: openobject-addons
   Importance: Low => Wishlist

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/980005

Title:
  [trunk]/[6.1] with different locations, shop and warehouse can sell
  and delivery products from other

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  Hi, with same company:

  Default values are shop1, locations1 and warehouse1

  1.- Create new stock and output location (locations2)

  2.- create a new warehouse and point to locations created in 1.-
  (warehouse2)

  3.- Create a new shop with warehouse create in 2.-
  (shop2)

  4.- Create a purchase order point to warehouse1 with 100 units of
  product X  (a stockable product)

  5.- Process pickin  (Incoming)
       stock location number    -     product     -       stock real       -        stock virtual
               1                                                        X                                   100                                      100
               2                                                        X                                      0                                            0

  6.- Internal move from   location1   to location2 for 50 units (ref to shop2):
       stock location number    -     product     -       stock real       -        stock virtual
               1                                                        X                                   50                                     50
               2                                                        X                                   50                                     50

  7.- sell 60 units of product X from shop2
       stock location number    -     product     -       stock real       -        stock virtual
               1                                                        X                                   50                                     50
               2                                                        X                                   50                                    -10

  No problem, the system dont warning about the stockout (I dont have 60
  units on shop2, warehouse2, location2...)

  8.- Process the delivery order
       stock location number    -     product     -       stock real       -        stock virtual
               1                                                        X                                   50                                     50
               2                                                        X                                  -10                                    -10
  No problem, the system permit this

  I think, if I have a different shop with different warehouse, I dont
  have permission to sell products without stock on this locations.

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


References