Managing incidents with products


Our customer wants to post incidents that result in broken/junk product.

Typical use cases are:

  • Products may arrive faulty to the warehouse.
  • Sloppy manipulation may result in broken products.
  • Returned customer shipments due to damaged products.

The products are then moved to a drop location to control stock. Additionally, the scrapping of the product may be charged to a party, such as the vendor or some temporary work agency that manages the warehouse’s staff. A short text describing the cause of the scrapping is advised.

The company wants to post this to accounting. The book entry should be an inventory account to a loss account. The company wants the loss account to be configured per party.

This process is done by staff with no access to account moves, so a differend document should be created and then processed in order to create these account moves

Normally this is managed by either refusing the reception or move it to lost and found (

Then you can move it with internal shipment to lost and found.

It is managed by return shipments which can be triggered by the sale complaint module.

I think this should be managed by a new module for purchase complaint which should be the equivalent to sale complaint but based on purchase.

When moving products to lost and found, the stock accounting modules are automatically updating posting an accounting move.

I guess the Move._get_account_stock_move_lines can be customized to use a different account for type *_lost_found instead of the default IN/OUT.

For me it makes no sense to configure per party because products in stock are not linked to any party.

"A purchase_complaint could be a great addition to Tryton. Besides allowing to create a return and a credit note, it should be possible to generate an internal shipment to a lost/found location in order to manage the removal of damaged goods.

AFAIK a sales complaint can be created without an origin. This allows a sale complaint to be assigned to a party that is not related to the actual sale. I am wondering if we could use a similar method in purchase complaint to assign complaints to parties related to a damaged item but otherwise related. Is that correct?

Only temporary, if you do not set any origin any actions are available so the complaint is pointless.

As for this use case, an internal shipment can be used to move the broken products to lost/found, but the cause of the incident must be recorded and a party assigned. The party is usually the contractor that provides the personnel that manipulates the products.
How can we manage this data?

You could for example create a lost&found location per responsibility.

I published an implementation of this idea here: Issue 10199: Add purchase complaints - Tryton issue tracker

The implementation manages the creation of return purchases, creadit notes but also supports scrapping product to a waste location by creating an internal shipment.