Permalink
Browse files

🚑 remove "odoo" prefix from: 1) root partner name and email; 2) mail_…

…bot channel name
  • Loading branch information...
RafiZz committed Nov 28, 2018
1 parent 6bea08c commit e1232012b966f45471d5b9b907e0acd89998d298
Showing with 23 additions and 1 deletion.
  1. +4 −0 web_debranding/data.xml
  2. +16 −0 web_debranding/models/mail_channel.py
  3. +3 −1 web_debranding/models/res_users.py
@@ -10,4 +10,8 @@
<record id="base.main_partner" model="res.partner">
<field name="image"></field>
</record>
<record id="base.partner_root" model="res.partner">
<field name="name">Bot</field>
<field name="email">bot@example.com</field>
</record>
</odoo>
@@ -0,0 +1,16 @@
# Copyright 2018 Bikbov Rafis <https://it-projects.info/team/bikbov>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from odoo import models, api


class Channel(models.Model):
_inherit = 'mail.channel'

@api.model
def init_odoobot(self):
channel = super(Channel, self).init_odooboot()
channel.write({
'name': 'Bot'
})
return channel
@@ -1,12 +1,14 @@
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from odoo import models, api
from odoo import models, api, fields


class ResUsers(models.Model):
_inherit = 'res.users'

odoobot_state = fields.Selection(string="Bot Status")

@api.multi
def is_admin(self):
# By default Python functions starting with _ are considered private methods.

0 comments on commit e123201

Please sign in to comment.