Let's say I add attachments to products.
How can enable all uploaded images to be available to public by default?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
dic 24
|
624 | ||
|
2
abr 22
|
3167 | ||
|
0
oct 21
|
2085 | ||
|
2
may 20
|
11513 | ||
|
2
dic 17
|
3675 |
where do you add this code