@@ 1334-1345 (lines=12) @@ | ||
1331 | ||
1332 | class Sampling_Deviations(WorksheetImporter): |
|
1333 | ||
1334 | def Import(self): |
|
1335 | folder = self.context.bika_setup.bika_samplingdeviations |
|
1336 | for row in self.get_rows(3): |
|
1337 | if row['title']: |
|
1338 | obj = _createObjectByType("SamplingDeviation", folder, tmpID()) |
|
1339 | obj.edit( |
|
1340 | title=row['title'], |
|
1341 | description=row.get('description', '') |
|
1342 | ) |
|
1343 | obj.unmarkCreationFlag() |
|
1344 | renameAfterCreation(obj) |
|
1345 | notify(ObjectInitializedEvent(obj)) |
|
1346 | ||
1347 | ||
1348 | class Calculations(WorksheetImporter): |
|
@@ 644-654 (lines=11) @@ | ||
641 | ||
642 | class Container_Types(WorksheetImporter): |
|
643 | ||
644 | def Import(self): |
|
645 | folder = self.context.bika_setup.bika_containertypes |
|
646 | for row in self.get_rows(3): |
|
647 | if not row['title']: |
|
648 | continue |
|
649 | obj = _createObjectByType("ContainerType", folder, tmpID()) |
|
650 | obj.edit(title=row['title'], |
|
651 | description=row.get('description', '')) |
|
652 | obj.unmarkCreationFlag() |
|
653 | renameAfterCreation(obj) |
|
654 | notify(ObjectInitializedEvent(obj)) |
|
655 | ||
656 | ||
657 | class Preservations(WorksheetImporter): |