Merge branch 'release/release_2.8' into feature/验证合并的逻辑

This commit is contained in:
胡尧
2025-01-17 16:12:27 +08:00
5 changed files with 36 additions and 8 deletions

View File

@@ -350,7 +350,7 @@ class MrpProduction(models.Model):
if any((wo.test_results == '返工' and wo.state == 'done' and
(production.programming_state in ['已编程'] or wo.individuation_page_PTD is True))
or (wo.is_rework is True and wo.state == 'done' and production.programming_state in ['编程中', '已编程'])
for wo in production.workorder_ids):
for wo in production.workorder_ids) or production.is_rework is True:
production.state = 'rework'
if any(wo.test_results == '报废' and wo.state == 'done' for wo in production.workorder_ids):
production.state = 'scrap'

View File

@@ -126,9 +126,9 @@
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
<field name="arch" type="xml">
<xpath expr="//sheet" position="inside">
<xpath expr="//form" position="inside">
<!-- 其他可见字段 -->
<field name="_barcode_scanned" widget="barcode_handler" invisible="1"/>
<field name="_barcode_scanned" widget="barcode_handler"/>
</xpath>
<!-- <xpath expr="//form" position="inside"> -->
<!-- <script src="sf_manufacturing/static/src/js/customRFID.js"/> -->
@@ -312,6 +312,7 @@
<xpath expr="//page[1]" position="before">
<page string="工件装夹" attrs='{"invisible": [("routing_type","!=","装夹预调")]}'>
<group>
<!-- <field name="_barcode_scanned" widget="barcode_handler"/> -->
<group string="托盘">
<field name="tray_serial_number" readonly="1" string="序列号"/>
</group>