When I confirm an order (sale.order) then it creates a stock.picking related to this order (when I confirm the sale order). I have a new field "insurance" at stock.picking which is filled when I select a carrier and then sums values of all lines excluding shipping and puts it in this field. I launch this with an @api_onchange method related to the carrier_id of the stock.picking
I want to directly set this value when stock.picking is created (when confirm an order clicking in Confirm button). How can I do this? I didn't find where the stock.picking is being created.
I'm using OCA delivery carrier branch and odoo v13