# Solution to track item on loan to customer with sale

**URL:** https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030
**Category:** User
**Created:** [February 21, 2022, 7:41pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030 "2022-02-21T19:41:08Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [February 21, 2022, 7:41pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/1 "2022-02-21T19:41:08Z")

</div>

Is it possible to track a container on loan to a customer that stores the product purchased?

I have a use case where a customer purchases product stored in a container that is to be returned.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [February 22, 2022, 12:02am UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/2 "2022-02-22T00:02:31Z")

</div>

I guess you could use an asset with a lot number to be included in the customer shipment.  
Then you would need to create/plan the return of the asset. Or if you do not have too much customer, you could use one customer location per customer to keep track of the assets.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [February 22, 2022, 1:30am UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/3 "2022-02-22T01:30:49Z")

</div>

@vincent could you “sell” the container to the customer for $0 and then return the sale when the customer returns the container?

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [February 22, 2022, 2:13pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/4 "2022-02-22T14:13:49Z")

</div>

Interesting use case. For example the so called ‘euro’ pallets ([EUR-pallet - Wikipedia](https://en.wikipedia.org/wiki/EUR-pallet)) are also lended to the customer. Because they are expensive and quality products, most companies are lending them including an monthly fee. In such way they are certain to get their pallets back.

Because of automation you also see now plastic crates and boxes with a fixed size which can be handled by the automatic warehouse robots. Even a small part is put into the crate. When the products are delivered, the crates are taken back or left behind but with the next delivery they will take them. It reduces packaging and materials, but it gives a bit more burden to track the crates because customers find them also useful and start using them for their own.

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [February 23, 2022, 10:19am UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/5 "2022-02-23T10:19:59Z")

</div>

> [@ced](#):
>
> I guess you could use an asset with a lot number to be included in the customer shipment.  
> Then you would need to create/plan the return of the asset. Or if you do not have too much customer, you could use one customer location per customer to keep track of the assets.

How do you add the asset to the customer shipment? Is this done after the sale?

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [February 23, 2022, 10:23am UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/6 "2022-02-23T10:23:32Z")

</div>

> [@edbo](#):
>
> Interesting use case. For example the so called ‘euro’ pallets ([EUR-pallet - Wikipedia](https://en.wikipedia.org/wiki/EUR-pallet)) are also lended to the customer. Because they are expensive and quality products, most companies are lending them including an monthly fee. In such way they are certain to get their pallets back.

Yes, similar to this. In my use case, the containers are purchased by the business running Tryton and loaned to the customer.

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [February 23, 2022, 10:41am UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/7 "2022-02-23T10:41:02Z")

</div>

Is something like ‘packaging deposit money’ a possibility? You invoice a certain amount for the container and credit that when the container is returned. This is to make sure the containers are returned. When you create a credit invoice a return shipment is created automatically.

No idea if this is possible, but maybe you can also create a separate storage location for your containers so you can track them and call the customer to return the container.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [February 23, 2022, 10:53am UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/8 "2022-02-23T10:53:44Z")

</div>

> [@vincent](#):
>
> How do you add the asset to the customer shipment? Is this done after the sale?

I guess because you do not know which palette or container you will be using at the shipment.

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [February 28, 2022, 12:17pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/9 "2022-02-28T12:17:29Z")

</div>

This makes sense.

How do I create a report showing assets that are on loan?

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [February 28, 2022, 4:10pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/10 "2022-02-28T16:10:31Z")

</div>

> [@vincent](#):
>
> How do I create a report showing assets that are on loan?

You should do a search on the customer location to search for all products of asset type and quantity \> 0.

Note that if you require to have a report per customer you will need to have a location for each customer

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 9, 2022, 6:54pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/11 "2022-09-09T18:54:33Z")

</div>

I’m adding to this topic as I would like to solve this with a better solution.

> [@ced](#):
>
> I guess because you do not know which palette or container you will be using at the shipment.

Actually, we do know which container is part of the shipment. The full life cycle of the container is that it is purchased. Then when a customer purchases an oil, the oil is transferred from a holding tank to one of these containers. The customer receives the oil in this container. When the customer has used all the oil, they return the container and it needs to be cleaned. It is a compliance requirement to clean the container and record when it was cleaned and by whom.

I thought that I could use the production process to allow a user to define which container the oil was transferred into, but I don’t think this can work as it is currently to then also be able to produce a report of which containers are located at which customers. Furthermore, this does not provide the solution to also track the ‘state’ of the container and record the cleaning.

Is this time to create a topic for a new feature?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 9, 2022, 9:46pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/12 "2022-09-09T21:46:37Z")

</div>

> [@vincent](#):
>
> Actually, we do know which container is part of the shipment.

So it is done at the shipment. So the point is to add to the shipped products the returnable packages (which are assets).

> [@vincent](#):
>
> When the customer has used all the oil, they return the container and it needs to be cleaned. It is a compliance requirement to clean the container and record when it was cleaned and by whom.

Then you need a new document to record this process.

> [@vincent](#):
>
> be able to produce a report of which containers are located at which customers.

As assets this will be tracked by stock moves.

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 12, 2022, 6:36pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/13 "2022-09-12T18:36:42Z")

</div>

> [@ced](#):
>
> So it is done at the shipment. So the point is to add to the shipped products the returnable packages (which are assets).

Thanks, I’ll see if I can do it.

And would I use a trigger to change the state of the asset to “dirty” on the creation of the shipment?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 12, 2022, 7:22pm UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/14 "2022-09-12T19:22:10Z")

</div>

> [@vincent](#):
>
> And would I use a trigger to change the state of the asset to “dirty” on the creation of the shipment?

I do not know what you mean by “assets”. There is no specific record for an asset to which such state can be updated.

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 13, 2022, 11:54am UTC](https://discuss.tryton.org/t/solution-to-track-item-on-loan-to-customer-with-sale/5030/15 "2022-09-13T11:54:38Z")

</div>

Sorry, I used the term assets because this is what you used in your earlier reply.

What I mean is lot actually.
