I opened a question yesterday (https://www.odoo.com/pt_BR/forum/help-1/question/how-to-keep-multiple-many2many-fields-on-the-same-model-145401) about how to have multiple Many2many fields. Now I am encountering the same problem with One2many fields, but can't get that right because I can't inform table_name as a relation.
My two models are the following:
When assigning different subscription.basket.line's to legumes fields to a subscription.basket record, for example, after creating the record all fields will have the same values, which is not the behavior I expect. How do I get this right on One2many fields, so each field will have its own list of subscription.basket.line itens?
As an example, I overwrote the create function to get logs:
Then, when creating a record, informing a product just to the fields "legumes", I get the following log for the vals I received:
Vals received on creation: {'date_end': '2019-02-06', 'name': 'Cesta', 'date_start': '2019-02-05', 'legumes': [[0, 'virtual_609', {'product_id': 1000, 'min_quantity': 0}]]}
And the following log for the field "temperos", which I would expect to be empty, on the creation response:
Field temperos.product_id on creation response: product.product(1000,)