Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2185 มุมมอง

In Odoo, there are no log notes for adding or removing attachments.

Is there a solution for this? Our technology teams attach datasheets to the product master, which the purchase department relies on for their planning. However, if the technology team removes the old attachment and adds a new one, there is no recorded history, it's creating a lots of confusion.

อวตาร
ละทิ้ง

Hello
Thank you for helping me
How can I log to delete or add files?

ผู้เขียน

Please click the attachment icon available in chatter section.
Then you can see delete option.

Thanks, but that's not what I meant.
I actually want to know what code can be used to view the track history of attachment file in log note(step 5)

ผู้เขียน

Hi that is customization, not standard odoo.

if current_rec_id:
if res.name in ['image_1024', 'image_1920', 'image_512', 'image_256', 'image_128']:
if res.mimetype and res.mimetype.startswith('image'):
# Skip preparing the body if the uploaded file is an image
continue
current_rec_id.message_post(body="{0} Added an attachment {1}".format(self.env.user.name, res.name))

Which model should I add this code to?

ผู้เขียน

ir.attachment

i use
class bvIrAttachment(models.Model):
_inherit = ['ir.attachment', 'mail.thread']
but i am error
As you inherited?

ผู้เขียน คำตอบที่ดีที่สุด

We developed a custom module

By using this module, we can handle:

1. Restrict the view and create access to the attachment section.


2. Restrict the create access but allow viewing of the attachment.


3.Restrict the deletion of documents uploaded by others.


4. We can define the maximum file size, and if the file size exceeds that limit, uploading will not be allowed.

5. We can track the history in log note


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 24
1398
0
พ.ค. 23
2346
1
พ.ค. 25
1370
0
เม.ย. 24
1167
0
มี.ค. 23
2732