Community mailing list archives

community@mail.odoo.com

Re: Select default value in many2one field

by
Kalpana Hemnani
- 11/23/2015 00:05:10
Hello Omar,

You can create XML record of Many2one field and give reference of that XML ID in default method. 

Hope this helps!

Thanks and Regards,
Kalpana Hemnani
Team Leader
Drishti Group
Mobile : +91 7405477141
Skype : kalpana.drishti

On 22 November 2015 at 21:12, Mohamed Magdy <moh.magdy40@gmail.com> wrote:
Hi Omar,

I think it will not be easy to add a default value for the Many2one field, it should be done using the context in the XML file.

Best Regards,

Mohamed Magdy
Odoo Technical Team Leader
Mob 1: +201114347478
Mob 2: +201095179215

On Sun, Nov 22, 2015 at 2:52 PM, Omar Ouhari <omar.ouhari@gmail.com> wrote:
Hi community,

I have a many2one field and I want to select default value depend of his parent.
I do this:

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


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



Thanks