Skip to content

Commit

Permalink
Add a default date for batch creation (merge branch for #2132) (#2135)
Browse files Browse the repository at this point in the history
* Add a default date for batch creation

* Updating CHANGES.rst

* imports sorted

Co-authored-by: Arneldo <ta.arneldo@gmail.com>
  • Loading branch information
ramonski and arneldo authored Sep 20, 2022
1 parent 8a073ab commit 44914a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Changelog
- #2131 Allow to edit the analysis service sort keys in the services listing
- #2133 Filter Contact and CCContact by Client on first click
- #2134 Render unit after result and interim fields
- #2132 Add a default date for batch creation
- #2129 Fix Traceback when invalidating a Sample with Remarks
- #2128 Fix referenceresults widget view mode
- #2127 Fix instrument expiry date display in listing view
Expand Down
2 changes: 2 additions & 0 deletions src/bika/lims/content/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from bika.lims.interfaces import IBatch
from bika.lims.interfaces import ICancellable
from bika.lims.interfaces import IClient
from DateTime.DateTime import DateTime
from plone.app.folder.folder import ATFolder
from plone.indexer import indexer
from Products.Archetypes.public import DateTimeField
Expand Down Expand Up @@ -98,6 +99,7 @@ def BatchDate(instance):
DateTimeField(
'BatchDate',
required=False,
default_method=DateTime,
widget=DateTimeWidget(
label=_('Date'),
),
Expand Down

0 comments on commit 44914a3

Please sign in to comment.