Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Batch lists are empty #562

Merged
merged 3 commits into from
Jan 11, 2018
Merged

Client Batch lists are empty #562

merged 3 commits into from
Jan 11, 2018

Conversation

xispa
Copy link
Member

@xispa xispa commented Jan 11, 2018

Description of the issue/feature this PR addresses

With this Pull Request, the Batches list from inside Client displays the Batches assigned to the current Client. The reason was the view was querying for AnalysisRequest objects against bika_catalog, while Analysis Requests live in ' bika_catalog_analysisrequest_listing`.

Linked issue: Client Batch lists are empty #548

Although this PR only addresses the above mentioned issue, this view needs to be improved in terms of performance still:

  • Use brains instead of objects in folderitem
  • Fetch the Batches from the client directly instead of fetching ARs.

Current behavior before PR

No batches listed in Client > Batches

Desired behavior after PR is merged

Client Batches are displayed in Client > Batches

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

# TODO This workaround is necessary?
date = full_obj.Schema().getField('BatchDate').get(obj)
if callable(date):
date = date()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just inspected the code and BatchDate is a normal DateTimeField which should have the common Archetypes getters/setters:

    DateTimeField(
        'BatchDate',
        required=False,
        widget=DateTimeWidget(
            label=_('Date'),
        ),
    ),

🤔

@ramonski ramonski merged commit c70d2b4 into senaite:master Jan 11, 2018
@xispa xispa deleted the i548 branch January 24, 2018 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants