Skip to Content
Menu
This question has been flagged
1 Reply
7484 Views

       I went to set a default values for a one2many field odoo ike this:

  

how can i do that

Avatar
Discard

To get parent value in one2many we may use context in XML: https://goo.gl/XXg5D3

Best Answer

Add context="{'default_<field>... in your one2many field in the view definition. Here's an example.

https://github.com/odoo/odoo/blob/12.0/addons/product/views/product_views.xml#L75 

Avatar
Discard
Related Posts Replies Views Activity
2
Jul 24
939
1
Jun 24
3560
1
Oct 23
8582
1
Oct 23
97
1
Aug 23
2192