feat(#32): Update sale.order views for generated samples - Task 4 completed
- Added 'Muestras Generadas' tab in sale.order form view - Shows generated samples with barcode, type, volume, and analyses - Added action buttons for sample workflow in the embedded list - Added indicators in sale.order list view for lab requests and samples - Successful test with ephemeral instance restart
This commit is contained in:
parent
e7074418f7
commit
f3443619ce
|
@ -18,6 +18,31 @@
|
|||
<xpath expr="//notebook/page[@name='order_lines']//field[@name='product_template_id']" position="attributes">
|
||||
<attribute name="domain">[('is_analysis', '=', True)]</attribute>
|
||||
</xpath>
|
||||
<!-- Add Generated Samples tab -->
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page string="Muestras Generadas" name="generated_samples" invisible="not is_lab_request">
|
||||
<group>
|
||||
<field name="generated_sample_ids" nolabel="1" readonly="1">
|
||||
<list string="Muestras Generadas" create="false" edit="false" delete="false">
|
||||
<field name="name" string="Código de Muestra"/>
|
||||
<field name="barcode" string="Código de Barras"/>
|
||||
<field name="sample_type_product_id" string="Tipo de Muestra"/>
|
||||
<field name="volume_ml" string="Volumen (ml)"/>
|
||||
<field name="analysis_names" string="Análisis"/>
|
||||
<field name="state" string="Estado"/>
|
||||
<button name="action_receive" string="Recibir" type="object"
|
||||
class="btn-primary" invisible="state != 'pending_collection'"/>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
<group invisible="not generated_sample_ids">
|
||||
<div class="alert alert-info" role="alert">
|
||||
<p>Las muestras han sido generadas automáticamente basándose en los análisis solicitados.
|
||||
Cada muestra agrupa los análisis que requieren el mismo tipo de contenedor.</p>
|
||||
</div>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -30,6 +55,10 @@
|
|||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="doctor_id"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='state']" position="before">
|
||||
<field name="is_lab_request" optional="show" string="Lab Request"/>
|
||||
<field name="generated_sample_ids" widget="many2many_tags" optional="hide" string="Muestras"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user