Hi, I have created a related field on the product.template form in hope to duplicate the field and have it placed somewhere else.
In the _columns{} section of a class, I have added :
'default_code_duplicate' : fields.related('product_variant_ids', 'default_code', type='char', string='SKU:'),
And in the view I have added:
<field name="arch" type="xml">
<div name="options" position="inside">
<div>
<label for="default_code_duplicate"/>
<field name="default_code_duplicate"/>
</div>
</div>
</field>
The field shows up fine and i thought it was working correctly until I created a new record and inputted data to this field. The data dissapears on 'Save'. When I click edit, then enter again in the same field, and click save - the data stays.
Could this be something to do with the fact it is a temporary record when you click create, and not written to the database yet?
Is this the correct way to go about this? I don't actually need to duplicate the field, but simply move it - but i didn't know how to do that - so I went about doing it this way.
Thanks