When emails transit from an OpenERP system to another
there is a chance of wrongly considering the foreign
model,id pair as local, possibly attaching a reply
to a wrong parent message.
This naive heuristic ignore the foreign identifiers
unless the hostname of the message-id mentioned in
the In-Reply-To header matches the local one.
This may fail after a change of local hostname but
is still better than the alternative.
In OpenERP v8 we should stop including the model,res_id
in outgoing Message-Id headers and only rely on the
stored, opaque, unique Message-Ids, preventing
any future mismatch.
bzr revid: odo@openerp.com-20140411101349-h3jmkdzvbr7lut26
- mail.compose.message: in render_message_batch, compute defaults recipients
for the composer (method called for mass mailing only). This way values are
available for inheriting models.
bzr revid: tde@openerp.com-20140325135347-9v7u4uokffy7ud43
some default recipients for a document. Basically it looks for a partner_id field,
or an email_from, or an email field, and return a dict result used for populating
a creation dictionary, for example.
bzr revid: tde@openerp.com-20140321171615-ksce5mqzyugya8hs
This bridge and optional module add a button on the lead form view to
allow users to create issues from leads. The lead is distroyed during
the operation. All communication history is kept and transferred to the
new issue.
bzr revid: tde@openerp.com-20140304170544-kp624l6vhj0s1rwc
- mail.message.subtype:
-- added sequence field, used to order subtypes when displaying them
-- added hidden field, used to hide some subtypes. Subtypes like 'Task Created' or 'Issue Created' are not necessary on a task or issue, but useful on the project form view. Indeed by following the task created subtype on the project, the user is notified of new tasks. However on the task itself it makes no sense to be able to follow task created. This subtype has to exist due to the technical implementation, but should be hidden in the followers widget of the task.
- mail: updated followers widget accordingly, and display subtypes by application with a visual border to separate them
- project, crm, sale_crm: updated hidden and sequence of subtypes
bzr revid: tde@openerp.com-20140221122036-m30laylmb4tqndkh
against not planned subtype data (coming from error in subtype relationship
table, or for undisplayed subtypes, old subtypes, ...).
bzr revid: tde@openerp.com-20140225090637-mnztroc05nk7l2sl
the access rules, notably about reading and creation. This allows by the way
to remove the hack about the operation in context when subscribing
users on a document.
The new rules on create and read now include user_id, aka the owner of a note
can always create (default value) and read its notes.
Also removed an unnecessary field (current_partner_id), as it was buggy and
unnecessary; view udpated accordingly.
[IMP] mail: removed a hack introduced in saas-3 with the current orm operation
in context to by-pass some access rules when subscribing someone on a document.
bzr revid: tde@openerp.com-20140219111330-l3hw5324hvuikpjc
found during processing. This way, all emails in the queue are managed and
all failed emails have their own exception in the logs, allowing easier
debugging.
Note that a failed email is set as seen to avoid processing it every time
the scheduler runs.
bzr revid: tde@openerp.com-20140213095717-tcwgkl143i3ujw8h
Indeed assert are statements meant to be used when developping, for
debug purpose. In a production environment it is safer to use real
exceptions that can be managed accordingly.
bzr revid: tde@openerp.com-20140212152737-c7q339psd9hi4iwd
alias. Indeed in this method, we have unitialized inherited fields because the orm
is updating. A new no_track key (already intorduced in 7.0, added in this branch because
of a missing forward-port) in mail_thread allows to avoid doing the tracking of values
and is used in mail_alias.
bzr revid: tde@openerp.com-20140210171350-ajwxwau2ar1gu9io
Make sure the user is subscribed before the super() call in mail_thread. This allows to have follower based record rules working (eg: note.note)
bzr revid: mat@openerp.com-20140206104714-anpehaik4wajnfrw
field, updated everytime message_post in called. This allows to build filters, search or
actions based on the last message date, for reporting for example.
bzr revid: tde@openerp.com-20140206094831-nvyds6nqz0v25t59
This allows to have a value for the _set_followers call and be able to have record rules based on followers (eg: note.note).
Set the priority of message_follower_ids fields to -10 to be sure it will be executed before other function fields using these followers (eg: _set_stage_per_user from note.note does a browse which would trigger record rules to read the note)
bzr revid: mat@openerp.com-20140106100010-jl4cuvgvpsw26v28
get_filename method from email lib returns sometimes decoded value, sometimes still encoded.
for instance, get_filename cannot decode iso encoded filename
Recently, decode method has been applied on filename string, to handle iso encoded file.
Sadly, one cannot decode already decoded values.
Therefore, decoding already decoded windows or utf-8 encoded filename with special chars failed.
bzr revid: dle@openerp.com-20140102161149-x268xj7bzvvsit2h
- removed a debug print statement
- now searching all references once instead of each reference one at a time
to lessen the number of queries; as the newest message will be the first
in the search result, it's ok.
bzr revid: tde@openerp.com-20131205093921-h7sits57vqc51c8p
It now accepts <111...222..openerp-res_id-model@mydomain.com> partial matching
only if the target record has messages without message_id, aka <= 6.1 record.
Updated and added tests
bzr revid: tde@openerp.com-20131128133226-ce1qyeswi9n83q8v
- avoid having to browse the record in message_subscribe: refactored message_subscribe
to work on ids without browsing, try to lessen the number of queries to do
- update _set_followers, method of the function field message_follower_ids, to use
message_subscribe and message_unsibscribe
- in create: add author as follower in creation values, not after create, allowing
create access rules based on followers
- updated message_unsubscribe to be the lower method, not calling _set_followers anymore
bzr revid: tde@openerp.com-20131126171752-1irizm7mhv2y1wrn
we have to process attachments as well as attachment_ids in the values generated
by the composer and the optional template.
As this behavior is the same as the one already implemented for message_post, this
feature has been moved into its dedicated method to be called by message_post
or before calling mail_mail.create().
This also allows to have attachments in pure email mass mailing that are attached
to mail.message, not to mail.compose.message model. When unlinking those emails,
the attachments will be also removed, and not lost in the database anymore.
bzr revid: tde@openerp.com-20131126110942-h8p0d9sbjtk0hwlu
- the button is now only displayed for employee users. This is done
by overriding the fields_view_get in mail.thread and adding options
to the widget according to the groups the user belongs to. Indeed
it is currently not possible to set widget options specific to
some groups. Therefore an override of fields view get was
necessary.
- small layout improvements: Log a note -> Log an internal note,
background color of notes updated.
bzr revid: tde@openerp.com-20131125130455-u8517iyr4jgdgoqn
This new code allows faster computation, because it avoids
- searching in a many2many relationship that is very costly in production
databases, because it is replaced by an 'id in [ids]' equivalent leaf
that can be huge.
- browsing in a create/write (should also lessen the number of issues
about read access rights in create)
A new optionnal parameter is given to the method, that are the
modified values. If this is not given (compatibility-mode) the
records are browsed to fetch the value.
bzr revid: tde@openerp.com-20131114113231-oyk16t9i3m3wul6k
When having emails not linked to a notification (mail.notification = False)
the link is generated without any clue about the source record.
However we can try to use model and res_id defined on the mail_mail record
to correctly format a link.
Added support of model and res_id in message_redirect_action. This method
now can redirect based on a message_id, or based on model / res_id.
bzr revid: tde@openerp.com-20131018144924-j4f22hen3lsua7cb
- fixed forgottent import of mail_thread in mass_mailing, to enable bounce and replied tracking
- fixed replied computation in message_route_process, adding the original email in parameters
- fixed form view of campaign, to add edit and dlete now that clicking on it redirects to the waves
- added track field on mail_mail, to avoid creating too mush entries in mail.mail.statistics
- fixed mass_mailign controller
bzr revid: tde@openerp.com-20130916114706-b9zyhp0ha6mr9fzg
Mail statistics are now stored onto a separated object (mail.mail.statistics), allowing to
handle emails separately from statistics (among other removing mail.mail entries while keeping
statistics).
Everything linnked to opened/replied/bounce is not managed by mass_mailing, removed added code
in mail module.
bzr revid: tde@openerp.com-20130913115408-322cyjipdg680as6
alternative mode is computed when browsing the parts, not from
the message content type.
Added tests.
Also added some notification_email_send to none to avoid sending
emails in demo/data/update.
bzr revid: tde@openerp.com-20130823120611-0n4ull3c8gvwug2u
interfering with automatic message_id creation of mail_message
[FIX] mail_thread: fixed issues with private messages through mailgateway
(wrong route checking, variable erasing)
[TEST] mail: added test for the second bug
bzr revid: tde@openerp.com-20130807142418-3h5qxdt3ekosj9x6
Added 2 fields on mail_mail to count read/bounce.
Added bounce alias bounce-mail_id-model-res_id.
Added message_receive_bounce method that try to incremetn message_bounce field.
bzr revid: tde@openerp.com-20130806151143-7dw6xlj8n7mh0nqe
{'is_editable': True/False, 'is_uid': True/False}
-- where is_editable will be True if uid is in technical group
-- where is_uid will be True if uid is in partner.user_ids.
bzr revid: psa@tinyerp.com-20130712133920-96l6axns7yynyz9e
Previous implementation did a search on mail.followers with subtype_ids=False, leading
to a very bad computation time. This search is now avoided.
bzr revid: tde@openerp.com-20130613082029-lmd63s3mqwxasy4j