Community mailing list archives

community@mail.odoo.com

Re: entered-form dat disappeared

by
tibyan.hussien
- 10/25/2015 08:53:36
Nothing happened with default=True
related field is easier than onchange function

On 25 أكت, 2015 م 03:31, Jay Vora wrote:
<blockquote cite="mid:CACHFH7n_imt+mwkuhH6eoD7cyG87K_UgOre7kjGuduxY2hMG3w@mail.gmail.com" type="cite">
Salam Tibyan,

Add default=True to your field definition. I do not knowwhy you use related.

Like :
active = fields.Boolean(string='Active state', related='emp_ids.active', default=True)

On Sun, Oct 25, 2015 at 4:56 PM, Tibyan Hussien <tibyan.hussien@visionvalley.net> wrote:
Salam All
After I added active field on my module
active = fields.Boolean(string='Active state', related='emp_ids.active')
which
     emp_ids = fields.Many2one('hr.employee', 'Employee')
I lost data that entered into the form and saved.

Regards,
Tibyan

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
The Splendid journey of 2 years in Numbers
---
Regards,
Jay Vora,
Managing Director,
<img src="cid:part1.09000700.05080805@serpentcs.com" style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Serpent Consulting Services Pvt. Ltd.
Web : http://www.serpentcs.com
Mobile : 91 - 9879354457
Twitter: jaynvora
Skype: jaynvora
Blog : http://jayvora.blogspot.com

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe