# Start\_date + end\_date

**URL:** https://discuss.tryton.org/t/start-date-end-date/9077
**Category:** Ideas
**Created:** [February 2, 2026, 8:28am UTC](https://discuss.tryton.org/t/start-date-end-date/9077 "2026-02-02T08:28:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Xavi](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/x/8e8cbc/32.png) [@Xavi](https://discuss.tryton.org/u/Xavi)
#### Post date: [February 2, 2026, 8:28am UTC](https://discuss.tryton.org/t/start-date-end-date/9077/1 "2026-02-02T08:28:04Z")

</div>

Hi, while developing a custom model, I just copy pasted (again) those fields:  
`start_date = fields.Date(`  
` "Start Date",`  
` domain=[`  
` If(Eval('start_date') & Eval('end_date'),`  
` ('start_date', '<=', Eval('end_date')),`  
` ()),`  
` ])`  
`end_date = fields.Date(`  
` "End Date",`  
` domain=[`  
` If(Eval('start_date') & Eval('end_date'),`  
` ('end_date', '>=', Eval('start_date')),`  
` ()),`  
` ])`  
It is not a big deal but those 2 exists in many models, also being named as “from\_date” and “to\_date”, wouldn’t it be nice and simpler to have some kind of mixin like `DateRangeMixin` which just defines those 2 fields with the domain included? this would also have the benefit of having 1 translation for each.  
Thanks.

---

<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 2, 2026, 9:21am UTC](https://discuss.tryton.org/t/start-date-end-date/9077/2 "2026-02-02T09:21:16Z")

</div>

For me it will be a typical case of too much abstraction.  
If such mixin would exist, it will be very difficult to modify it because its usage would be too generic. And if it can not be modified, then it does not provide any benefit compare to copy/paste.
