Passing data between two forms (one2many)

is it possible i could pass the data between forms ?
like i want to pass some string ? from supplier shipment to incoming move they are having one2many relationship

While I am not very experienced with Tryton, I think it is better if you explain what problem you want to solve rather than asking about how to implement the solution you thought about.

Often when I try to do something that is discouraged in Tryton there is usually a better way to do it using standard methods.

I find it useful to think about the Model rather than the forms that display records of the model.

Maybe you need to add a function field to one of the models you are working with?

1 Like

In a supplier shipment i need to pass supplier id to incoming move automatically . so supplier shipment form is having incoming move field which is one2many relationship between stock move .

If you already have a one2many relationship you can just extend the view (form) of supplier shipment in order to display this field like this.

If I understand correctly:
Model stock.shipment.in has incoming_moves field which is a one2many to stock.move model.
You want to display the stock.move records that are associated with the current stock.shipment.in record.

Edit: It seems I do not understand what you are trying to do, the form already has the incoming moves.

If I understood you correctly you don’t need to pass this data. The incoming moves have a reference to the supplier shipment they’re part of and can thus access this data.

yes but i need to know if that incoming move data is filled from the supplier shipment

You can add a context as argument of the one2many field as it’s done here.
This way you will be able to know if the move is getting filled from the one2many field just checking the context.

I don’t understand what you’re trying to do :disappointed_relieved:

thanks
is it possible i could send the field value ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.