mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[9.0][IMP] quality_control_team: add tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
====================
|
||||
@@ -38,7 +38,7 @@ Credits
|
||||
Images
|
||||
------
|
||||
|
||||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
4
quality_control_team/tests/__init__.py
Normal file
4
quality_control_team/tests/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import test_quality_control_team
|
||||
36
quality_control_team/tests/test_quality_control_team.py
Normal file
36
quality_control_team/tests/test_quality_control_team.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openerp.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)
|
||||
@@ -31,24 +31,7 @@
|
||||
</div>
|
||||
|
||||
<div class="container o_kanban_card_manage_pane o_invisible">
|
||||
<div class="row">
|
||||
<!--<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_view">-->
|
||||
<!--<div class="o_kanban_card_manage_title">-->
|
||||
<!--<span>View</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_new">-->
|
||||
<!--<div class="o_kanban_card_manage_title">-->
|
||||
<!--<span>New</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_reports">-->
|
||||
<!--<div class="o_kanban_card_manage_title">-->
|
||||
<!--<span>Reports</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
|
||||
<div class="row"/>
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||
<div class="col-xs-8">
|
||||
<ul class="oe_kanban_colorpicker" data-field="color"/>
|
||||
|
||||
Reference in New Issue
Block a user