diff --git a/odex25_transactions/exp_transaction_documents/models/entity.py b/odex25_transactions/exp_transaction_documents/models/entity.py index fd66c9040..afc5ccf01 100644 --- a/odex25_transactions/exp_transaction_documents/models/entity.py +++ b/odex25_transactions/exp_transaction_documents/models/entity.py @@ -132,6 +132,7 @@ class Entity(models.Model): @api.onchange('is_employee','employee_id') def onchange_employee_id(self): + self = self.sudo() self.name = self.employee_id.name self.person_id = self.employee_id.iqama_number.iqama_id self.email = self.employee_id.personal_email diff --git a/odex25_transactions/exp_transaction_documents/views/entity.xml b/odex25_transactions/exp_transaction_documents/views/entity.xml index 1a5a1d137..0c6f6957e 100644 --- a/odex25_transactions/exp_transaction_documents/views/entity.xml +++ b/odex25_transactions/exp_transaction_documents/views/entity.xml @@ -26,7 +26,7 @@ -