diff --git a/sf_machine_connect/views/WorkCenterBarcodes.xml b/sf_machine_connect/views/WorkCenterBarcodes.xml index 0a0cccd6..d44c8a82 100644 --- a/sf_machine_connect/views/WorkCenterBarcodes.xml +++ b/sf_machine_connect/views/WorkCenterBarcodes.xml @@ -10,6 +10,7 @@ + @@ -19,7 +20,11 @@ - + + + + + \ No newline at end of file diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index 94a9d646..df9ed02e 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -269,6 +269,13 @@ class ProductionLot(models.Model): rfid = fields.Char('Rfid', readonly=True) product_specification = fields.Char('规格', compute='_compute_product_specification', store=True) + def search_lot_put_rfid(self): + # 使用SQL将所有刀柄Rfid不满十位的值在前方补零 + self.env.cr.execute( + '''UPDATE stock_lot SET rfid = LPAD(rfid, 10, '0') WHERE rfid IS NOT NULL AND LENGTH(rfid) < 10''' + ) + self.env.cr.commit() + @api.depends('product_id') def _compute_product_specification(self): for stock in self: diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index 3d822104..0e1695ef 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -67,6 +67,7 @@ progress,pending_cam,pending_processing,pending_era_cam,completed,done + diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index 50566ebd..5541cbc4 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -23,6 +23,9 @@ + + + @@ -174,6 +177,8 @@ attrs="{'invisible': [('production_state','=', 'draft')], 'readonly': [('is_user_working', '=', True)]}" sum="real duration"/> + + +