Skip to content

Commit 44914a3

Browse files
ramonskiarneldo
andauthored
Add a default date for batch creation (merge branch for senaite#2132) (senaite#2135)
* Add a default date for batch creation * Updating CHANGES.rst * imports sorted Co-authored-by: Arneldo <[email protected]>
1 parent 8a073ab commit 44914a3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGES.rst

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Changelog
88
- #2131 Allow to edit the analysis service sort keys in the services listing
99
- #2133 Filter Contact and CCContact by Client on first click
1010
- #2134 Render unit after result and interim fields
11+
- #2132 Add a default date for batch creation
1112
- #2129 Fix Traceback when invalidating a Sample with Remarks
1213
- #2128 Fix referenceresults widget view mode
1314
- #2127 Fix instrument expiry date display in listing view

src/bika/lims/content/batch.py

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from bika.lims.interfaces import IBatch
3333
from bika.lims.interfaces import ICancellable
3434
from bika.lims.interfaces import IClient
35+
from DateTime.DateTime import DateTime
3536
from plone.app.folder.folder import ATFolder
3637
from plone.indexer import indexer
3738
from Products.Archetypes.public import DateTimeField
@@ -98,6 +99,7 @@ def BatchDate(instance):
9899
DateTimeField(
99100
'BatchDate',
100101
required=False,
102+
default_method=DateTime,
101103
widget=DateTimeWidget(
102104
label=_('Date'),
103105
),

0 commit comments

Comments
 (0)