feat(#44): Update product views to include sample type relationships
- Added required_sample_type_id and sample_volume_ml fields to analysis configuration page - Created list view for analysis products showing sample type relationship - Created list view for sample type products - Added is_sample_type field to product form view - Made sample_volume_ml visible only when sample type is selected 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d240ba5de1
commit
4632a95d83
|
@ -29,6 +29,8 @@
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="analysis_type"/>
|
<field name="analysis_type"/>
|
||||||
|
<field name="required_sample_type_id"/>
|
||||||
|
<field name="sample_volume_ml" invisible="not required_sample_type_id"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="technical_specifications"/>
|
<field name="technical_specifications"/>
|
||||||
|
@ -45,5 +47,43 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Vista de Lista para Productos de Análisis -->
|
||||||
|
<record id="view_product_template_analysis_list" model="ir.ui.view">
|
||||||
|
<field name="name">product.template.analysis.list</field>
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="product.product_template_tree_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='categ_id']" position="after">
|
||||||
|
<field name="is_analysis" optional="show"/>
|
||||||
|
<field name="analysis_type" optional="hide"/>
|
||||||
|
<field name="required_sample_type_id" optional="show"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Vista de Lista para Productos tipo Muestra -->
|
||||||
|
<record id="view_product_template_sample_list" model="ir.ui.view">
|
||||||
|
<field name="name">product.template.sample.list</field>
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="product.product_template_tree_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='categ_id']" position="after">
|
||||||
|
<field name="is_sample_type" optional="show"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Añadir is_sample_type al formulario de producto -->
|
||||||
|
<record id="view_product_template_form_sample_type" model="ir.ui.view">
|
||||||
|
<field name="name">product.template.form.sample.type</field>
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='is_analysis']" position="after">
|
||||||
|
<field name="is_sample_type"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user