mirror of
https://github.com/Kalenis/kalenislims.git
synced 2023-12-14 07:13:04 +01:00
lims: entry: pre-assign sample numbers (2)
This commit is contained in:
parent
a7f0a22ed3
commit
c5193dff6b
|
@ -134,6 +134,8 @@ class Entry(Workflow, ModelSQL, ModelView):
|
|||
block_entry_confirmation = fields.Function(fields.Boolean(
|
||||
'Block Entry Confirmation'), 'get_block_entry_confirmation')
|
||||
multi_party = fields.Boolean('Multi Party', readonly=True, select=True)
|
||||
pre_assigned_samples = fields.Function(fields.Integer(
|
||||
'Pre-Assigned Samples'), 'get_pre_assigned_samples')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
|
@ -768,6 +770,11 @@ class Entry(Workflow, ModelSQL, ModelView):
|
|||
return (self.invoice_party and
|
||||
self.invoice_party.block_entry_confirmation or False)
|
||||
|
||||
def get_pre_assigned_samples(self, name=None):
|
||||
pool = Pool()
|
||||
EntryPreAssignedSample = pool.get('lims.entry.pre_assigned_sample')
|
||||
return EntryPreAssignedSample.search_count([('entry', '=', self.id)])
|
||||
|
||||
|
||||
class EntryInvoiceContact(ModelSQL, ModelView):
|
||||
'Entry Invoice Contact'
|
||||
|
|
|
@ -1379,6 +1379,10 @@ msgctxt "field:lims.entry,pending_reason:"
|
|||
msgid "Pending reason"
|
||||
msgstr "Razón de la espera"
|
||||
|
||||
msgctxt "field:lims.entry,pre_assigned_samples:"
|
||||
msgid "Pre-Assigned Samples"
|
||||
msgstr "Muestras preasignadas"
|
||||
|
||||
msgctxt "field:lims.entry,report_comments:"
|
||||
msgid "Report comments"
|
||||
msgstr "Observaciones informe"
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
<field name="package_state"/>
|
||||
<label name="packages_quantity"/>
|
||||
<field name="packages_quantity"/>
|
||||
<label name="pre_assigned_samples"/>
|
||||
<field name="pre_assigned_samples"/>
|
||||
</page>
|
||||
<page string="Contacts" id="contacts">
|
||||
<field name="invoice_contacts" colspan="4"/>
|
||||
|
|
Loading…
Reference in a new issue