Mercurial > hgweb > health
changeset 4873:e4964527e597
task #16043: Migration to GNU Health 4.0: Migrate and cleanup health_inpatient_calendar
| author | Luis Falcon <falcon@gnuhealth.org> |
|---|---|
| date | Sat, 15 Jan 2022 09:04:57 +0000 |
| parents | 177edc9e696c |
| children | df3ca2fbe9af |
| files | tryton/health_inpatient_calendar/__init__.py tryton/health_inpatient_calendar/health_inpatient_calendar.py tryton/health_inpatient_calendar/tryton.cfg |
| diffstat | 3 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/tryton/health_inpatient_calendar/__init__.py +++ b/tryton/health_inpatient_calendar/__init__.py @@ -1,7 +1,8 @@ -# -*- coding: utf-8 -*- ############################################################################## # # GNU Health: The Free Health and Hospital Information System +# Copyright (C) 2008-2022 Luis Falcon <lfalcon@gnusolidario.org> +# Copyright (C) 2011-2022 GNU Solidario <health@gnusolidario.org> # Copyright (C) 2011-2012 Sebastián Marró <smarro@thymbra.com> # # This program is free software: you can redistribute it and/or modify @@ -20,11 +21,11 @@ ############################################################################## from trytond.pool import Pool -from .health_inpatient_calendar import * +from . import health_inpatient_calendar def register(): Pool.register( - HospitalBed, - InpatientRegistration, + health_inpatient_calendar.HospitalBed, + health_inpatient_calendar.InpatientRegistration, module='health_inpatient_calendar', type_='model')
--- a/tryton/health_inpatient_calendar/health_inpatient_calendar.py +++ b/tryton/health_inpatient_calendar/health_inpatient_calendar.py @@ -3,9 +3,9 @@ # # GNU Health: The Free Health and Hospital Information System # # Package : Health Inpatient Calendar -# Copyright (C) 2008-2018 Luis Falcon <falcon@gnuhealth.org> +# Copyright (C) 2008-2022 Luis Falcon <falcon@gnuhealth.org> # Copyright (C) 2011-2012 Sebastián Marró <smarro@thymbra.com> -# Copyright (C) 2008-2018 GNU Solidario <health@gnusolidario.org> +# Copyright (C) 2008-2022 GNU Solidario <health@gnusolidario.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -39,7 +39,8 @@ 'Add Calendar to the Inpatient Registration' __name__ = 'gnuhealth.inpatient.registration' - event = fields.Many2One('calendar.event', 'Calendar Event', readonly=True, + event = fields.Many2One( + 'calendar.event', 'Calendar Event', readonly=True, help="Calendar Event") @classmethod @@ -56,9 +57,11 @@ 'dtstart': inpatient_registration.hospitalization_date, 'dtend': inpatient_registration.discharge_date, 'calendar': inpatient_registration.bed.calendar.id, - 'summary': bed + inpatient_registration.patient.name.rec_name + 'summary': + bed + inpatient_registration.patient.name.rec_name }]) - cls.write([inpatient_registration], + cls.write( + [inpatient_registration], {'event': events[0].id}) @classmethod
