summaryrefslogtreecommitdiff
path: root/odoo/addons/base/data/res_users_data.xml
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2018-08-24 11:05:22 +0200
committerYannick Tivisse <yti@odoo.com>2018-08-24 11:05:22 +0200
commit265263dbce6c117eeac825c114df90ec9a8375ba (patch)
tree8fc26a7eb0547a2a3e89fce9c10c0d453fb12f47 /odoo/addons/base/data/res_users_data.xml
parentc3e8fe5da162bebe29a21f4662a5022c0c9bc343 (diff)
[FIX] base: Set a default email address for admin
Purpose ======= Currently, as the admin as no email address, it's now impossible to install the mail module without demo data, because of the following data: <record model="mail.message" id="module_install_notification" context="{'mail_notify_noemail': True}"> <field name="model">mail.channel</field> <field name="res_id" ref="mail.channel_all_employees"/> <field name="message_type">email</field> <field name="subtype_id" ref="mail.mt_comment"/> <field name="subject">Welcome to Odoo!</field> <field name="body"><![CDATA[<p>Welcome to the #general channel.</p> <p>This channel is accessible to all users to <b>easily share company information</b>.</p>]]></field> </record> Because when creating a mail.message a user error is raised if no email address is found. @api.model def _get_default_from(self): if self.env.user.email: return formataddr((self.env.user.name, self.env.user.email)) raise UserError(_("Unable to post message, please configure the sender's email address.")) In a general way, all the users should have an email address.
Diffstat (limited to 'odoo/addons/base/data/res_users_data.xml')
-rw-r--r--odoo/addons/base/data/res_users_data.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/addons/base/data/res_users_data.xml b/odoo/addons/base/data/res_users_data.xml
index b28572009ce..f274489fb1d 100644
--- a/odoo/addons/base/data/res_users_data.xml
+++ b/odoo/addons/base/data/res_users_data.xml
@@ -6,6 +6,7 @@
<field name="partner_id" ref="base.partner_root"/>
<field name="company_id" ref="main_company"/>
<field name="company_ids" eval="[(4, ref('main_company'))]"/>
+ <field name="email">root@example.com</field>
<field name="signature"><![CDATA[<span>-- <br/>
System</span>]]></field>
</record>