Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 3.1.7
    • Fix Version/s: None
    • Labels:
      None
    • Sprint:
      Bika Health 3.1.8

      Description

      Hello Everyone, I have successfully been able to customize Bika Health to suit a medical Laboratory but i encountered an issue in the Invoice area. I tried or have been trying to get an invoice of a patients Lab request but i am getting an error . Please help. here below is the error:

      Traceback (innermost last):
      Module ZPublisher.Publish, line 60, in publish
      Module ZPublisher.mapply, line 77, in mapply
      Module ZPublisher.Publish, line 46, in call_object
      Module bika.health.browser.analysisrequest.invoice, line 19, in __call__
      Module bika.lims.browser.analysisrequest.invoice, line 127, in __call__
      Module Products.Five.browser.pagetemplatefile, line 125, in __call__
      Module Products.Five.browser.pagetemplatefile, line 59, in __call__
      Module zope.pagetemplate.pagetemplate, line 132, in pt_render
      Module zope.pagetemplate.pagetemplate, line 240, in __call__
      Module zope.tal.talinterpreter, line 271, in __call__
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 888, in do_useMacro
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 954, in do_defineSlot
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 858, in do_defineMacro
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 954, in do_defineSlot
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 954, in do_defineSlot
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 946, in do_defineSlot
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 531, in do_optTag_tal
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
      Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
      Module zope.tales.tales, line 696, in evaluate
      - URL: /home/mr-web/Plone/buildout-cache/eggs/bika.health-3.1.7-
      py2.7.egg/bika/health/browser/analysisrequest/templates/analysisrequest_invoice.pt
      - Line 26, Column 2
      - Expression: <PathExpr standard:u'view/content'>
      - Names:
      {'args': (),
      'container': <AnalysisRequest at /Plone/clients/client15-2/SE15-0001-R0001>,
      'context': <AnalysisRequest at /Plone/clients/client15-2/SE15-0001-R0001>,
      'default': <object object at 0xb74a46c0>,'here': <AnalysisRequest at /Plone/clients/client15-2/SE15-0001-R0001>,
      'loop': {},
      'nothing': None,
      'options': {},
      'repeat': <Products.PageTemplates.Expressions.SafeMapping object at
      0xad814d9c>,
      'request': <HTTPRequest, URL=http://localhost:8080/Plone/clients/client15-
      2/SE15-0001-R0001/invoice>,
      'root': <Application at >,
      'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile
      object at 0xb22166ac>,
      'traverse_subpath': [],
      'user': <PloneUser 'wisdom'>,
      'view': <Products.Five.metaclass.InvoiceView object at 0xada27ecc>,
      'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at
      0xada2deac>}
      Module zope.tales.expressions, line 217, in __call__
      Module Products.PageTemplates.Expressions, line 155, in _eval
      Module Products.PageTemplates.Expressions, line 117, in render
      Module Products.Five.browser.pagetemplatefile, line 125, in __call__
      Module Products.Five.browser.pagetemplatefile, line 59, in __call__
      Module zope.pagetemplate.pagetemplate, line 132, in pt_render
      Module zope.pagetemplate.pagetemplate, line 240, in __call__
      Module zope.tal.talinterpreter, line 271, in __call__
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 821, in do_loop_tal
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 821, in do_loop_tal
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 533, in do_optTag_tal
      Module zope.tal.talinterpreter, line 518, in do_optTag
      Module zope.tal.talinterpreter, line 513, in no_tag
      Module zope.tal.talinterpreter, line 343, in interpret
      Module zope.tal.talinterpreter, line 620, in do_insertText_tal
      Module Products.PageTemplates.Expressions, line 225, in evaluateText
      Module zope.tales.tales, line 696, in evaluate
      - URL: /home/mr-web/Plone/buildout-cache/eggs/bika.health-3.1.7-
      py2.7.egg/bika/health/browser/analysisrequest/templates/analysisrequest_invoice_con
      tent.pt
      - Line 43, Column 8
      - Expression: <PythonExpr (view.getPreferredCurrencyAbreviattion())>
      - Names:
      {'args': (),
      'container': <AnalysisRequest at /Plone/clients/client15-2/SE15-0001-R0001>,
      'context': <AnalysisRequest at /Plone/clients/client15-2/SE15-0001-R0001>,
      'default': <object object at 0xb74a46c0>,
      'here': <AnalysisRequest at /Plone/clients/client15-2/SE15-0001-R0001>,'loop': {},
      'nothing': None,
      'options': {},
      'repeat': <Products.PageTemplates.Expressions.SafeMapping object at
      0xad813374>,
      'request': <HTTPRequest, URL=http://localhost:8080/Plone/clients/client15-
      2/SE15-0001-R0001/invoice>,
      'root': <Application at >,
      'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile
      object at 0xb221672c>,
      'traverse_subpath': [],
      'user': <PloneUser 'wisdom'>,
      'view': <Products.Five.metaclass.InvoiceView object at 0xada27ecc>,
      'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at
      0xada3b2ac>}
      Module zope.tales.pythonexpr, line 59, in __call__
      - __traceback_info__: (view.getPreferredCurrencyAbreviattion())
      Module <string>, line 1, in <module>
      AttributeError: 'InvoiceView' object has no attribute
      'getPreferredCurrencyAbreviattion'
      

        Activity

        Hide
        lemoene lemoene added a comment -

        I tried or have been trying to get an invoice of a patients Lab request

        a la How to get system issues attended to fast:

        1. What did you try to do? Where in the system were you and what action caused the error

        NB. Please copy the web address from the browser and include in the issue

        2. What user authorisation did you use? E.g. lab clerk, analyst or lab manager?

        3. What did you expect to happen?

        4. What happened?

        Show
        lemoene lemoene added a comment - I tried or have been trying to get an invoice of a patients Lab request a la How to get system issues attended to fast : 1. What did you try to do? Where in the system were you and what action caused the error NB. Please copy the web address from the browser and include in the issue 2. What user authorisation did you use? E.g. lab clerk, analyst or lab manager? 3. What did you expect to happen? 4. What happened?
        Hide
        xispa Jordi (Inactive) added a comment -

        Pau Soliva, yours.

        getPreferredCurrencyAbreviattion had a typo and was changed to getPreferredCurrencyAbreviation in BL318:
        https://github.com/bikalabs/Bika-LIMS/blob/master/bika/lims/browser/analysisrequest/invoice.py

        but not in the BH317's template:
        https://github.com/bikalabs/bika.health/blob/master/bika/health/browser/analysisrequest/templates/analysisrequest_invoice_content.pt

        Please, check for other occurrences in BH.

        Show
        xispa Jordi (Inactive) added a comment - Pau Soliva , yours. getPreferredCurrencyAbreviattion had a typo and was changed to getPreferredCurrencyAbreviation in BL318: https://github.com/bikalabs/Bika-LIMS/blob/master/bika/lims/browser/analysisrequest/invoice.py but not in the BH317's template: https://github.com/bikalabs/bika.health/blob/master/bika/health/browser/analysisrequest/templates/analysisrequest_invoice_content.pt Please, check for other occurrences in BH.
        Hide
        eshiet Elijah Wisdom added a comment -

        Sorry for this long delay.
        Answers based on question's numbers:
        1. i had already assigned prices to various analysis services and when i made an analysis request i got a total sum of the cost of the request and when i went to check invoice for the analysis request after getting the result i got that error.
        2. i used the lab clerk, i used the admin with all priviledges.
        3. i expected to see an invoice of the analysis request made so that i could print.
        4. i got the erro after trying what i did in answer No 1 above over and over again.

        Show
        eshiet Elijah Wisdom added a comment - Sorry for this long delay. Answers based on question's numbers: 1. i had already assigned prices to various analysis services and when i made an analysis request i got a total sum of the cost of the request and when i went to check invoice for the analysis request after getting the result i got that error. 2. i used the lab clerk, i used the admin with all priviledges. 3. i expected to see an invoice of the analysis request made so that i could print. 4. i got the erro after trying what i did in answer No 1 above over and over again.
        Hide
        xispa Jordi (Inactive) added a comment -

        Elijah Wisdom, this will be fixed in Bika Health's next release (3.1.8). The plan is to release BH318 by the end of October. Meanwhile, just replace all occurrences of

        getPreferredCurrencyAbreviattion() 
        

        (note the double "t") by

        getPreferredCurrencyAbreviation()
        

        in your_instance/bika/health/browser/analysisrequest/templates/analysisrequest_invoice.pt

        Show
        xispa Jordi (Inactive) added a comment - Elijah Wisdom , this will be fixed in Bika Health's next release (3.1.8). The plan is to release BH318 by the end of October. Meanwhile, just replace all occurrences of getPreferredCurrencyAbreviattion() (note the double "t") by getPreferredCurrencyAbreviation() in your_instance/bika/health/browser/analysisrequest/templates/analysisrequest_invoice.pt
        Show
        Espurna Pau Soliva (Inactive) added a comment - DONE: https://github.com/bikalabs/bika.health/commit/3aaec2c13796093e0404c6975f84843f993dcdd4
        Hide
        eshiet Elijah Wisdom added a comment -

        Thank you very much, i got it now.

        Show
        eshiet Elijah Wisdom added a comment - Thank you very much, i got it now.

          People

          • Assignee:
            Espurna Pau Soliva (Inactive)
            Reporter:
            eshiet Elijah Wisdom
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile