This avoids storing useless "{}" values
in the database when there are no headers,
and avoids having to update all existing
entries when this column is added.
Just requires simple tests before evaluating
the headers contents.
- [FIX] bounce regex: too many emails were considered as bounce and therefore
not displayed in the chatter and lost for the communication history. The regex
was not correctly looking for the bounce alias in the email_to.
- [FIX] invite email: replying to the invitation email (invitation as new
follower) now replies to the user sending the invitation.
- [FIX] mass_mailing: added a column to store the id of the original email
in addition to the many2one column. The many2one is set to null when deleting
the original email. As the information is necessary, it is saved on another
field. The many2one is necessary for indexes purpose as the inverse of
a one2many.
This can give a performance boost on large databases
and should not be a concern in terms of access control
as the inheritance already grants access to the parent
records.
management to access documents in notification emails, as well as for the
'view quotation' link in portal_sale module.
models: added a get_access_action method: basically, returns the action to
access a document. It uses the get_formview_action by default (form view
of the document). However for some documents we want to directly go to the
website, leading to an act_url action for some documents. This method allows
this behavior.
portal_sale: get_signup_url now uses the mail.action_mail_redirect method
instead of directly redirecting towards a portal menu. This allows to fall
back on a standard behavior.
portal_sale: get_formview_action updated, to match actions tailored for
portal users.
website_quote: get_access_action of sale order updated. If the sale order
has a template defined, the returned action is an act_url (website view
of the quotation), not the form action anymore.
mail: fixed signature + company signature in notification emails. Even without
user signature, the company signature + access link should be correct.
portal: signup url in notification emali was not using the mail redirection
as action. It is now the case.
When creating a new message, we need to reset the default_type key to avoid context propagation (e.g. invoice menu).
However we used to compare the key in context (char) with the list of selections (tuple) so it was never matching and always reset.
When a record is created, if it inherits from mail.thread, a message 'OBJECT created' is posted. 'created' is translated but the name of the model wasn't.
This fix uses the name of the linked ir.model which is already a translatable field.
lp:1262000, opw 611043
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages
(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)
Closes#1260
Loading the menus is the most expensive
operation for an average page load, and
the result does not change often.
The menu filtering already uses a separate
cache based on groups, but the rest of the
loading includes reading actions and
translating menu names, which is also
expensive.
Added a cache keyed on user + user
lang, plus relevant cache invalidation
when any of the following are touched:
access rights, user data including
groups and language, menus or mail.group
subscriptions.
The menu filtering cache is still
useful in parallel has it is invalidated
under different conditions.
User.has_group() is cheap but still
called very often, so it is an easy
win as well, and also frequently
used when rendering page templates.
Replacing the browse+search speeds up
the filtering 50x, which is significant
for a method that may be called on most
page loads as soon as the user is
logged in.
Many mail clients will replace the name in the To:
header with Me if the To: email matches the email
of the user. These users will see To: Me instead of
"Followers of ..." and usually believe this was a
private email from the sender to them.
But when replying they would reply to the whole list.
Fix this by explicitly forcing the To: to be the
mailing list address.
- remove the default footer for mail.group messages,
replace with specific footer with archive and unsubscribe
link
- remove the automatic addition of user signature in
mail.group messages, as many of them will be posted
via the mail gateway and already contain a user signature.
- make it easier to unsubscribe even when not logged in,
as followers who have not signed up will have no
way to login short of signing up.
- remove tests looking for user signature in mail.group posts
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
When parsing incoming messages, ignore white-space around
In-Reply-To headers, and extract message-id items inside
the References header using a regex.
This actually serves as a workaround for broken MTAs
mangling References (such as outlook.com nesting past ones
with commas, violating RFC2822).
Closes#516 as a manual rebase.
[FIX] mass_mailing, website: fixed unsubscription link, fixed mobile preview of email designer crashing because of the redirection not taking search parameters
[MERGP] Inline Searchview
This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place. It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)
Because of this, other large changes have been made:
the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)
It is likely that some stupid bugs have been introduced. Please don't hurt me.
- added possibility in mail to have a model adding custom headers in emails sent for notifications for new messages
- mail.group now add list-id and precedence: list in the headers to inform mailing systems that those mails are to be considered as mailing lists
- website_mail_group adds some further data in the headers (subscribe, unsubscribe, archives)
- groups page now display the number of message in the last month
- notification emails are now queued after 50 recipients
The problem was that the do_searchview_search callback was registered
after the event 'search_data' was triggered. For some reason, it
waited that the searchview was appended instead of registering directly.
- fixed keeping the original message for routing, only when choosing to reply in the
original thread (notification=True)
- auto delete sent emails explicitely
- mail_thread: routing: fixed replies always choosen even when replying to emails
with a specified reply_to (using ref_match in the algorithm)
- mail_thread: routing: instead of exclusive routing heuristics, use each case
as a fallback of the previous.
Be careful, content-type may contain tricky content like in the
following example so test the MIME type with startswith()
Content-Type: multipart/related;
boundary="_004_3f1e4da175f349248b8d43cdeb9866f1AMSPR06MB343eurprd06pro_";
type="text/html"
same_thread boolean field of mail.compose.message model define wether or not replies should be posted in the thread or not
On composer creation, this boolean should be passed according to the reply_to_mode of the mass_mailing
Otherwise, all replies would be posted in the thread, and the reply_to will be ignored (if same_thread id True, reply_to is poped from the mails values, mail/wizard/mail_compose_message.py:284)
the height of the oe_view_manager_header is variable, and the top can't
be positioned correctly with pure css without a lot of work, so this
commit adds a touch of javascript to make sure that the view is
correctly positioned.
the mail menu is a client action, so not subject to the same template
as regular views. so, it had to be patched to properly scroll like
other views (meaning: the 'header', left menu and top menu are fixed)
Also, changes the width of the searchbbar into a min-width css property,
to allow it to grow more. The reason is that we don't want the searchbox
to take two lines (or more), which will force the view_manager_header to be
higher, and which will cause slight issues with the scrollbar (absolutely
positioned)
opw-608251: When coming from website > My account, and clicking on a lead link from a message in the inbox, and then deleting the lead, the history_back is triggered and we come back in the website, while we should have come back in the inbox. This is because the action performed was not pushed in the breadcrumb
after some thought, the extra method insert was not really necessary.
It was at first a way to force the user to give two nodes to determine
where the searchview and the drawer were to be inserted. However,
the second node can be omitted, a perfectly reasonable default is
to append the drawer just after the searchview.
Then, the role of insert is exactly the same as appendTo, so it makes
sense to override appendTo and remove insert. Simpler, and the job is done.
Before, the searchview and the searchview drawer had to be instantiated by
the user and appended separately to their correct place. Now, the
searchview is responsible for creating/destroying the drawer, and the
user is responsible for correctly using the insert method with
the node where the searchview/drawer are to be inserted.
incomplete work. So far, the search view widget has been split in
two widgets: SearchView and SearchViewDrawer. The SearchViewDrawer
has been inserted inline, and some preliminary work has been done
to improve the layout.
* added a ``tracking_disable`` context key used by mail to completely disable
subscriptions setup and events generation during create and write operations
* added import option to optionally set up that context key and speed up
imports at the cost of not setting up subscriptions and not sending
create/update events
bzr revid: xmo@openerp.com-20140512100400-d1axjam2d0i2y0tf
* _get_tracked_fields should return a dict even when there's no tracked field
(return an empty dict)
* in write, only call _get_tracked_fields once, initialize to None instead of
a list (especially since it should be a dict in the first place)
bzr revid: xmo@openerp.com-20140507103056-ykr9f57yxpw1c542
Specifically when there are many emails in the queue, prefetching
all their attachments at once when processing the first one
could fail, so not even one mail would be sent.
Added explicit logging when an email triggers a MemoryError,
as well as logging when each email is successfully sent.
bzr revid: odo@openerp.com-20140502144431-r3brgagl4gel4wmt
This would permanently mark the mail as failed while
there is a good chance it will be sent properly next
time it is retried (provided the memory situation
improves or the server/worker has restarted).
bzr revid: odo@openerp.com-20140430102552-qkwv20b20nve64th
- notficiation_email_send field, renamed into notify_email, has now 2 values: always or never, in
order to ease the choice and simplify options.
- inbox: removed 'compose a new messages or write to my followers', because those 2 options are
already available. The first one is accessible using the top-right email icon, the second one
is accessible with the 'write to my followers' text box alread present in the inbox.
bzr revid: tde@openerp.com-20140417094133-8ip7vuy6b30xlc32
Methods to override to specify the view/action to launch for many2one links
get_formview_action use get_formview_id to find the view to open. Therefore, it is simplier to override get_formview_id to tell which view should be opened
bzr revid: dle@openerp.com-20140416143755-07slguqn6zadqsg5
it is now possible to compute models allowing mass mailing using mass_mailing_campaign
module. This allows to completely remove the bridges modules, using a more generic
controller for unsubscription.
bzr revid: tde@openerp.com-20140416082851-8duo6yrwr5hwd8c2
This improve previous commit by making sure we
never consider the thread_id/model values in the
In-Reply-To/References header if the host name
did not match.
Also fixes the tests that were using the
6.1 compatibility mode to post in a mail group
thread instead of specifying the right
message-id.
bzr revid: odo@openerp.com-20140411142429-y0rpkzqbrsabxqsg
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: now trigger postprocess_sent_message in every case, being sent or not, as the state
is propagated in the method; udpated all addons accordingly;
- email_template: fixed URL to edit it in website + form view;
- mass_mailing: barchart now send jsonified value;
- mass_mailing: tweaking the form view with all options
bzr revid: tde@openerp.com-20140408124053-o9tb14k6v47s5mjd
- 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
cleaning in get_record_data + code cleaning in get_mail_values + management
of the previously introduced method get_default_recipients, to be sure that
in mass mailing an email is effectively sent to a customer / lead / applicant
/ ... because with an ill-configured template, you could have mass amiling
mailing nobody.
bzr revid: tde@openerp.com-20140321171723-7e3lk64knojf09at
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
- now workign on various models, taking the correct recipient (email, partner_id for partner or lead)
- improved test send: use email_to, now a many2many on contact model to ease the use of templates
- added action to create a mailing list from leads
- moved a res.partner dedicated action to its own file
- added an actoin to create a mailing list from contacts
- fixed mail_mail post_process: use mail_sent variable as mail.state is not available
bzr revid: tde@openerp.com-20140318164117-f2aou25u633j8m57
to remove unnecessary code.
post and filter_id fields have been removed as they are not necessary.
Updated tests accordingly to new mass mailing tests: mass mailing create
emails, no message_post anymore using followers.
bzr revid: tde@openerp.com-20140317115315-ws8dvjbiv5rspk43
in messaging, especially for mass mailing and mail mail creation. Some things will
probably be discarded or improved further, but this work will serve as a basis
for the whole mass mailing refactorign about speed.
bzr revid: tde@openerp.com-20140314165621-stpmdbq92fbigc3u
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
Local URLs are converted into absolute URLs, notably because when using the
email designer, images are added using local URLs. Previously to this fix
the template was analyzed to find local URLs and make them absolute.
However this causes 2 issues :
- mako-based URLs are broken because a scheme is added before the mako that
generated the image src
- when changing the base url, the templates are not updated
The URLs are now converted dynamically when generating the content of the
html. This is done by passing a new parameter that enable the post processing
of the generated content.
Also fixed double body generation when using templates; fields parameter
was not propagated correctly.
bzr revid: tde@openerp.com-20140304112957-l9b10gyjqphs5fgc
main differences :
- record_name is not a function field anymore, but a char field + a method in create
if not given (default-like, but dependent of other values). This allows the composer
to give a value for record_name (False for email mass mailing) to avoid browsing
records and having their access rights issues in the way
- author_id, email_from coming from composer instead of called in every mail.message
creation
- moved code dealing with attachments from send_mail to get_mail-values, to that at
the end of this method we know all values of the email
Some tests have been updated / temporarily disabled.
bzr revid: tde@openerp.com-20140224132038-txdi0g30a7fzbnxp