\"feat(#6): Implementar solicitudes de laboratorio y corregir filtros\"
This commit is contained in:
parent
abe27b9195
commit
55b399f5e4
|
@ -27,7 +27,7 @@ Por lo tanto, el plan se centrará en adaptar y extender el modelo `sale.order`
|
||||||
- [x] Añadir el campo `doctor_id` cerca del campo del paciente.
|
- [x] Añadir el campo `doctor_id` cerca del campo del paciente.
|
||||||
- [x] Cambiar la etiqueta (string) del campo `partner_id` de "Cliente" a "Paciente".
|
- [x] Cambiar la etiqueta (string) del campo `partner_id` de "Cliente" a "Paciente".
|
||||||
- [x] **(Nuevo)** Aplicar un dominio al campo `partner_id` para que solo muestre contactos que sean pacientes (`is_patient = True`).
|
- [x] **(Nuevo)** Aplicar un dominio al campo `partner_id` para que solo muestre contactos que sean pacientes (`is_patient = True`).
|
||||||
- [x] **(Nuevo)** Corregir y asegurar que el dominio en el campo `product_id` de las líneas de la orden restrinja la selección únicamente a análisis clínicos (`is_analysis = True`).
|
- [x] **(Nuevo)** Corregir y asegurar que el dominio en el campo `product_template_id` de las líneas de la orden restrinja la selección únicamente a análisis clínicos (`is_analysis = True`).
|
||||||
- [x] **Heredar la vista de lista (tree/list) de `sale.order`** para:
|
- [x] **Heredar la vista de lista (tree/list) de `sale.order`** para:
|
||||||
- Añadir la columna "Médico Remitente" (`doctor_id`).
|
- Añadir la columna "Médico Remitente" (`doctor_id`).
|
||||||
|
|
||||||
|
|
14
get_view_arch.py
Normal file
14
get_view_arch.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import odoo
|
||||||
|
|
||||||
|
def get_view_arch(cr, view_id):
|
||||||
|
cr.execute("SELECT arch_db FROM ir_ui_view WHERE id = %s", (view_id,))
|
||||||
|
return cr.fetchone()[0]
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
db_name = 'lims_demo'
|
||||||
|
registry = odoo.registry(db_name)
|
||||||
|
with registry.cursor() as cr:
|
||||||
|
env = odoo.api.Environment(cr, odoo.SUPERUSER_ID, {})
|
||||||
|
view = env.ref('sale.view_order_form')
|
||||||
|
print(f"View ID: {view.id}")
|
||||||
|
print(get_view_arch(cr, view.id))
|
|
@ -13,8 +13,9 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='partner_id']" position="attributes">
|
<xpath expr="//field[@name='partner_id']" position="attributes">
|
||||||
<attribute name="string">Paciente</attribute>
|
<attribute name="string">Paciente</attribute>
|
||||||
|
<attribute name="domain">[('is_patient', '=', True)]</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='order_line']//field[@name='product_id']" position="attributes">
|
<xpath expr="//notebook/page[@name='order_lines']//field[@name='product_template_id']" position="attributes">
|
||||||
<attribute name="domain">[('is_analysis', '=', True)]</attribute>
|
<attribute name="domain">[('is_analysis', '=', True)]</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user