0
2 Answers
0
Best Answer
Hi ,
Try to add the domain in the destination location like:
< field name="source_location"/ >
< field name="destination_location" domain="[('id', '!=', source_location)]"/ >
Please vote the answer if it work.
0
Best Answer
** Assuming this two fields have Many2one connection with res.country **
from odoo import models, api
class YourClass(models.Model):
_inherit = 'module.model'
@api.onchange('source_location')
def set_domain_destination_location(self):
for rec in self:
domain = {'destination_location': [('id', '!=', rec.source_location.id)]}
return {'domain': domain}
4
Comments