Hello,
Is there a way you can have a fake many2one field on a model without storing it on the database? I know the related field will do this, but the problem with that is it also changes the related record's value once I make a change to the related field and I dont want to do that.
For example, lets say I have a related field named 'company_rel' which is linked to a partner_id (many2one) field that points to the company_id field like this:
'company_rel': fields.related('partner_id', 'company_id', relation='res.company', type='many2one', string='company')
If I add the company_rel field to the form view, and change the value, then it also changes the value for the related partner as well, which is what I dont want to do.
I also tried using the dummy field type, which almost works, but when I make a selection from the drop down list, it returns a False value when I try to use the selected id in another method.
I also tried making a regular many2one field where I set the store=False attribute, but that didnt work either
Is there a way to make a fake many2one field so that I can use the selected id in another method without storing it to the field to the database?
How are you trying to use the selected value of the many2one?. Dummy should work, please expose the use that you need to do with the fake field many2one