mirror of
https://github.com/Kalenis/kalenislims.git
synced 2023-12-14 07:13:04 +01:00
lims: Planification: show percentage of completion in wizard to search fractions
This commit is contained in:
parent
de7e0743ad
commit
0f255509cf
|
@ -14415,6 +14415,11 @@ msgctxt ""
|
|||
msgid "Technician substitute"
|
||||
msgstr "Técnico sustituto"
|
||||
|
||||
msgctxt ""
|
||||
"field:lims.planification.search_fractions.detail,completion_percentage:"
|
||||
msgid "Complete"
|
||||
msgstr "Completo"
|
||||
|
||||
msgctxt "field:lims.planification.search_fractions.detail,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Fecha creación"
|
||||
|
@ -16190,6 +16195,10 @@ msgctxt "view:lims.planification.replace_technician.start:"
|
|||
msgid "Replace Technician"
|
||||
msgstr "Reemplazar técnico"
|
||||
|
||||
msgctxt "view:lims.planification.search_fractions.detail:"
|
||||
msgid "%"
|
||||
msgstr "%"
|
||||
|
||||
msgctxt "view:lims.planification.search_fractions.detail:"
|
||||
msgid "Fraction to Plan"
|
||||
msgstr "Fracción a planificar"
|
||||
|
|
|
@ -3646,6 +3646,8 @@ class SearchFractionsDetail(ModelSQL, ModelView):
|
|||
repetition = fields.Boolean('Repetition', readonly=True)
|
||||
report_date = fields.Function(fields.Date('Date agreed for result'),
|
||||
'get_service_field')
|
||||
completion_percentage = fields.Function(fields.Float('Complete',
|
||||
digits=(1, 4)), 'get_completion_percentage')
|
||||
session_id = fields.Integer('Session ID')
|
||||
|
||||
@classmethod
|
||||
|
@ -3705,6 +3707,13 @@ class SearchFractionsDetail(ModelSQL, ModelView):
|
|||
result[name][d.id] = getattr(service, name)
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def get_completion_percentage(cls, details, name):
|
||||
result = {}
|
||||
for d in details:
|
||||
result[d.id] = getattr(d.fraction.sample, name, None)
|
||||
return result
|
||||
|
||||
|
||||
class SearchFractions(Wizard):
|
||||
'Search Fractions'
|
||||
|
|
|
@ -10,4 +10,7 @@
|
|||
<field name="priority"/>
|
||||
<field name="repetition"/>
|
||||
<field name="report_date"/>
|
||||
<field name="completion_percentage" factor="100">
|
||||
<suffix name="completion_percentage" string="%"/>
|
||||
</field>
|
||||
</tree>
|
||||
|
|
Loading…
Reference in a new issue