How to add default lines for One2Many field, I know method default_field should work like Many2One does, but when I return product_product.id didn’t work for me.
In my use case most of sale products are always same 2-5 I wanted to have default these on One2Many by default, so user can add new or delete existences.
What I think is possible:
prods = Pool().get(‘product.product’)
items = prods.search((‘code’, ‘=’, ‘item1’))
# use de cls.items_one2many_field (‘add’, items) here?
# how properly use that add call to link products by deafult?
Sorry if the question is not advance level, these are new things to me.