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?
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
0
ديسمبر 24
|
645 | ||
|
2
أبريل 22
|
3208 | ||
|
0
أكتوبر 21
|
2109 | ||
|
2
مايو 20
|
11529 | ||
|
2
ديسمبر 17
|
3688 |
where do you add this code