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