Dette spørgsmål er blevet anmeldt
5
Besvarelser
4484
Visninger
Hi,
You can override the create method, and you can update the values inside the vals variable and pass it.
@api.model
def create(self, vals):
# update vals as per the need and pass
result = super(ClassName, self).create(vals)
return result
Thanks
@Niyas Raphy thank you soo much for your help its solve my issue .... (y)
Hi Usman,
Use res instead of self and also you need to pass some context to avoid recurrent calling
By Using Following Code
if not res._context.get('block_call'):
You need to define your code insideWhile Calling Custom Create send Context like below codeself.with_context(block_call=True).create(values)
Thanks
Kan du lide at diskutere? Læs ikke bare med, deltag aktivt i debatten!
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
|
0
apr. 24
|
4184 | ||
|
|
0
dec. 19
|
6241 | ||
|
|
5
dec. 19
|
5612 | ||
|
|
0
aug. 19
|
4 | ||
|
|
1
feb. 19
|
8825 |
@Niyas Rephy yes
Please provide more description of what do you want to do
Hi, you are calling same create method inside the create method.