Passed
Push — 2.x ( 041ff6...87c3c9 )
by Jordi
08:54
created

bika.lims.content.samplematrix.SampleMatrices()   A

Complexity

Conditions 2

Size

Total Lines 10
Code Lines 10

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
eloc 10
dl 10
loc 10
rs 9.9
c 0
b 0
f 0
cc 2
nop 3
1
# -*- coding: utf-8 -*-
2
#
3
# This file is part of SENAITE.CORE.
4
#
5
# SENAITE.CORE is free software: you can redistribute it and/or modify it under
6
# the terms of the GNU General Public License as published by the Free Software
7
# Foundation, version 2.
8
#
9
# This program is distributed in the hope that it will be useful, but WITHOUT
10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
# details.
13
#
14
# You should have received a copy of the GNU General Public License along with
15
# this program; if not, write to the Free Software Foundation, Inc., 51
16
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
#
18
# Copyright 2018-2021 by it's authors.
19
# Some rights reserved, see README and LICENSE.
20
21
from AccessControl import ClassSecurityInfo
22
from bika.lims.config import PROJECTNAME
23
from bika.lims.content.bikaschema import BikaSchema
24
from bika.lims.interfaces import IDeactivable
25
from Products.Archetypes.public import BaseFolder
26
from Products.Archetypes.public import Schema
27
from Products.Archetypes.public import registerType
28
from zope.interface import implements
29
30
schema = BikaSchema.copy() + Schema((
31
32
))
33
34
schema["description"].schemata = "default"
35
schema["description"].widget.visible = True
36
37
38
class SampleMatrix(BaseFolder):
39
    implements(IDeactivable)
40
    security = ClassSecurityInfo()
41
    schema = schema
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable schema does not seem to be defined.
Loading history...
42
    _at_rename_after_creation = True
43
44
    def _renameAfterCreation(self, check_auto_id=False):
45
        from senaite.core.idserver import renameAfterCreation
46
        renameAfterCreation(self)
47
48
49
registerType(SampleMatrix, PROJECTNAME)
50