Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Default field value of a form view

By
Roberto Barreiro
on 2/27/14, 7:09 PM 7,965 views

How I can change the default value of a field in a form view in openerp7?

7

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 2/27/14, 9:27 PM

Hi; The simplest and easiest way , is to go under "Developer mode", and then open the form (you want), open the drop-down menu "Debug view" and choose "Set Defaults", modify the default values as you need.

steps to go under "Developer mode" and change default values (example of "Emplyee form"):

1-- image description

2-- image description

3-- image description

4-- image description

The more complexe way is to find the file where the field you want to change the default value is defined (created) [Probably in a class a_class definition after _columns = {.......} creation in _defaults = {..somewhere...here ..the default value....} statement, as in the example below ( extracted from the code mrp.py file of the mrp module)]: