mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
@@ -129,6 +129,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)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<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" t-value="'/web#return_label=Website&model=contract.contract&id=%s&view_type=form' % (contract.id)"/>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user