Merge lp://staging/~therp-nl/therp-addons/6.1-fetchmail_invoice into lp://staging/~therp-nl/therp-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 31
Proposed branch: lp://staging/~therp-nl/therp-addons/6.1-fetchmail_invoice
Merge into: lp://staging/~therp-nl/therp-addons/6.1
Diff against target: 276 lines (+231/-0)
8 files modified
fetchmail_invoice/__init__.py (+1/-0)
fetchmail_invoice/__openerp__.py (+50/-0)
fetchmail_invoice/data/installer.xml (+23/-0)
fetchmail_invoice/data/partner_data.xml (+16/-0)
fetchmail_invoice/i18n/nl.po (+37/-0)
fetchmail_invoice/model/__init__.py (+1/-0)
fetchmail_invoice/model/fetchmail_invoice.py (+81/-0)
fetchmail_invoice/view/invoice.xml (+22/-0)
To merge this branch: bzr merge lp://staging/~therp-nl/therp-addons/6.1-fetchmail_invoice
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Approve
Review via email: mp+117078@code.staging.launchpad.net

Description of the change

This branch adds the fetchmail invoice module.

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

you don't handle message_append. actually, you should do something for all message_*, otherwise you risk 'lost' mails attached silently somewhere

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

Hi Holger,

thank you for your response.

Looks like message_* methods are provided by mail.thread, which are available now that I use

   _inherit = ['account.invoice', 'mail.thread']

instead of

   _inherit = 'account.invoice'
   _inherits = {'mail.thread': 'mail_thread_id'}

If I do not need additional functionality, then I can rely on these existing methods, right?

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

I doubt that you want to have that functionality. My mail-client has a button 'edit as new' which lets me send a sent message again. This one won't do anything concerning invoices by now because it just will be attached to the invoice created by my first mail (it will have the same message id).

So if the desired behavior is 'whatever the circumstance, create an invoice if there is a new mail', you need to inhibit matching old mails to new ones, viz override message_append and call message_new there. The same with message_update.

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

Hi Holger,

the meaning of two messages with the same message-id from the same host is that they are to be treated as one and the same (virtually unchanged) message (see [1]). So in that case, I would not want to create that same invoice twice.

For the record, my client's 'Edit as new' button generates a copy of the message with a new message-id.

Best regards,
Stefan.

[1] http://tools.ietf.org/html/rfc2822#section-3.6.4

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Valid point => approve

review: Approve

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