[FIX] contract: Set groups in back_in_edit_mode link to show only correct users

This commit is contained in:
Víctor Martínez
2021-01-18 09:27:10 +01:00
parent ecacc4e8f2
commit 1f616b56b1
2 changed files with 7 additions and 1 deletions

View File

@@ -113,6 +113,12 @@ class ContractContract(models.Model):
string="Modifications",
)
def get_formview_id(self, access_uid=None):
if self.contract_type == "sale":
return self.env.ref("contract.contract_contract_customer_form_view").id
else:
return self.env.ref("contract.contract_contract_supplier_form_view").id
@api.model_create_multi
def create(self, vals_list):
records = super().create(vals_list)