质检单数量约束

This commit is contained in:
胡尧
2025-05-08 20:32:59 +08:00
parent 7575424760
commit aea158de41
2 changed files with 32 additions and 2 deletions

View File

@@ -96,6 +96,7 @@
</xpath>
<xpath expr="//field[@name='qty_line']" position="attributes">
<attribute name="readonly">0</attribute>
<attribute name="on_change">1</attribute>
</xpath>
<xpath expr="//label[@for='qty_to_test']" position="attributes">
<attribute name="attrs">{'invisible': ['|', '&amp;', ('move_line_id', '=', False), ('workorder_id', '=', False), '|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}</attribute>
@@ -105,13 +106,14 @@
</xpath>
<xpath expr="//field[@name='qty_to_test']" position="attributes">
<attribute name="readonly">0</attribute>
<attribute name="on_change">1</attribute>
</xpath>
<xpath expr="//div[@class='o_row'][.//field[@name='qty_tested']]" position="after">
<label for="qty_test_failed"
attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}"/>
<div class="o_row"
attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}">
<field name="qty_test_failed" attrs="{'readonly': [('quality_state', '!=', 'none')]}"/>
<field name="qty_test_failed" attrs="{'readonly': [('quality_state', '!=', 'none')], 'on_chnage': 1}"/>
<field name="uom_id"/>
</div>
</xpath>