Hi,
How to make a view editable for only particular number of days , is it possible to do this using field view get function.....
Hi,
How to make a view editable for only particular number of days , is it possible to do this using field view get function.....
How I achieve something like by using following piece of code:
@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
if view_type == 'form':
res['arch'] = self.fields_view_get_address(res['arch'])
record = self.env['crm.lead'].browse(self._context.get('params').get('id'))
# restrict modification and deletion of child ids
if record.parent_id:
res['arch'] = res['arch'][:6] + 'edit="false" delete="false" ' + res['arch'][6:]
elif record.stage_id.id == 4: # restrict edition of Purchased Lead
res['arch'] = res['arch'][:6] + 'edit="false" ' + res['arch'][6:]
return res
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
fields_view_get not being triggered
Rezolvat
|
2
nov. 16
|
7643 | ||
|
New API style for fields_view_get?
Rezolvat
|
1
sept. 15
|
6049 | ||
|
3
aug. 15
|
10541 | |||
|
1
iul. 15
|
9731 | |||
|
1
mar. 15
|
6857 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.