1、完成 采购/采购总监岗位权限增加 需求;2、完成 刀具出入库列表缺少单据跳转 需求;3、完成 设备详情的机内装刀时间比当前时间还晚 bug;
This commit is contained in:
@@ -944,13 +944,11 @@ class FunctionalToolDismantle(models.Model):
|
||||
functional_tool_assembly = self.functional_tool_id.functional_tool_name_id
|
||||
if self.scrap_boolean:
|
||||
# 刀柄报废 入库到Scrap
|
||||
lot.create_stock_quant(location, location_dest_scrap_ids[-1], functional_tool_assembly.id, code,
|
||||
functional_tool_assembly, functional_tool_assembly.tool_groups_id)
|
||||
lot.create_stock_quant(location, location_dest_scrap_ids[-1], False, code, False, False)
|
||||
lot.tool_material_status = '报废'
|
||||
else:
|
||||
# 刀柄不报废 入库到刀具房
|
||||
lot.create_stock_quant(location, location_dest, functional_tool_assembly.id, code,
|
||||
functional_tool_assembly, functional_tool_assembly.tool_groups_id)
|
||||
lot.create_stock_quant(location, location_dest, False, code, False, False)
|
||||
lot.tool_material_status = '可用'
|
||||
|
||||
# ==============功能刀具[报废]拆解================
|
||||
|
||||
@@ -3,6 +3,7 @@ import requests
|
||||
import logging
|
||||
from odoo import models, api, fields
|
||||
from odoo.exceptions import ValidationError
|
||||
from datetime import datetime, timedelta
|
||||
from odoo.addons.sf_base.commons.common import Common
|
||||
|
||||
|
||||
@@ -101,7 +102,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
tool_install_time = {'Nomal': '正常', 'Warning': '报警'}
|
||||
equipment_tool_id.write({
|
||||
'functional_tool_name_id': functional_tool_id.id,
|
||||
'tool_install_time': time
|
||||
'tool_install_time': time - timedelta(hours=8)
|
||||
})
|
||||
if functional_tool_id.current_location != '机内刀库':
|
||||
# 对功能刀具进行移动到生产线
|
||||
|
||||
@@ -25,7 +25,8 @@ class ToolMaterial(models.Model):
|
||||
have_been_used_num = fields.Integer('在用数量', compute='_compute_number', store=True)
|
||||
scrap_num = fields.Integer('报废数量', compute='_compute_number', store=True)
|
||||
|
||||
barcode_ids = fields.One2many('stock.lot', 'tool_material_search_id', string='序列号', readonly=True)
|
||||
barcode_ids = fields.One2many('stock.lot', 'tool_material_search_id', string='序列号', readonly=True,
|
||||
domain=[('tool_material_status', '!=', '未入库')])
|
||||
|
||||
@api.depends('product_id.stock_quant_ids.quantity')
|
||||
def _compute_number(self):
|
||||
@@ -46,8 +47,6 @@ class ToolMaterial(models.Model):
|
||||
record.scrap_num = scrap_num
|
||||
record.number = usable_num + have_been_used_num + scrap_num
|
||||
|
||||
|
||||
|
||||
@api.model
|
||||
def _read_group_cutting_tool_material_id(self, categories, domain, order):
|
||||
cutting_tool_material_id = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
||||
|
||||
Reference in New Issue
Block a user