mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract: Set groups in back_in_edit_mode link to show only correct users
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</template>
|
||||
<template id="portal_contract_page" name="My Contract">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="o_portal_fullwidth_alert">
|
||||
<t t-set="o_portal_fullwidth_alert" groups="account.group_account_invoice">
|
||||
<t t-call="portal.portal_back_in_edit_mode">
|
||||
<t
|
||||
t-set="backend_url"
|
||||
|
||||
Reference in New Issue
Block a user