Merge lp://staging/~therp-nl/ocb-addons/6.1-lp1342360-fetchmail_file_storage_duplicate_attachment_ids into lp://staging/ocb-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Needs review
Proposed branch: lp://staging/~therp-nl/ocb-addons/6.1-lp1342360-fetchmail_file_storage_duplicate_attachment_ids
Merge into: lp://staging/ocb-addons/6.1
Diff against target: 17 lines (+6/-1)
1 file modified
mail/mail_thread.py (+6/-1)
To merge this branch: bzr merge lp://staging/~therp-nl/ocb-addons/6.1-lp1342360-fetchmail_file_storage_duplicate_attachment_ids
Reviewer Review Type Date Requested Status
OpenERP Community Backports Pending
Review via email: mp+226933@code.staging.launchpad.net

Description of the change

See bug description. The duplication is no longer performed in OpenERP 7.0, so it only affects 6.1

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

What is the deduplication based on? If it's the file's name, we'd rather have to turn that off. For a mail, it's perfectly valid to have two times 'attachment.pdf' containing different documents.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Ouch, you are right. While the file size is passed to _check_duplication, it is ignored further down and any file on the same resource with the same name is considered a dupe. The same thing happens on write(), in which case the data is being overwritten. This could be a 'feature' that other parts of the code depend on, and changing this behaviour could lead to an unexpected explosion of documents with the same name. I need to think about a possible solution to this.

Unmerged revisions

6848. By Stefan Rijnhart (Opener)

[FIX] Don't write duplicate attachment ids on incoming mail

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches