# Asset subscribed

**URL:** https://discuss.tryton.org/t/asset-subscribed/566
**Category:** Feature
**Tags:** sales
**Created:** [May 28, 2018, 11:09am UTC](https://discuss.tryton.org/t/asset-subscribed/566 "2018-05-28T11:09:05Z")
**Posts on this page:** 4
**Page:** 1

<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: [May 28, 2018, 11:09am UTC](https://discuss.tryton.org/t/asset-subscribed/566/1 "2018-05-28T11:09:05Z")

</div>

## Rational

Some kind of subscriptions involve an asset of the company (ex: cars, building etc.). In such case it may be required to know which asset is rent to who. Also we should ensure that the same asset is not rent twice over the same period. And we must provide a way to let the user select available assets for the subscription period.

## Proposal

- Add a `Man2Many` pointing to stock lots of assets on subscription service.
- Add a `Many2One` pointing to a [serial](https://bugs.tryton.org/issue6442) lot number on the subscription line. It must be a lot number from the subscription service.
- Add on serial lot number a `Function` field “Subscribed” for the contextual date which point to the current subscription line.
- Add a constraint on subscription line with a lot number to not overlap.
- Add a `Many2Many` readonly fields on the subscription service which shows the available and not available lots for the current date (using [filter](http://doc.tryton.org/4.8/trytond/doc/ref/models/fields.html#trytond.model.fields.Many2Many.filter)).

The lot must be removed from the lines when the subscription is canceled.  
The lot will be required for a running subscription with a service linked to lots.

## Implementation

> **[RFC: Asset subscribed (#7486) · Issues · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/issues/7486)**
>
> Following: https://discuss.tryton.org/t/asset-subscribed/566 Files Download Creator Timestamp

## Future Improvement

- Create customer shipment for the rent assets.

---

<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: [May 28, 2018, 11:31am UTC](https://discuss.tryton.org/t/asset-subscribed/566/2 "2018-05-28T11:31:33Z")

</div>

For performance, it will be good to implement the feature [exclude with range](https://bugs.tryton.org/issue7471).

---

<div class="post-metadata">

### Author: ![nicoe](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/nicoe/32/2880_2.png) [@nicoe](https://discuss.tryton.org/u/nicoe)
#### Post date: [June 1, 2018, 10:17am UTC](https://discuss.tryton.org/t/asset-subscribed/566/3 "2018-06-01T10:17:42Z")

</div>

Here’s the implementation: [RFC: Asset subscribed (#7486) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue7486)

---

<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: [December 21, 2018, 5:00pm UTC](https://discuss.tryton.org/t/asset-subscribed/566/4 "2018-12-21T17:00:03Z")

</div>

This topic was automatically closed after 14 days. New replies are no longer allowed.
