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
12月 24
|
2233 | |||
|
2
4月 22
|
5077 | |||
|
0
10月 21
|
3241 | |||
|
2
5月 20
|
12869 | |||
|
2
12月 17
|
5017 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
where do you add this code