diff --git a/quality_control_team/models/qc_team.py b/quality_control_team/models/qc_team.py deleted file mode 100644 index 18eb16303..000000000 --- a/quality_control_team/models/qc_team.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import api, fields, models - - -class QualityControlTeam(models.Model): - _name = "qc.team" - _inherit = ['mail.thread'] - _description = "Quality Control Team" - _order = "name" - - @api.model - def _get_default_qc_team_id(self, user_id=None): - if not user_id: - user_id = self.env.uid - qc_team_id = None - if 'default_qc_team_id' in self.env.context: - qc_team_id = self.env['qc.team'].browse( - self.env.context.get('default_qc_team_id')) - if not qc_team_id or not qc_team_id.exists(): - company_id = self.sudo(user_id).company_id.id - qc_team_id = self.env['qc.team'].sudo().search([ - '|', - ('user_id', '=', user_id), - ('member_ids', '=', user_id), - '|', - ('company_id', '=', False), - ('company_id', 'child_of', [company_id]) - ], limit=1) - if not qc_team_id: - default_team_id = self.env.ref( - 'quality_control_team.qc_team_main', raise_if_not_found=False) - if default_team_id: - qc_team_id = default_team_id - return qc_team_id - - name = fields.Char( - string='Quality Control Team', required=True) - active = fields.Boolean(default=True) - company_id = fields.Many2one( - comodel_name='res.company', string='Company', - default=lambda self: self.env['res.company']._company_default_get( - 'qc.team')) - user_id = fields.Many2one( - comodel_name='res.users', string='Team Leader') - member_ids = fields.One2many( - comodel_name='res.users', inverse_name='qc_team_id', - string='Team Members') - reply_to = fields.Char( - string='Reply-To', - help="The email address put in the 'Reply-To' of all emails sent by " - "Odoo about cases in this QC team") - color = fields.Integer(string='Color Index', help="The color of the team") - - @api.model - def create(self, values): - return super( - QualityControlTeam, - self.with_context(mail_create_nosubscribe=True)).create(values) diff --git a/quality_control_team/tests/test_quality_control_team.py b/quality_control_team/tests/test_quality_control_team.py deleted file mode 100644 index 77de167c4..000000000 --- a/quality_control_team/tests/test_quality_control_team.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo.tests.common import TransactionCase - - -class TestQualityControlTeam(TransactionCase): - - def setUp(self): - super(TestQualityControlTeam, self).setUp() - self.qc_team_obj = self.env['qc.team'] - self.main_qc_team = self.env.ref('quality_control_team.qc_team_main') - self.other_company = self.env['res.company'].create({ - 'name': 'other company', - }) - self.user_test = self.env['res.users'].create({ - 'name': 'Test User', - 'login': 'testuser', - 'company_id': self.other_company.id, - 'company_ids': [(4, self.other_company.id)], - }) - - def test_default_qc_team(self): - """Test that the QC team is defaulted correctly.""" - team = self.qc_team_obj._get_default_qc_team_id( - user_id=self.user_test.id) - self.assertEqual(team, self.main_qc_team) - test_team = self.qc_team_obj.create({ - 'name': 'Test Team', - 'user_id': self.user_test.id, - 'company_id': self.other_company.id, - }) - team = self.qc_team_obj._get_default_qc_team_id( - user_id=self.user_test.id) - self.assertEqual(team, test_team) diff --git a/quality_control_team/views/qc_team_dashboard.xml b/quality_control_team/views/qc_team_dashboard.xml deleted file mode 100644 index 6025a2d7f..000000000 --- a/quality_control_team/views/qc_team_dashboard.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - qc.team.dashboard - qc.team - - - - - - - - -
-
-
-
-
-
- -
-
-
-
-
-
-
-
- - -
- - - - - - - - Case Teams - Search - qc.team - - - - - - - - - - - - - - Dashboard - qc.team - form - kanban,form - {'search_default_personal':1} - -

Define a new quality control teams going to Configuration > - Quality Control Teams. -

-
-
- - - - diff --git a/quality_control_team/views/qc_team_view.xml b/quality_control_team/views/qc_team_view.xml deleted file mode 100644 index be01284db..000000000 --- a/quality_control_team/views/qc_team_view.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - qc.team.form - qc.team - -
- -
- -
-
-