← Back to team overview

openerp-india team mailing list archive

[Bug 1073106] Re: Changing product on production lots must be forbidden

 

I suggest you take the same approach as in Bug #707287 : overload write() and raise an error if users try to change the product.
It's OK if you don't bother checking whether the lot has stock moves attached or whatever - keep it simple.
Lionel.

** Description changed:

  When modifying a production lot (aka serial number in trunk), there is no check to assert that the changes are consistent with the existing data.
  So users are allowed to change the product even though stock moves have been recorded using this prodlot.
  But this makes it impossible to move the existing stock, or even to make an inventory of it or to scrap it.
  
- So, users should just not be allowed to change the product. 
+ So, users should just not be allowed to change the product.
  Ideally, the field should become read-only as soon as there has been a stock move recorded.
- If that's not feasable, OpenERP should at least raise a clean error message, and advice them to use another method. For example: "You cannot change this Production Lot because Stock Moves refer to it. You may want to  create a new Production Lot and make an inventory to remove the current stock of this Production Lot, and create a stock of the new Production Lot."
+ If that's not feasible, OpenERP should at least raise a clean error message, and advice them to use another method. For example: "You cannot change this Production Lot because Stock Moves refer to it. You may want to  create a new Production Lot and make an inventory to remove the current stock of this Production Lot, and create a stock of the new Production Lot."
  
  Lionel Sausin.

-- 
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/1073106

Title:
  Changing product on production lots must be forbidden

Status in OpenERP Addons (modules):
  New

Bug description:
  When modifying a production lot (aka serial number in trunk), there is no check to assert that the changes are consistent with the existing data.
  So users are allowed to change the product even though stock moves have been recorded using this prodlot.
  But this makes it impossible to move the existing stock, or even to make an inventory of it or to scrap it.

  So, users should just not be allowed to change the product.
  Ideally, the field should become read-only as soon as there has been a stock move recorded.
  If that's not feasible, OpenERP should at least raise a clean error message, and advice them to use another method. For example: "You cannot change this Production Lot because Stock Moves refer to it. You may want to  create a new Production Lot and make an inventory to remove the current stock of this Production Lot, and create a stock of the new Production Lot."

  Lionel Sausin.

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


References