Browse Source

[IMP] base_kanban_stage: Centralize default stage ID

* Centralize default_stage_id and return empty RecordSet of type `base_kanban_stage`
pull/679/head
Ted Salmon 8 years ago
committed by Dave Lasley
parent
commit
432708a323
  1. 2
      base_kanban_stage/models/base_kanban_abstract.py
  2. 7
      base_kanban_stage/tests/test_base_kanban_abstract.py

2
base_kanban_stage/models/base_kanban_abstract.py

@ -99,7 +99,7 @@ class BaseKanbanAbstract(models.AbstractModel):
@api.model
def _default_stage_id(self):
return # pragma: no cover
return self.env['base.kanban.stage']
@api.multi
def _read_group_stage_ids(

7
base_kanban_stage/tests/test_base_kanban_abstract.py

@ -64,3 +64,10 @@ class TestBaseKanbanAbstract(TransactionCase):
{self.id_1: False, self.id_2: True},
)
)
def test_default_stage_id(self):
''' It should return an empty RecordSet '''
self.assertEqual(
self.env['base.kanban.abstract']._default_stage_id(),
self.env['base.kanban.stage']
)
Loading…
Cancel
Save