Coveralls logob
Coveralls logo
  • Home
  • Features
  • Pricing
  • Docs
  • Sign In

OCA / operating-unit / 1109

11 Oct 2019 - 6:32 coverage decreased (-2.8%) to 75.389%
1109

Pull #203

travis-ci

9181eb84f9c35729a3bad740fb7f9d93?size=18&default=identiconweb-flow
[NEW] New module mail_operating_unit to introduce the operating unit to mail
Pull Request #203: [NEW] New module mail_operating_unit to introduce the operating unit to mail

41 of 64 new or added lines in 6 files covered. (64.06%)

242 of 321 relevant lines covered (75.39%)

1.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/mail_operating_unit/models/res_users.py
1
##############################################################################
2
#
3
#    Copyright (c) 2019 brain-tec AG (http://www.braintec-group.com)
4
#    License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
5
#
6
##############################################################################
7

8
from odoo import api, fields, models
2×
9

10

11
class ResUsers(models.Model):
2×
12

13
    _inherit = 'res.users'
2×
14

15
    operating_unit_for_mails_id = fields.Many2one(
2×
16
        'operating.unit', 'Operating Unit For Mails',
17
        domain="[('id', 'in', operating_unit_ids)]"
18
    )
19

20
    @api.onchange('operating_unit_ids')
2×
21
    def _on_change_operating_unit_ids(self):
NEW
22
        if (self.operating_unit_for_mails_id and
!
23
                self.operating_unit_for_mails_id.id not in self.operating_unit_ids.ids):
NEW
24
            self.operating_unit_for_mails_id = False
!
Troubleshooting · Open an Issue · Sales · Support · ENTERPRISE · CAREERS · STATUS
BLOG · TWITTER · Legal & Privacy · Supported CI Services · What's a CI service? · Automated Testing

© 2019 Coveralls, LLC