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

Cannot override behavior of Batch folder when using before_render #1467

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

xispa
Copy link
Member

@xispa xispa commented Nov 4, 2019

Description of the issue/feature this PR addresses

senaite.core's BatchFolder is used as the "root" listing view for batches listings. Nevertheless, it overrides the function before_render. As a result, some of the changes made in subscriber adapters from another add-ons are omitted. For instance, trying to modify context_actions via subscriber adapters won't have any effect because after the call, the value is overriden in BatchFolder.

This Pull Request, moves the logic for before_render from the base class "BatchFolder" to the function update.

Current behavior before PR

Cannot override some behavior (e.g., context_actions) of BatchFolder listing by using subscriber adapters.

Desired behavior after PR is merged

Can override behavior of BatchFolder listoing by using subscriber adapters.

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

@ramonski ramonski merged commit 8e48ffd into master Nov 7, 2019
@ramonski ramonski deleted the batch-folder-update branch November 7, 2019 17:37
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