Let's say I add attachments to products.
How can enable all uploaded images to be available to public by default?
Let's say I add attachments to products.
How can enable all uploaded images to be available to public by default?
I solved it by:@api.model
def create(self, vals):
picture_public = {'public': True}
vals.update(picture_public)
return super().create(vals
would be great if you described some context, as @Mohamed asked...
I have a situation where I want to enable this option for existing images too.
Which model should I inherit to change it for good?
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscrever-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
0
dez. 24
|
3722 | |||
|
2
abr. 22
|
6448 | |||
|
0
out. 21
|
4226 | |||
|
2
mai. 20
|
14014 | |||
|
2
dez. 17
|
6189 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
where do you add this code