Code Monkey home page Code Monkey logo

senaite.impress's People

Contributors

dependabot[bot] avatar grulisco avatar mikejmets avatar ramonski avatar xispa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

senaite.impress's Issues

Attachment in Publish PDF or mail

Steps to reproduce

Publish or send an email with the attached file visible in the generated pdf

Current behavior

now i only see the name of file on report

Expected behavior

i would be see its on report

Screenshot (optional)

Schermata del 2020-01-31 01-40-47
Schermata del 2020-01-31 01-48-55

Revise concept of primary sample in multi-reports

Publishing several samples/requests into a single multireport is using one of them as the primary one to:

  • displaying common information in the report header, although some might differ in detail (e.g.client contact, batch info).
  • determining the location of the saved report (if not saved individually)

The word primary implies a kind of first of something, so it is confusing for users to recognize the actual primary request, because of contradicting expectations:

  • In publish view the list of samples is determined by the current sort order of the calling sample view, which can vary by user task. So the first entry is highly at random.
  • In the multireport header adress, contact, batch information are based on the oldest sample, samples are sorted ascending by date (which is a good default behaviour IMO).
  • The pdf of the multireport is saved to the latest sample (changed newly, see #52), so you won't find it easily again having one of the other ways in mind.

So I propose to make this work in a more consistent and user-friendly way.

IMHO the first sample in the sample list (preferably in ascending order) should be considered as the primary one and should receive the saved pdf too.

Senaite.Impress does not work with bootstrap grid system.

Steps to reproduce

-Create a custom report for Senaite.Impress
-Use bootstrap grid classes (other than col-sm-12) to style the report
-Open the report in the Impress report viewer.
-Notice that the grid styling does not apply.

Current behavior

-Bootstrap grid classes do not style Senaite.Impress reports (other than col-sm-12)

Expected behavior

-All bootstrap classes supported by WeasyPrint should apply styling.

Screenshot (optional)

  <tal:render> 
    <div class="container"> 
      <div class="row"> 
        <div class="col-sm"> 
          One of three columns 
        </div> 
        <div class="col-sm"> 
          One of three columns 
        </div> 
        <div class="col-sm"> 
          One of three columns 
        </div> 
      </div> 
    </div> 
  </tal:render> 
</tal:report>```

Date Published is empty on Default report

Steps to reproduce

Publish a Sample
Select the Default report

Current behavior

Date Published is empty

Expected behavior

Date Published has either the date of publication or the current date time

Screenshot (optional)

Sending E-Mail with multiple Multireports

Steps to reproduce

While "Store Multi-Report PDFs Individually" is ON, those reports are stored repeatedly with identical content into every mentioned sample object.
The corresponding e-mail to the client contains all those identical reports which will lead to client's confusion and/or to very large e-mails unneccessarily, if we talk about e.g. 50 samples per report. IMHO the multireport feature is meant to make things easier and more comprehensive to the client, so this is a doubling of 'multipleness'.

Current behavior

A Multi-Report of n samples produces an e-mail with n identical attachments.

Expected behavior

A Multi-Report of n samples produces an e-mail with one attachment, preferably named by the primary sample (also see #58)

Screenshot (optional)

grafik

How to make Logos appear on all pages

Is it possible to make a logo or header appear on all pages using senaite.impress? Like the pagination?
Some people suggest me to put the header in inside a tal:repeat but it doesn't work. It will repeat the header in the same page. Can you help please?

Errors Publishing Results: Signature and Fullname Attributes Not Found

Version Overview
Plone 5.2.14 (5222)
CMF 2.7.1
Zope 4.8.10
Python 2.7.18 (default, Apr 20 2020, 19:34:11) [GCC 8.3.0]
PIL 6.2.2 (Pillow)
WSGI: On
Server: waitress 1.4.4

OS: linux host, ubuntu 20.04
Browser: chrome
Issue Description:
During my testing of SENAITE with loaded demo data, I've encountered two consecutive errors while attempting to publish results. Initially, the system reported an error related to a missing signature attribute. After addressing this issue by adding a signature image to the lab manager's contact, I attempted to publish results again. This time, the system reported an error related to a missing Fullname attribute, despite all name details being correctly filled out under the lab manager's contact profile.

Steps to Reproduce:

Load demo data into SENAITE.
Attempt to publish results without a signature image added for the lab manager.
Add a signature image to the lab manager's contact profile.
Attempt to publish results again.
Initial Error:

Error Message: Ooops, an error occurred - Error: Signature
Relevant template/code snippet: ...manager/Signature...
Attempted Solutions:

I added a signature image for the lab manager's contact in the system as per the documentation.
Subsequent Error:

Error Message: Ooops, an error occurred - Error: Fullname
Relevant template/code snippet: ...manager/Fullname...
Further Steps Taken:

Verified that all name details are present under the lab manager's contact.
Switched the lab manager to another user, but encountered the same error.
Expected Behavior:
The system should successfully publish results without encountering errors related to missing signature or fullname attributes, especially when these attributes are present and correctly configured in the system.

Actual Behavior:
The system fails to publish results, citing missing signature and fullname attributes despite appropriate configuration.

full error message:
Ooops, an error occured
Error: Fullname

  • Expression: "manager/Fullname"
  • Filename: ... /senaite/impress/analysisrequest/templates/signatures.pt
  • Location: (line 19: col 35)
  • Source:
    ^^^^^^^^^^^^^^^^
  • Expression: "python:view.render_signatures(context, **options)"
  • Filename: ... ss/src/senaite/impress/templates/reports/MultiDefault.pt
  • Location: (line 37: col 28)
  • Source: ... ucture python:view.render_signatures(context, **options)" />
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • Arguments: repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7f121f222a00>
    managers: [<LabContact at /RSKLabs/bika_setup/bika_labcontacts/labcontact-9 used for /RSKLabs/setup/departments/department-4>]
    template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7f12210a68d0>
    views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7f121c142910>
    request: <WSGIRequest, URL=http://164.68.126.229:55/RSKLabs/samples/ajax_publish/render_reports>
    args: (<PloneSite at /RSKLabs>,)
    here: <PloneSite at /RSKLabs>
    manager: <LabContact at /RSKLabs/bika_setup/bika_labcontacts/labcontact-9 used for /RSKLabs/setup/departments/department-4>
    user: <PropertiedUser 'admin'>
    nothing: None
    translate: <function translate at 0x7f120f3f97d0>
    container: <PloneSite at /RSKLabs>
    modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x7f122e91ded0>
    traverse_subpath: []
    default:
    loop: {u'manager': <Products.PageTemplates.engine.RepeatItem object at 0x7f120f2df990>}
    context: <PloneSite at /RSKLabs>
    view: <senaite.impress.analysisrequest.reportview.MultiReportView object at 0x7f121c648550>
    collection: [SuperModel:UID(2d9bd518f12b433288e9e32d944092e5)]
    target_language: None
    root:
    options: {'page_width': 210.0, 'name': 'DIN A4', 'format': 'A4', 'content_height': 257.0, 'margin_right': 20.0, 'content_width': 170.0, 'margin_top': 20.0, 'margin_left': 20.0, 'report_options': {}, 'margin_bottom': 20.0, 'page_height': 297.0, 'orientation': u'portrait'}
    attrs: {}

PYTHONHTTPSVERIFY=0 buildout failed

Steps to reproduce

PYTHONHTTPSVERIFY=0 buildout

Current behavior

Version and requirements information containing beautifulsoup4:
[versions] constraint on beautifulsoup4: 4.11.1
Requirement of senaite.impress==2.4.0: beautifulsoup4==4.9.3
Requirement of zope.testbrowser: BeautifulSoup4
While:
Installing instance.
Error: The requirement ('beautifulsoup4==4.9.3') is not allowed by your [versions] constraint (4.11.1)

Expected behavior

complete the build process

Screenshot (optional)

Layout overflow in A4 landscape format

Steps to reproduce

Publish a report and choose A4 with landscape orientation

Note: Other paper formats (A3, letter etc.) seem to be not affected by this

Current behavior

The report overflows on the right boundary

Expected behavior

The report keeps within the calculated dimensions

Screenshot (optional)

senaite impress 2018-07-03 11-48-07

Remarks field is broken in Senaite LIMS

Steps to reproduce

Writing anything in the Remarks field of the analysis in Senaite LIMS.

Current behavior

Showing the raw data of the output (see the screenshot attached)

Expected behavior

Showing the text of the remark without anything else e.g. tags or Unicode sequences instead of non-English characters

Screenshot (optional)

image

Report PDF Cannot Display Chinese characters

Screenshot (optional)

1621580170(1)

As above, the client name are Chinese characters, but not displayed normally. How can I solve this problem? It's very important to me.
Can anyone help me please ?

Not displaying interim results on the reports

Steps to reproduce

Create a calculation that has several interim fields (in my case, an average of 5 interim fields). Tick the option to report the interim fields. Create a sample that requires this calculation. Enter some figures into the interim fields and publish the results

Current behavior

No interim fields are displayed on the reports

Expected behavior

The interim fields should be displayed on the reports

Screenshot (optional)

Calculation page
Calculation page
Sample
Analysis
Published results
Results

Publication E-Mail of Multi-AR reports offers only attachments of primary AR

Steps to reproduce

Create, receive, submit, verify and publish a set of ARs

Current behavior

Choosing additional attachments for E-Mail publication was introduced with #19 recently.
In case of reports of multiple ARs there are offered attachments of the first AR only.
The attachments of the following ARs are missing.

Expected behavior

Attachments of all involved ARs are offered in E-Mail publication.

Rejected AS are shown in the PDF Report

Steps to reproduce

Create a new sample with some AS. Choose one AS and reject it. The same behavior happens for those AS with or without a result.

Current behavior

The rejected AS is shown in the PDF report. When the AS is rejected before a result is saved, an empty space is shown in the PDF report, but when a result is already saved then the latest result is shown in the PDF report.

Expected behavior

Rejected AS should not be shown in the PDF results report.

Screenshot (optional)

screen shot 2019-03-06 at 11 01 33 pm

screen shot 2019-03-06 at 11 01 53 pm

Publication Specification doesn't work

Description

A single analysis specification can be assigned while creating analysis request.
The problem is that a single product tested by lab can have multiple specifications.

Being able to change "Publication Specification", hence having desired specifications in published report would absolutely solve this problem.

Reproduction guide

  1. Created a new sample request

  2. Assigned analysis specification

  3. Entered the results

  4. Published the report

  5. Changed the "publication specification" again

  6. Published the report again

Observed behaviour

After saving publication specification, the "specification" changed but the "Range" did not change
image

Expected behaviour

The Range should be different in published report

Versions

  • OS: Ubuntu Server 18.04.2 LTS

  • senaite.core: 1.3.1

  • senaite.impress: 1.2.0

  • senaite.core.listing: master

  • senaite.core.supermodel: master

Impress Control Panel broken

Steps to reproduce

This happens only if there are custom reports containing special characters in the filename.
(Here german umlaut in MultiBestätigung.pt)

Goto Site setup/Impress settings

(observed on senaite.impress 1.2.3 and 1.2.4)

Current behavior

Traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 132, in update
  Module z3c.form.form, line 136, in updateWidgets
  Module z3c.form.field, line 277, in update
  Module z3c.form.browser.select, line 51, in update
  Module z3c.form.browser.widget, line 171, in update
  Module z3c.form.widget, line 233, in update
  Module z3c.form.widget, line 227, in updateTerms
  Module zope.component._api, line 107, in getMultiAdapter
  Module zope.component._api, line 120, in queryMultiAdapter
  Module zope.component.registry, line 238, in queryMultiAdapter
  Module zope.interface.adapter, line 532, in queryMultiAdapter
  Module z3c.form.term, line 105, in ChoiceTerms
  Module zope.schema._field, line 352, in bind
  Module Zope2.App.schema, line 33, in get
  Module senaite.impress.vocabularies, line 36, in __call__
  Module zope.schema.vocabulary, line 41, in __init__
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 24: ordinal not in range(128)

Expected behavior

Display Impress Settings dialog working with any valid filenames of the reports.

Screenshot (optional)

Publication preference missing and publication error in senaite

-- Steps to reproduce
Added a Client and added contacts under it
-- Current behavior
Edited a contact to set publication preference. Not seeing any pdf/print options under publications preference
-- Expected behavior
Should be able to see options under publication preference
-- Screenshot (optional)
image

Clicking Prepublish or Publish button results in below error because of this
image

Column overflow with template MultiDefaultByColumn.pt

Steps to reproduce

  • Create a report over e.g. 10 ARs with same analyses services or profiles
  • Choose template MultiDefaultByColumn.pt

Current behavior

Result table shows only the first 5 ARs, the rest is lost.

Expected behavior

Results of all ARs should be displayed in separate table sections
following the setting "Maximum columns per results email" in Bika Setup/Result Reports
or create a new item in senaite publisher settings for this.

Screenshot (optional)

spectacle c18418

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.