Serialnumber tracking

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.


Use multiple lines with qty=1.

Project Team


  • Jan Kantert

Functional Specs

  • Jan Kantert


  • Jan Kantert


  • Jan Kantert



Many industries need to track individual units of one product by serialnumbers through the whole life cycle.

  • On material receipt all serialnumbers need to be scanned one after another.
    • person need to select product/scan barcode
    • a new window/tab needs to be opened (we can probably reuse scan inventory enhancement here)
    • all the serialnumbers should be scanned into the window
    • on duplicate numbers there needs to be acustic and optical signs
    • qty on the receipt line needs to be updated automatically
  • On shipping the serialnumbers need to be scanned again
    • should be possible to select serialnumber from list
    • additionally it should be possible to hide the list for some users so the user has to scan the right product and cannot just select one line
  • Serialnumbers should be saved an printed in every invoice/shipment
    • need to be checked and tracked on RMA and Vendor RMA

At the same time we need to clean up Locator tracking. There are several issues which can result in negative qty and a chaos warehouse. There are basically two things to fix:

  • Inventory movements may not result in negative qty!
  • when processing a shipment we need the possibility to:
    • show where the product is located
    • tell the system wherefrom we took the product (to have right qty at right locator)

While trying to fix the locator problems I experienced some other problems we need to fix too:

  • Product are reserved on basis of MStorage lines, which also contain locators. I did not yet find a case where this is useful. Probably it exists but normally it doesnt make sense at all.
    • Resoltion: Create a new Model MStorageReservation to keep reserve:
      • a product
      • a certain qty
      • in a specific warehouse (optional)
      • with specific attributes (optional)
      • at a specific locator (optional)

I should probably rename this page to fix the storage problems ;-).


After speaking to the mighty kontro I realized that my first idea was .... not so good ;-). I started to develop a design with karsten and added reservation with help of norbert. Here is the (hopefully final) approach:

  • Add M_Storage_ID to M_Storage
  • Create M_Serial
    • M_Serial_ID
    • SerNo
  • Create M_InOutLineSerial, M_MovementLineSerial, M_InventoryLineSerial, M_ProductionLineSerial
    • FK to the corresponding *Line_ID
    • FK to M_Serial_ID
  • add "MSerial[] getSerials" to
    • MInOutLine
    • MProductionLine
    • MStorage
  • modify "completeIt()" in
    • M_Inventory
    • M_InOut
    • M_Production
  • add a field "IsSerialMandatory" to M_Product
  • create MInOutLineLocator
    • when creating an shipment/movement it will be filled with all locators + available qty
    • user needs to enter qty for each locator (will be filled with old logic, locators with most qty first, we could add some logic here later on)
    • if serialnumbertracking is mandatory for product this table is read only and will be filled by serialnumbercontrol
  • modify "bool add()" in MStorage to
    • take another parameter "M_Serial[] Serialnumbers"
    • create/delete rows in MSerial (seperate private functions)
    • deny update if serialnumbers are mandatory for product and count of "Serialnumbers" differs from sum of diffQtyOnHand, diffQtyReserved, diffQtyOrdered
    • take a list of Locators + Qty (interface to MInOutLineLocator)
    • act as a wrapper for M_Storage_Reservation to keep compatibility
  • Add Tab "Serials" below
    • Products->Storage
    • Warehouse & Locators->Storage->Locator
  • create M_Storage_Reservation (i'll check if this can be done using a view)
    • Qty
    • M_Product_ID
    • FK M_ProductAttributeSetInstance_ID (optional)
    • FK M_Locator_ID (optional)
    • FK M_Storage_ID (optional)
    • FK M_Serial_ID (optional)

See Also