Hello:
If possible, please merge the attached patch, which include three
commits, most about translations.
5871 | 2022-07-22 | tumashu | health_disability: let name field
translatable.
5872 | 2022-07-22 | tumashu | health_dentistry: Do not translate code of
dentistry procedure
5873*| 2023-06-25 | tumashu | Let get_analytes_summary in Lab conside unit
# HG changeset patch
# User Feng Shu <[email protected]>
# Date 1658464325 -28800
# Fri Jul 22 12:32:05 2022 +0800
# Node ID 1071d48925eb05e4332d818b6b913a814c9a5494
# Parent c2f8d0cab11cafc1b10f2c43e62dfe27b7547909
health_disability: let name field translatable.
diff -r c2f8d0cab11c -r 1071d48925eb tryton/health_disability/health_disability.py
--- a/tryton/health_disability/health_disability.py Sun Jun 25 09:41:06 2023 +0800
+++ b/tryton/health_disability/health_disability.py Fri Jul 22 12:32:05 2022 +0800
@@ -68,7 +68,7 @@
'Body Function Category'
__name__ = 'gnuhealth.body_function.category'
- name = fields.Char('Name', required=True)
+ name = fields.Char('Name', required=True, translate=True)
code = fields.Char('code', required=True)
@classmethod
@@ -85,7 +85,7 @@
'Body Functions'
__name__ = 'gnuhealth.body_function'
- name = fields.Char('Function', required=True)
+ name = fields.Char('Function', required=True, translate=True)
code = fields.Char('code', required=True)
category = fields.Many2One('gnuhealth.body_function.category', 'Category')
@@ -103,7 +103,7 @@
'Body Structure Category'
__name__ = 'gnuhealth.body_structure.category'
- name = fields.Char('Name', required=True)
+ name = fields.Char('Name', required=True, translate=True)
code = fields.Char('code', required=True)
@classmethod
@@ -120,7 +120,7 @@
'Body Functions'
__name__ = 'gnuhealth.body_structure'
- name = fields.Char('Structure', required=True)
+ name = fields.Char('Structure', required=True, translate=True)
code = fields.Char('code', required=True)
category = fields.Many2One('gnuhealth.body_structure.category', 'Category')
@@ -138,7 +138,7 @@
'Activity and Participation Category'
__name__ = 'gnuhealth.activity_and_participation.category'
- name = fields.Char('Name', required=True)
+ name = fields.Char('Name', required=True, translate=True)
code = fields.Char('code', required=True)
@classmethod
@@ -155,7 +155,7 @@
'Activity limitations and participation restrictions'
__name__ = 'gnuhealth.activity_and_participation'
- name = fields.Char('A & P', required=True)
+ name = fields.Char('A & P', required=True, translate=True)
code = fields.Char('code', required=True)
category = fields.Many2One(
'gnuhealth.activity_and_participation.category', 'Category')
@@ -174,7 +174,7 @@
'Environmental Factor Category'
__name__ = 'gnuhealth.environmental_factor.category'
- name = fields.Char('Name', required=True)
+ name = fields.Char('Name', required=True, translate=True)
code = fields.Char('code', required=True)
@classmethod
@@ -191,7 +191,7 @@
'Environmental factors restrictions'
__name__ = 'gnuhealth.environmental_factor'
- name = fields.Char('Environment', required=True)
+ name = fields.Char('Environment', required=True, translate=True)
code = fields.Char('code', required=True)
category = fields.Many2One(
'gnuhealth.environmental_factor.category', 'Category')
# HG changeset patch
# User Feng Shu <[email protected]>
# Date 1658464105 -28800
# Fri Jul 22 12:28:25 2022 +0800
# Node ID bdf721cb9b1c70db71bb2adef8976e8435ea7295
# Parent 1071d48925eb05e4332d818b6b913a814c9a5494
health_dentistry: Do not translate code of dentistry procedure
diff -r 1071d48925eb -r bdf721cb9b1c tryton/health_dentistry/health_dentistry.py
--- a/tryton/health_dentistry/health_dentistry.py Fri Jul 22 12:32:05 2022 +0800
+++ b/tryton/health_dentistry/health_dentistry.py Fri Jul 22 12:28:25 2022 +0800
@@ -268,9 +268,8 @@
__name__ = 'gnuhealth.dentistry.procedure'
name = fields.Char('Procedure', required=True, translate=True)
- code = fields.Char(
- 'Code', required=True, translate=True,
- help='Please use CAPITAL LETTERS and no spaces')
+ code = fields.Char('Code', required=True,
+ help='Please use CAPITAL LETTERS and no spaces')
@classmethod
def __setup__(cls):
# HG changeset patch
# User Feng Shu <[email protected]>
# Date 1687681515 -28800
# Sun Jun 25 16:25:15 2023 +0800
# Node ID 2c236a9f3b09499500bbdca57873a943f9b9f0f2
# Parent bdf721cb9b1c70db71bb2adef8976e8435ea7295
Let get_analytes_summary in Lab conside unit
get_analytes_summary in Lab class of health_lab should add
analyte.units.name
diff -r bdf721cb9b1c -r 2c236a9f3b09 tryton/health_lab/health_lab.py
--- a/tryton/health_lab/health_lab.py Fri Jul 22 12:28:25 2022 +0800
+++ b/tryton/health_lab/health_lab.py Sun Jun 25 16:25:15 2023 +0800
@@ -125,8 +125,9 @@
if analyte.result_text:
res_text = analyte.result_text
if analyte.result:
- res = str(analyte.result) + " "
- summ = summ + analyte.rec_name + " " + \
+ res = str(analyte.result) + \
+ " (" + analyte.units.name + ") "
+ summ = summ + analyte.rec_name + " " + \
res + res_text + "\n"
return summ
--