← Back to team overview

credativ team mailing list archive

[Merge] lp:~therp-nl/openupgrade-addons/7.0-mail into lp:openupgrade-addons

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/openupgrade-addons/7.0-mail into lp:openupgrade-addons.

Requested reviews:
  OpenUpgrade Committers (openupgrade-committers)

For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-addons/7.0-mail/+merge/176010

Migration of the mail module, including the nice HTMLifier code from Credativ's abandoned contribution (https://code.launchpad.net/~credativ/openupgrade-addons/7.0/+merge/170411)

-- 
https://code.launchpad.net/~therp-nl/openupgrade-addons/7.0-mail/+merge/176010
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-addons/7.0-mail into lp:openupgrade-addons.
=== added file 'mail/migrations/7.0.1.0/data.xml'
--- mail/migrations/7.0.1.0/data.xml	1970-01-01 00:00:00 +0000
+++ mail/migrations/7.0.1.0/data.xml	2013-07-20 15:05:33 +0000
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="ir_cron_mail_scheduler_action">
+            <field eval="'mail.mail'" name="model"/>
+        </record>
+    </data>
+</openerp>
+

=== modified file 'mail/migrations/7.0.1.0/openupgrade_analysis.txt'
--- mail/migrations/7.0.1.0/openupgrade_analysis.txt	2013-02-21 13:40:15 +0000
+++ mail/migrations/7.0.1.0/openupgrade_analysis.txt	2013-07-20 15:05:33 +0000
@@ -1,4 +1,4 @@
----mail---
+---Fields in module 'mail'---
 mail         / ir.ui.menu               / mail_group_id (many2one)      : NEW relation: mail.group
 mail         / mail.alias               / alias_defaults (text)         : NEW required: required, req_default: {}
 mail         / mail.alias               / alias_force_thread_id (integer): NEW 
@@ -63,91 +63,92 @@
 mail         / res.partner              / notification_email_send (selection): NEW required: required, selection_keys: ['all', 'comment', 'email', 'none'], req_default: function
 mail         / res.users                / _inherits (False)             : NEW mode: modify
 mail         / res.users                / alias_id (many2one)           : NEW relation: mail.alias, required: required
-deleted xml-id of model ir.actions.act_window.view: mail.action_view_mailgate_thread_view1
-deleted xml-id of model ir.actions.act_window.view: mail.action_view_mailgate_thread_view2
-deleted xml-id of model ir.actions.act_window: mail.act_res_partner_emails
-deleted xml-id of model ir.actions.act_window: mail.action_view_mailgate_thread
-deleted xml-id of model ir.model.access: mail.access_mail_message
-deleted xml-id of model ir.model.access: mail.access_mail_thread
-deleted xml-id of model ir.ui.menu: mail.menu_email_message
-deleted xml-id of model ir.ui.view: base.view_crm_partner_info_History
-deleted xml-id of model ir.ui.view: mail.view_email_message_form
-deleted xml-id of model ir.ui.view: mail.view_email_message_search
-deleted xml-id of model ir.ui.view: mail.view_email_message_tree
-deleted xml-id of model ir.ui.view: mail.view_mailgate_thread_form
-deleted xml-id of model ir.ui.view: mail.view_mailgate_thread_tree
-new xml-id of model ir.actions.act_window: mail.action_view_followers
-new xml-id of model ir.actions.act_window: mail.action_view_groups
-new xml-id of model ir.actions.act_window: mail.action_view_mail_alias
-new xml-id of model ir.actions.act_window: mail.action_view_mail_mail
-new xml-id of model ir.actions.act_window: mail.action_view_message_subtype
-new xml-id of model ir.actions.act_window: mail.action_view_notifications
-new xml-id of model ir.actions.client: mail.action_mail_archives_feeds
-new xml-id of model ir.actions.client: mail.action_mail_group_feeds
-new xml-id of model ir.actions.client: mail.action_mail_inbox_feeds
-new xml-id of model ir.actions.client: mail.action_mail_star_feeds
-new xml-id of model ir.actions.client: mail.action_mail_to_me_feeds
-new xml-id of model ir.cron: mail.ir_cron_module_update_notification
-new xml-id of model ir.model.access: mail.access_mail_alias_all
-new xml-id of model ir.model.access: mail.access_mail_alias_system
-new xml-id of model ir.model.access: mail.access_mail_alias_user
-new xml-id of model ir.model.access: mail.access_mail_followers_all
-new xml-id of model ir.model.access: mail.access_mail_followers_system
-new xml-id of model ir.model.access: mail.access_mail_followers_user
-new xml-id of model ir.model.access: mail.access_mail_group_all
-new xml-id of model ir.model.access: mail.access_mail_group_user
-new xml-id of model ir.model.access: mail.access_mail_mail_all
-new xml-id of model ir.model.access: mail.access_mail_mail_system
-new xml-id of model ir.model.access: mail.access_mail_mail_user
-new xml-id of model ir.model.access: mail.access_mail_message_all
-new xml-id of model ir.model.access: mail.access_mail_message_subtype_all
-new xml-id of model ir.model.access: mail.access_mail_message_subtype_system
-new xml-id of model ir.model.access: mail.access_mail_message_user
-new xml-id of model ir.model.access: mail.access_mail_notification_all
-new xml-id of model ir.model.access: mail.access_mail_notification_system
-new xml-id of model ir.model.access: mail.access_mail_notification_user
-new xml-id of model ir.model.access: mail.access_mail_thread_all
-new xml-id of model ir.model.access: mail.access_publisher_warranty_contract_all
-new xml-id of model ir.rule: mail.mail_followers_read_write_own
-new xml-id of model ir.rule: mail.mail_group_public_and_joined
-new xml-id of model ir.rule: mail.mail_notification_read_write_own
-new xml-id of model ir.ui.menu: mail.mail_alias_menu
-new xml-id of model ir.ui.menu: mail.mail_allgroups
-new xml-id of model ir.ui.menu: mail.mail_archivesfeeds
-new xml-id of model ir.ui.menu: mail.mail_feeds
-new xml-id of model ir.ui.menu: mail.mail_feeds_main
-new xml-id of model ir.ui.menu: mail.mail_group_root
-new xml-id of model ir.ui.menu: mail.mail_inboxfeeds
-new xml-id of model ir.ui.menu: mail.mail_my_stuff
-new xml-id of model ir.ui.menu: mail.mail_starfeeds
-new xml-id of model ir.ui.menu: mail.mail_tomefeeds
-new xml-id of model ir.ui.menu: mail.menu_email_followers
-new xml-id of model ir.ui.menu: mail.menu_email_notifications
-new xml-id of model ir.ui.menu: mail.menu_mail_mail
-new xml-id of model ir.ui.menu: mail.menu_mail_message
-new xml-id of model ir.ui.menu: mail.menu_message_subtype
-new xml-id of model ir.ui.view: mail.mail_wizard_invite_form
-new xml-id of model ir.ui.view: mail.view_followers_tree
-new xml-id of model ir.ui.view: mail.view_general_configuration_mail_alias_domain
-new xml-id of model ir.ui.view: mail.view_group_form
-new xml-id of model ir.ui.view: mail.view_group_kanban
-new xml-id of model ir.ui.view: mail.view_group_search
-new xml-id of model ir.ui.view: mail.view_group_tree
-new xml-id of model ir.ui.view: mail.view_mail_alias_form
-new xml-id of model ir.ui.view: mail.view_mail_alias_search
-new xml-id of model ir.ui.view: mail.view_mail_alias_tree
-new xml-id of model ir.ui.view: mail.view_mail_form
-new xml-id of model ir.ui.view: mail.view_mail_message_subtype_form
-new xml-id of model ir.ui.view: mail.view_mail_search
-new xml-id of model ir.ui.view: mail.view_mail_subscription_form
-new xml-id of model ir.ui.view: mail.view_mail_tree
-new xml-id of model ir.ui.view: mail.view_message_form
-new xml-id of model ir.ui.view: mail.view_message_search
-new xml-id of model ir.ui.view: mail.view_message_subtype_tree
-new xml-id of model ir.ui.view: mail.view_message_tree
-new xml-id of model ir.ui.view: mail.view_notification_tree
-new xml-id of model ir.ui.view: mail.view_users_form_mail
-new xml-id of model ir.ui.view: mail.view_users_form_simple_modif_mail
-new xml-id of model mail.group: mail.group_all_employees
-new xml-id of model mail.message.subtype: mail.mt_comment
-new xml-id of model mail.message: mail.module_install_notification
+---XML records in module 'mail'---
+NEW ir.actions.act_window: mail.action_view_followers
+NEW ir.actions.act_window: mail.action_view_groups
+NEW ir.actions.act_window: mail.action_view_mail_alias
+NEW ir.actions.act_window: mail.action_view_mail_mail
+NEW ir.actions.act_window: mail.action_view_message_subtype
+NEW ir.actions.act_window: mail.action_view_notifications
+DEL ir.actions.act_window: mail.act_res_partner_emails
+DEL ir.actions.act_window: mail.action_view_mailgate_thread
+DEL ir.actions.act_window.view: mail.action_view_mailgate_thread_view1
+DEL ir.actions.act_window.view: mail.action_view_mailgate_thread_view2
+NEW ir.actions.client: mail.action_mail_archives_feeds
+NEW ir.actions.client: mail.action_mail_group_feeds
+NEW ir.actions.client: mail.action_mail_inbox_feeds
+NEW ir.actions.client: mail.action_mail_star_feeds
+NEW ir.actions.client: mail.action_mail_to_me_feeds
+NEW ir.cron: mail.ir_cron_module_update_notification
+NEW ir.model.access: mail.access_mail_alias_all
+NEW ir.model.access: mail.access_mail_alias_system
+NEW ir.model.access: mail.access_mail_alias_user
+NEW ir.model.access: mail.access_mail_followers_all
+NEW ir.model.access: mail.access_mail_followers_system
+NEW ir.model.access: mail.access_mail_followers_user
+NEW ir.model.access: mail.access_mail_group_all
+NEW ir.model.access: mail.access_mail_group_user
+NEW ir.model.access: mail.access_mail_mail_all
+NEW ir.model.access: mail.access_mail_mail_system
+NEW ir.model.access: mail.access_mail_mail_user
+NEW ir.model.access: mail.access_mail_message_all
+NEW ir.model.access: mail.access_mail_message_subtype_all
+NEW ir.model.access: mail.access_mail_message_subtype_system
+NEW ir.model.access: mail.access_mail_message_user
+NEW ir.model.access: mail.access_mail_notification_all
+NEW ir.model.access: mail.access_mail_notification_system
+NEW ir.model.access: mail.access_mail_notification_user
+NEW ir.model.access: mail.access_mail_thread_all
+NEW ir.model.access: mail.access_publisher_warranty_contract_all
+DEL ir.model.access: mail.access_mail_message
+DEL ir.model.access: mail.access_mail_thread
+NEW ir.rule: mail.mail_followers_read_write_own
+NEW ir.rule: mail.mail_group_public_and_joined
+NEW ir.rule: mail.mail_notification_read_write_own
+NEW ir.ui.menu: mail.mail_alias_menu
+NEW ir.ui.menu: mail.mail_allgroups
+NEW ir.ui.menu: mail.mail_archivesfeeds
+NEW ir.ui.menu: mail.mail_feeds
+NEW ir.ui.menu: mail.mail_feeds_main
+NEW ir.ui.menu: mail.mail_group_root
+NEW ir.ui.menu: mail.mail_inboxfeeds
+NEW ir.ui.menu: mail.mail_my_stuff
+NEW ir.ui.menu: mail.mail_starfeeds
+NEW ir.ui.menu: mail.mail_tomefeeds
+NEW ir.ui.menu: mail.menu_email_followers
+NEW ir.ui.menu: mail.menu_email_notifications
+NEW ir.ui.menu: mail.menu_mail_mail
+NEW ir.ui.menu: mail.menu_mail_message
+NEW ir.ui.menu: mail.menu_message_subtype
+DEL ir.ui.menu: mail.menu_email_message
+NEW ir.ui.view: mail.mail_wizard_invite_form
+NEW ir.ui.view: mail.view_followers_tree
+NEW ir.ui.view: mail.view_general_configuration_mail_alias_domain
+NEW ir.ui.view: mail.view_group_form
+NEW ir.ui.view: mail.view_group_kanban
+NEW ir.ui.view: mail.view_group_search
+NEW ir.ui.view: mail.view_group_tree
+NEW ir.ui.view: mail.view_mail_alias_form
+NEW ir.ui.view: mail.view_mail_alias_search
+NEW ir.ui.view: mail.view_mail_alias_tree
+NEW ir.ui.view: mail.view_mail_form
+NEW ir.ui.view: mail.view_mail_message_subtype_form
+NEW ir.ui.view: mail.view_mail_search
+NEW ir.ui.view: mail.view_mail_subscription_form
+NEW ir.ui.view: mail.view_mail_tree
+NEW ir.ui.view: mail.view_message_form
+NEW ir.ui.view: mail.view_message_search
+NEW ir.ui.view: mail.view_message_subtype_tree
+NEW ir.ui.view: mail.view_message_tree
+NEW ir.ui.view: mail.view_notification_tree
+NEW ir.ui.view: mail.view_users_form_mail
+NEW ir.ui.view: mail.view_users_form_simple_modif_mail
+DEL ir.ui.view: base.view_crm_partner_info_History
+DEL ir.ui.view: mail.view_email_message_form
+DEL ir.ui.view: mail.view_email_message_search
+DEL ir.ui.view: mail.view_email_message_tree
+DEL ir.ui.view: mail.view_mailgate_thread_form
+DEL ir.ui.view: mail.view_mailgate_thread_tree
+NEW mail.group: mail.group_all_employees
+NEW mail.message: mail.module_install_notification
+NEW mail.message.subtype: mail.mt_comment

=== added file 'mail/migrations/7.0.1.0/openupgrade_analysis_working.txt'
--- mail/migrations/7.0.1.0/openupgrade_analysis_working.txt	1970-01-01 00:00:00 +0000
+++ mail/migrations/7.0.1.0/openupgrade_analysis_working.txt	2013-07-20 15:05:33 +0000
@@ -0,0 +1,213 @@
+---Fields in module 'mail'---
+### Ignore new mail configuration: aliases, followers, groups, message subtypes, notifications
+mail         / ir.ui.menu               / mail_group_id (many2one)      : NEW relation: mail.group
+mail         / mail.alias               / alias_defaults (text)         : NEW required: required, req_default: {}
+mail         / mail.alias               / alias_force_thread_id (integer): NEW 
+mail         / mail.alias               / alias_model_id (many2one)     : NEW relation: ir.model, required: required
+mail         / mail.alias               / alias_name (char)             : NEW required: required
+mail         / mail.alias               / alias_user_id (many2one)      : NEW relation: res.users
+mail         / mail.followers           / partner_id (many2one)         : NEW relation: res.partner, required: required
+mail         / mail.followers           / res_id (integer)              : NEW 
+mail         / mail.followers           / res_model (char)              : NEW required: required
+mail         / mail.followers           / subtype_ids (many2many)       : NEW relation: mail.message.subtype
+mail         / mail.group               / _inherits (False)             : NEW 
+mail         / mail.group               / alias_id (many2one)           : NEW relation: mail.alias, required: required
+mail         / mail.group               / description (text)            : NEW 
+mail         / mail.group               / group_ids (many2many)         : NEW relation: res.groups
+mail         / mail.group               / group_public_id (many2one)    : NEW relation: res.groups
+mail         / mail.group               / image (binary)                : NEW 
+mail         / mail.group               / menu_id (many2one)            : NEW relation: ir.ui.menu, required: required
+mail         / mail.group               / message_ids (one2many)        : NEW relation: mail.message
+mail         / mail.group               / name (char)                   : NEW required: required
+mail         / mail.group               / public (selection)            : NEW required: required, selection_keys: ['groups', 'private', 'public'], req_default: groups
+mail         / mail.message.subtype     / default (boolean)             : NEW 
+mail         / mail.message.subtype     / description (text)            : NEW 
+mail         / mail.message.subtype     / name (char)                   : NEW required: required
+mail         / mail.message.subtype     / parent_id (many2one)          : NEW relation: mail.message.subtype
+mail         / mail.message.subtype     / relation_field (char)         : NEW 
+mail         / mail.message.subtype     / res_model (char)              : NEW 
+mail         / mail.notification        / message_id (many2one)         : NEW relation: mail.message, required: required
+mail         / mail.notification        / partner_id (many2one)         : NEW relation: res.partner, required: required
+mail         / mail.notification        / read (boolean)                : NEW 
+mail         / mail.notification        / starred (boolean)             : NEW 
+
+### Dealt with split up between mail.message and mail.mail. See below.
+mail         / mail.mail                / _inherits (False)             : NEW 
+mail         / mail.mail                / auto_delete (boolean)         : NEW 
+mail         / mail.mail                / body_html (text)              : NEW 
+mail         / mail.mail                / email_cc (char)               : NEW 
+mail         / mail.mail                / email_from (char)             : NEW 
+mail         / mail.mail                / email_to (text)               : NEW 
+mail         / mail.mail                / mail_message_id (many2one)    : NEW relation: mail.message, required: required
+mail         / mail.mail                / mail_server_id (many2one)     : NEW relation: ir.mail_server
+mail         / mail.mail                / notification (boolean)        : NEW 
+mail         / mail.mail                / references (text)             : NEW 
+mail         / mail.mail                / reply_to (char)               : NEW 
+mail         / mail.mail                / state (selection)             : NEW selection_keys: ['cancel', 'exception', 'outgoing', 'received', 'sent']
+mail         / mail.message             / attachment_ids (many2many)    : NEW relation: ir.attachment
+mail         / mail.message             / author_id (many2one)          : NEW relation: res.partner
+mail         / mail.message             / body (html)                   : NEW 
+mail         / mail.message             / child_ids (one2many)          : NEW relation: mail.message
+mail         / mail.message             / date (datetime)               : NEW 
+mail         / mail.message             / email_from (char)             : NEW 
+mail         / mail.message             / message_id (char)             : NEW 
+mail         / mail.message             / model (char)                  : NEW 
+mail         / mail.message             / notification_ids (one2many)   : NEW relation: mail.notification
+mail         / mail.message             / notified_partner_ids (many2many): NEW relation: res.partner
+mail         / mail.message             / parent_id (many2one)          : NEW relation: mail.message
+mail         / mail.message             / partner_ids (many2many)       : NEW relation: res.partner
+mail         / mail.message             / res_id (integer)              : NEW 
+mail         / mail.message             / subject (char)                : NEW 
+mail         / mail.message             / subtype_id (many2one)         : NEW relation: mail.message.subtype
+mail         / mail.message             / type (selection)              : NEW selection_keys: ['comment', 'email', 'notification']
+mail         / mail.message             / vote_user_ids (many2many)     : NEW relation: res.users
+mail         / res.partner              / emails (one2many)             : DEL relation: mail.message
+mail         / res.partner              / message_ids (one2many)        : NEW relation: mail.message
+mail         / res.partner              / notification_email_send (selection): NEW required: required, selection_keys: ['all', 'comment', 'email', 'none'], req_default: function
+
+### Ignore. Broken output from analysis, but res_users inherit from mail.alias now. The aliases are created at model initialization time
+mail         / res.users                / _inherits (False)             : NEW mode: modify
+mail         / res.users                / alias_id (many2one)           : NEW relation: mail.alias, required: required
+
+---XML records in module 'mail'---
+### Ignore interface records
+NEW ir.actions.act_window: mail.action_view_followers
+NEW ir.actions.act_window: mail.action_view_groups
+NEW ir.actions.act_window: mail.action_view_mail_alias
+NEW ir.actions.act_window: mail.action_view_mail_mail
+NEW ir.actions.act_window: mail.action_view_message_subtype
+NEW ir.actions.act_window: mail.action_view_notifications
+DEL ir.actions.act_window: mail.act_res_partner_emails
+DEL ir.actions.act_window: mail.action_view_mailgate_thread
+DEL ir.actions.act_window.view: mail.action_view_mailgate_thread_view1
+DEL ir.actions.act_window.view: mail.action_view_mailgate_thread_view2
+NEW ir.actions.client: mail.action_mail_archives_feeds
+NEW ir.actions.client: mail.action_mail_group_feeds
+NEW ir.actions.client: mail.action_mail_inbox_feeds
+NEW ir.actions.client: mail.action_mail_star_feeds
+NEW ir.actions.client: mail.action_mail_to_me_feeds
+NEW ir.ui.menu: mail.mail_alias_menu
+NEW ir.ui.menu: mail.mail_allgroups
+NEW ir.ui.menu: mail.mail_archivesfeeds
+NEW ir.ui.menu: mail.mail_feeds
+NEW ir.ui.menu: mail.mail_feeds_main
+NEW ir.ui.menu: mail.mail_group_root
+NEW ir.ui.menu: mail.mail_inboxfeeds
+NEW ir.ui.menu: mail.mail_my_stuff
+NEW ir.ui.menu: mail.mail_starfeeds
+NEW ir.ui.menu: mail.mail_tomefeeds
+NEW ir.ui.menu: mail.menu_email_followers
+NEW ir.ui.menu: mail.menu_email_notifications
+NEW ir.ui.menu: mail.menu_mail_mail
+NEW ir.ui.menu: mail.menu_mail_message
+NEW ir.ui.menu: mail.menu_message_subtype
+DEL ir.ui.menu: mail.menu_email_message
+NEW ir.ui.view: mail.mail_wizard_invite_form
+NEW ir.ui.view: mail.view_followers_tree
+NEW ir.ui.view: mail.view_general_configuration_mail_alias_domain
+NEW ir.ui.view: mail.view_group_form
+NEW ir.ui.view: mail.view_group_kanban
+NEW ir.ui.view: mail.view_group_search
+NEW ir.ui.view: mail.view_group_tree
+NEW ir.ui.view: mail.view_mail_alias_form
+NEW ir.ui.view: mail.view_mail_alias_search
+NEW ir.ui.view: mail.view_mail_alias_tree
+NEW ir.ui.view: mail.view_mail_form
+NEW ir.ui.view: mail.view_mail_message_subtype_form
+NEW ir.ui.view: mail.view_mail_search
+NEW ir.ui.view: mail.view_mail_subscription_form
+NEW ir.ui.view: mail.view_mail_tree
+NEW ir.ui.view: mail.view_message_form
+NEW ir.ui.view: mail.view_message_search
+NEW ir.ui.view: mail.view_message_subtype_tree
+NEW ir.ui.view: mail.view_message_tree
+NEW ir.ui.view: mail.view_notification_tree
+NEW ir.ui.view: mail.view_users_form_mail
+NEW ir.ui.view: mail.view_users_form_simple_modif_mail
+DEL ir.ui.view: base.view_crm_partner_info_History
+DEL ir.ui.view: mail.view_email_message_form
+DEL ir.ui.view: mail.view_email_message_search
+DEL ir.ui.view: mail.view_email_message_tree
+DEL ir.ui.view: mail.view_mailgate_thread_form
+DEL ir.ui.view: mail.view_mailgate_thread_tree
+
+### Ignore new scheduled task
+NEW ir.cron: mail.ir_cron_module_update_notification
+
+### Ignore swap out of access rules
+NEW ir.model.access: mail.access_mail_alias_all
+NEW ir.model.access: mail.access_mail_alias_system
+NEW ir.model.access: mail.access_mail_alias_user
+NEW ir.model.access: mail.access_mail_followers_all
+NEW ir.model.access: mail.access_mail_followers_system
+NEW ir.model.access: mail.access_mail_followers_user
+NEW ir.model.access: mail.access_mail_group_all
+NEW ir.model.access: mail.access_mail_group_user
+NEW ir.model.access: mail.access_mail_mail_all
+NEW ir.model.access: mail.access_mail_mail_system
+NEW ir.model.access: mail.access_mail_mail_user
+NEW ir.model.access: mail.access_mail_message_all
+NEW ir.model.access: mail.access_mail_message_subtype_all
+NEW ir.model.access: mail.access_mail_message_subtype_system
+NEW ir.model.access: mail.access_mail_message_user
+NEW ir.model.access: mail.access_mail_notification_all
+NEW ir.model.access: mail.access_mail_notification_system
+NEW ir.model.access: mail.access_mail_notification_user
+NEW ir.model.access: mail.access_mail_thread_all
+NEW ir.model.access: mail.access_publisher_warranty_contract_all
+DEL ir.model.access: mail.access_mail_message
+DEL ir.model.access: mail.access_mail_thread
+NEW ir.rule: mail.mail_followers_read_write_own
+NEW ir.rule: mail.mail_group_public_and_joined
+NEW ir.rule: mail.mail_notification_read_write_own
+
+### Ignore new configuration data
+NEW mail.group: mail.group_all_employees
+NEW mail.message: mail.module_install_notification
+NEW mail.message.subtype: mail.mt_comment
+
+### Here is some manual bookkeeping to deal with the split up between
+### mail.message and the new mail.mail model.
+### Fields in mail.message:
+### KEEP ###
+# < subject (char, 512) > Keep
+# < model (char, 128) > Keep
+# < res_id (integer) > Keep
+# < date (datetime) > Keep
+# < email_from (char) > Keep
+# < message_id (char) > Keep
+# < attachment_ids (m2m res.attachment) > Keep
+### Transform ###
+# < body_text (text) > txt2html to 'body' on mail.message if not body_html. DONE
+# < body_html (text) > Move to 'body' on mail.message. Also? Move to mail.mail. DONE
+# < partner_id (m2o res.partner) > Move to m2m partner_ids. DONE
+# < user_id (m2o res.users) > author_id (m2o res.partner). Look up user's partner DONE
+# > record_name > call mail_message(_get_record_name) field function after setting model and res_id iff model && res_id DONE
+# > type (email, comment, notification) > Set to notification DONE
+# > parent_id > ? Lookup by in-reply-to?
+### MOVE TO MAIL.MAIL ###
+# < mail_server_id (m2o, ir.mail_server) > Move to mail.mail DONE
+# < email_to (char) > Move to mail.mail DONE
+# < email_cc (char) > Move to mail.mail DONE
+# < email_bcc (char) > Move to mail.mail DONE
+# < reply_to (char) > Move to mail.mail DONE
+# < references (text) > Move to mail.mail DONE
+# < state (outgoing, sent, received, exception, cancel) > Move to mail.mail DONE
+# < autodelete (burn after sending, not relevant) > Move to mail.mail DONE
+### IGNORE ###
+# < subtype (char, {html|plain} > Ignore
+# < headers (text) > Ignore
+# < display_text (text, unstored function). Ignore
+# < original (fields.binary, various formats). Ignore
+# > child_ids > inverse of parent_id. Ignore
+# > notified_partner_ids (m2m res.partner). Ignore
+# > notification_ids (o2m mail.notification) > Ignore
+# > to_read (bool function). Ignore
+# > starred (bool function). Ignore
+# > vote_user_ids (m2m res.users). Ignore
+# > subtype_id (m2o mail.message.subtype). Look for relevant subtype if possible?
+
+# Fields in model mail.mail:
+# > notification (bool) Is set to True in the model's create() method
+# > mail_message_id (m2o, mail.message) DONE
+

=== added file 'mail/migrations/7.0.1.0/post-migration.py'
--- mail/migrations/7.0.1.0/post-migration.py	1970-01-01 00:00:00 +0000
+++ mail/migrations/7.0.1.0/post-migration.py	2013-07-20 15:05:33 +0000
@@ -0,0 +1,134 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 credativ Ltd (<http://credativ.co.uk>)
+#                          (C) 2013 Therp BV (<http://therp.nl>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import logging
+from openerp import pooler, SUPERUSER_ID
+from openerp.tools.mail import html_sanitize, plaintext2html
+from openerp.openupgrade import openupgrade
+
+logger = logging.getLogger('OpenUpgrade (mail)')
+
+subtype_mapping = {
+    'plain': (openupgrade.get_legacy_name('body_text'), plaintext2html),
+    'html': (openupgrade.get_legacy_name('body_html'), html_sanitize),
+    }
+
+def convert_mail_bodies(cr, pool):
+    """
+    Convert plain and html bodies to sanitized html.
+    """
+    message_obj = pool.get('mail.message')
+    for subtype in subtype_mapping.keys():
+        field, func = subtype_mapping[subtype]
+        logger.info("converting %s messages", subtype)
+        cr.execute(
+            "SELECT id, %(field)s FROM mail_message "
+            "WHERE %(msg_subtype)s = '%(subtype)s'" % {
+                'msg_subtype': openupgrade.get_legacy_name('subtype'),
+                'field': field,
+                'subtype': subtype,
+                })
+        for row in cr.fetchall():
+            body = func(row[1])
+            cr.execute("UPDATE mail_message SET body = %s WHERE id = %s", body, row[0])
+
+def create_mail_mail(cr, pool):
+    """
+    Create mail.mail records for every mail.message in the system,
+    because every mail.message in 6.1 is a conventional email.
+    Also perform some other transformations.
+    """
+    message_obj = pool.get('mail.message')
+    mail_obj = pool.get('mail.mail')
+    message_ids = message_obj.search([])
+    messages = message_obj.read(message_obj.search([]), {}, '_classic_write')
+    
+    cr.execute("""SELECT user_id FROM mail_message""")
+    user_ids = dict(cr.fetchall)
+
+    for message in messages:
+        # Set message type to notification
+        write_vals = {
+            'type': 'notification',
+            }
+        # Convert user_id to author partner
+        if user_ids[message['id']]:
+            write_vals['author_id'] = openupgrade.get_partner_id_from_user_id(
+                cr, user_ids[message['id']])
+        message_obj.write(message['id'], write_vals)
+        
+        # Set stored (but not recalculated) function field record_name
+        if message['model'] and message['res_id']:
+            model = pool.get(message['model'])
+            if model:
+                name = model.name_get(
+                    cr, SUPERUSER_ID, [message['res_id']])[0][1]
+                cr.execute(
+                    """
+                    UPDATE mail_message
+                    SET record_name = %s
+                    WHERE id = %s
+                    """, name, message['id'])
+            
+        mail_id = mail_obj.create(
+            {
+                'mail_message_id': message['id'],
+                })
+
+    # Copy legacy fields from message table to mail table
+    cr.execute(
+        """
+        UPDATE mail_mail
+        SET mail.body_html = msg.body,
+            mail.mail_server_id = msg.%(mail_server_id)s,
+            mail.email_to = msg.%(email_to)s,
+            mail.email_cc = msg.%(email_cc)s,
+            mail.email_bcc = msg.%(email_bcc)s,
+            mail.reply_to = msg.%(reply_to)s,
+            mail.references = msg.%(references)s,
+            mail.state = msg.%(state)s,
+            mail.autodelete = msg.%(autodelete)s,
+        FROM mail_mail mail, mail_message msg
+        WHERE mail.mail_message_id = msg.id
+        """ % {
+            'mail_server_id': openupgrade.get_legacy_name('mail_server_id'),
+            'email_to': openupgrade.get_legacy_name('email_to'),
+            'email_cc': openupgrade.get_legacy_name('email_cc'),
+            'email_bcc': openupgrade.get_legacy_name('email_bcc'),
+            'reply_to': openupgrade.get_legacy_name('reply_to'),
+            'references': openupgrade.get_legacy_name('references'),
+            'state': openupgrade.get_legacy_name('state'),
+            'autodelete': openupgrade.get_legacy_name('autodelete'),
+            })
+
+    # Migrate m2o partner_id to m2m partner_ids
+    openupgrade.m2o_to_m2m(
+        cr, 'mail.message', 'mail_message', 'partner_ids',
+        openupgrade.get_legacy_name('partner_id'))
+            
+
+@openupgrade.migrate()
+def migrate(cr, version):
+    pool = pooler.get_pool(cr.dbname)
+    convert_mail_bodies(cr, pool)
+    create_mail_mail(cr, pool)
+    openupgrade.load_data(cr, 'mail', 'migrations/7.0.1.0/data.xml')

=== added file 'mail/migrations/7.0.1.0/pre-migration.py'
--- mail/migrations/7.0.1.0/pre-migration.py	1970-01-01 00:00:00 +0000
+++ mail/migrations/7.0.1.0/pre-migration.py	2013-07-20 15:05:33 +0000
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 Therp BV (<http://therp.nl>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.openupgrade import openupgrade
+
+column_renames = {
+    'mail.message': [
+        # Existing fields to ignore
+        ('subtype', None),
+        ('headers', None),
+        ('display_text', None),
+        ('original', None),
+        # Existing fields to transform
+        ('body_text', None),
+        ('body_html', None),
+        ('partner_id', None),
+        ('user_id', None),
+        # Existing fields to move to mail.mail
+        ('email_to', None),
+        ('email_cc', None),
+        ('email_bcc', None),
+        ('reply_to', None),
+        ('references', None),
+        ('state', None),
+        ('autodelete', None),
+        ]}
+
+@openupgrade.migrate()
+def migrate(cr, version):
+    openupgrade.rename_columns(cr, column_renames)
+    

=== added file 'mail/migrations/7.0.1.0/user_notes.txt'
--- mail/migrations/7.0.1.0/user_notes.txt	1970-01-01 00:00:00 +0000
+++ mail/migrations/7.0.1.0/user_notes.txt	2013-07-20 15:05:33 +0000
@@ -0,0 +1,1 @@
+In OpenERP 7.0, regular emails and the new chatter functionality share a common base. Existing emails have been transformed on a technical level to fit to this new architecture.


Follow ups