Amidu
I wanted a boolean field to be added. Based on the article
Sebastian provided.
1) I put in a new folder e.g health_example
2) I put in the following files __init__.py, __tryton__.py,
health_example.py and health_example_view.xml in the folder
3) I used health_lifestyle module as reference to put in the
required information for these files.
4) i ran an update in tryton. This made the module appear in
Modules section.
5) Installed it using tryton client and it showed up in the
module. Extending the class as mentioned below will be a cleaner
approach. As different institutions will have plenty of
separate data requirements.
Thanks
Paras
On Sat, Dec 1, 2012 at 5:37 PM, Amidu
Sila
<address@hidden>
wrote:
Please, can you hsare
with us waht you have done?
Thank you in advance
Amidu
On 12/1/12 10:45 AM, Paras Jasani wrote:
Thanks Sebastian, article was
good, i was able to put in a new module with a
couple of parameters.
On Thu, Nov 29, 2012 at
8:54 PM, Sebastián Marró
<address@hidden>
wrote:
Hi Paras
When you develop on GNU Health/Tryton,
you don't have to modify the database
manually, you have to declare the new fields
on the model (python file), and also on the
views (xml file).
Take a look at this example on how to
create a new module [1]
For more information on the Tryton API,
go to [2]
If you want to add fields on the patient
it's better to create a new module and inherit
the PatientData class instead of modifying the
health.py file on the health directory. In
that way when you upgrade GNU Health to a new
version, you don't lose your changes.
Regards
[2]
http://doc.tryton.org/2.4/trytond/doc/index.html
2012/11/29 Paras
Jasani
<address@hidden>
Hi
I would like to add a boolean
column in gnu_patient. Which file do
i need to modify so that column
appears in Field section of GNU
Health ? I have added the column in
database but it doesn't show up when
i see the model details of
gnu_patient.
Thanks
Paras
--
Sebastián
Marró
thymbr@
Converging
Ideas for Emerging Realities
www.thymbra.com
--
![](jpgj5wkYl8Wuh.jpg)