# Default value of a field

**URL:** https://discuss.tryton.org/t/default-value-of-a-field/2918
**Category:** User
**Created:** [June 24, 2020, 10:07am UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918 "2020-06-24T10:07:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)
#### Post date: [June 24, 2020, 10:07am UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/1 "2020-06-24T10:07:26Z")

</div>

Hello

Is there a way that the administrator can define a default value for certain fields for it’s users (without development)

regards

---

<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: [June 24, 2020, 10:25am UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/2 "2020-06-24T10:25:46Z")

</div>

No because it will break everything without proper testing.

---

<div class="post-metadata">

### Author: ![sergyo](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/sergyo/32/181_2.png) [@sergyo](https://discuss.tryton.org/u/sergyo)
#### Post date: [June 24, 2020, 12:01pm UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/3 "2020-06-24T12:01:47Z")

</div>

> [@2cadz](#):
>
> Is there a way that the administrator can define a default value for certain fields for it’s users (without development)

You can take a look to [our fork](https://gitlab.com/datalifeit/trytond-default_value) of [default\_value](https://github.com/nanticzz/trytond-default_value) third party module. Our fork allows to define default values per user.

---

<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: [June 24, 2020, 2:37pm UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/4 "2020-06-24T14:37:40Z")

</div>

> [@2cadz](#):
>
> (without development)

I’m curious to know why you need such feature to be done without development.  
Creating a custom module to set the default values for the fields is an easy task

> [@ced](#):
>
> No because it will break everything without proper testing.

I do not see what it should be broken.  
If the default value is from the proper type it should not cause any issue.

---

<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: [June 24, 2020, 2:39pm UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/5 "2020-06-24T14:39:45Z")

</div>

> [@pokoli](#):
>
> I do not see what it should be broken.

I guess you never supported random users setting default value on OpenERP?  
There are soo much possible failure like bad default state, incoherent default values, none accessible value, etc.

---

<div class="post-metadata">

### Author: ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)
#### Post date: [June 24, 2020, 2:52pm UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/6 "2020-06-24T14:52:35Z")

</div>

> [@pokoli](#):
>
> I’m curious to know why you need such feature to be done without development.  
> Creating a custom module to set the default values for the fields is an easy task

For example to allow the administrator (who is not a developer) to define default payment terms (if the third party does not have one) or default advance payment term.

---

<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: [June 24, 2020, 3:07pm UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/7 "2020-06-24T15:07:47Z")

</div>

This is a typical case which can not be solved by a pseudo-generic default values tool because this can not enforce data integrity for Many2One values. (And more over it will badly fail to support multi-company.)  
But on contrary this should be managed by a configuration model.

---

<div class="post-metadata">

### Author: ![SISalp](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/sisalp/32/200_2.png) [@SISalp](https://discuss.tryton.org/u/SISalp)
#### Post date: [June 25, 2020, 4:24pm UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/8 "2020-06-25T16:24:13Z")

</div>

> [@ced](#):
>
> this should be managed by a configuration model

So for this question, but what is a configuration model ?

---

<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: [June 25, 2020, 4:39pm UTC](https://discuss.tryton.org/t/default-value-of-a-field/2918/9 "2020-06-25T16:39:40Z")

</div>

All the singleton Model that are used as “Configuration” entry.
