health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] installing demo database in 2.0


From: Kaushik S
Subject: Re: [Health-dev] installing demo database in 2.0
Date: Mon, 16 Sep 2013 15:20:47 +0530

Dear Luis,
             Thank you. I have followed the wiki. One suggestion is it should mention the version of proteus.  

I am using GNUHealth 2.0, proteus 2.8.0.  I run the script with default params (as mentioned in the wiki)

1. a) I get the error that  gnuhealth_medication_template does not exist.

   b) I commented the line "MedicationTemplate = Model.get('gnuhealth.medication.template')" in health_demo_server.py.
Then I get the error that - 'UserError', (u'The field "Sex" on "Party" is required.', '').

    You can find the the traceback below. 

    Traceback (most recent call last):
      File "health_demo_server.py", line 222, in <module>
        options.demo_password)
      File "health_demo_server.py", line 201, in main
        LoadBetzFamilyInfo()
      File "health_demo_server.py", line 84, in LoadBetzFamilyInfo
        party.save()
      File "/home/gnuhealth/.local/lib/python2.7/site-packages/proteus/__init__.py", line 662, in save
        self.__id, = self._proxy.create([values], context)
      File "/home/gnuhealth/.local/lib/python2.7/site-packages/proteus/config.py", line 144, in __call__
        result = rpc.result(meth(*args, **kwargs))
      File "/home/gnuhealth/gnuhealth/tryton/server/trytond-2.8.1/trytond/modules/health/health.py", line 795, in create                                                                  
        return super(PartyPatient, cls).create(vlist)                                                                                                                                     
      File "/home/gnuhealth/gnuhealth/tryton/server/trytond-2.8.1/trytond/modules/party/party.py", line 162, in create                                                                    
        return super(Party, cls).create(vlist)                                                                                                                                            
      File "/home/gnuhealth/gnuhealth/tryton/server/trytond-2.8.1/trytond/model/modelsql.py", line 376, in create                                                                         
        cls._validate(records)                                                                                                                                                            
      File "/home/gnuhealth/gnuhealth/tryton/server/trytond-2.8.1/trytond/model/modelstorage.py", line 1016, in _validate                                                                 
        field_name)
      File "/home/gnuhealth/gnuhealth/tryton/server/trytond-2.8.1/trytond/model/modelstorage.py", line 1000, in required_test
        error_args=cls._get_error_args(field_name))
      File "/home/gnuhealth/gnuhealth/tryton/server/trytond-2.8.1/trytond/error.py", line 70, in raise_user_error
        raise UserError(error)
    trytond.exceptions.UserError: ('UserError', (u'The field "Sex" on "Party" is required.', ''))


2. In fact, using proteus I am simply unable to save a row to the party_party table .

from proteus import config, Model, Wizard
config = config.set_trytond("mydb", password="mypasswd")

Party = Model.get('party.party')
party = Party()
party.name = 'ABCDEFG'
#party.is_institution = True
party.save()

I get the Error - ('UserError', (u'The field "Account Payable" on "Party" is required.', '')) . But I verified I can save to my hello_world table. 

Perhaps something has changed. If the proteus verion is 2.8, perhaps it is something incorrect in my setup.  If I find out I will let you know. 
Best
Kaushik





On Mon, Sep 16, 2013 at 9:10 AM, Luis Falcon <address@hidden> wrote:
Dear Kaushik

On 13/09/13 04:42, Kaushik wrote:
> Hi,
>        I am running the health_demo_server.py script. But it doesn't add
> the AnaBetx family to my database.
You probably looked at this doc already. Let me know if you can running
following the steps on here.

http://en.wikibooks.org/wiki/GNU_Health/The_Demo_database

All the best
>
> I run it as follows :
>
> health_demo_server.py -d "mydatabase" -p "mypasswd"
>
>  Am I right in running it like that? I am using proteus 2.8.  If I am
> missing anything please let me know.
> Kaushik
>
>
>
>


--
GNU Health : The Free Health and Hospital Information System
http://health.gnu.org
@gnuhealth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]