One2Many products field resets to first variant after saving variant in product.product

Hi!

I’m using a custom product.template form, the products One2Many field (showing product.product variants) resets to the first variant after saving wefts (Many2Many) on, say, the third variant.

How can I keep the form focused on the edited variant after saving?

class Product(metaclass=PoolMeta):
    __name__ = 'product.product'
    wefts = fields.One2Many(
        'product.weft_yarn', 'product', 'Weft Yarns',
        states={'invisible': Eval('product_family', '') != 'woven_label'},
        help='Weft yarns used in this woven label variant (up to 16).'
    )

form →

<?xml version="1.0"?>
<form tree_state="1">
  <field colspan="4" name="wefts" />
</form>

The clients do not keep the selected record in form view. It only does it for tree view.
This would be a good improvement if someone provides a patch.