Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/新增工件装夹预调工单任务
This commit is contained in:
@@ -79,9 +79,9 @@ td.o_required_modifier {
|
||||
}
|
||||
|
||||
.oe_kanban_card.kanban_color_1 {
|
||||
background-color: #27FEA9 !important;
|
||||
background-color: #fff !important;
|
||||
opacity: 0.7;
|
||||
color: #fff;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.oe_kanban_card.kanban_color_3 {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<xpath expr="//form//notebook//page[1]" position="after">
|
||||
<!-- <xpath expr="//page[@name='other']" position="before">-->
|
||||
<!-- <notebook> -->
|
||||
<page string="机床监控">
|
||||
<page string="机床运行状态" attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
|
||||
<group string='状态监控'>
|
||||
<group>
|
||||
<field name="timestamp"/>
|
||||
@@ -143,7 +143,7 @@
|
||||
<!-- </div> -->
|
||||
<!-- </group> -->
|
||||
</page>
|
||||
<page string="机床配置">
|
||||
<page string="机床运行数据" attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
|
||||
<!-- <group string="机床配置">--> -->
|
||||
<group string="ftp相关">
|
||||
<group>
|
||||
|
||||
@@ -17,12 +17,30 @@ class SfMaintenanceEquipmentCategory(models.Model):
|
||||
equipment_type_code = fields.Char('简写')
|
||||
|
||||
|
||||
class SfMaintenanceEquipmentAGVLog(models.Model):
|
||||
_name = 'maintenance.equipment.agv.log'
|
||||
_description = 'AGV运行日志'
|
||||
|
||||
run_type = fields.Char('任务类型')
|
||||
run_code = fields.Char('任务指令代码')
|
||||
run_first = fields.Char('任务起点')
|
||||
production_line = fields.Char('目的生产线')
|
||||
run_last = fields.Char('任务终点')
|
||||
workorder = fields.Char('工件编码/任务单号')
|
||||
time = fields.Datetime('日期/事件')
|
||||
state = fields.Char('事件/状体')
|
||||
equipment_id = fields.Many2one('maintenance.equipment', '设备')
|
||||
|
||||
|
||||
class SfMaintenanceEquipment(models.Model):
|
||||
_inherit = 'maintenance.equipment'
|
||||
_description = '设备'
|
||||
|
||||
crea_url = "/api/machine_tool/create"
|
||||
|
||||
|
||||
#AGV运行日志
|
||||
agv_logs = fields.One2many('maintenance.equipment.agv.log', 'equipment_id', string='AGV运行日志')
|
||||
# 1212修改后的字段
|
||||
number_of_axles = fields.Selection(
|
||||
[("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴"), ("六轴", "六轴")],
|
||||
@@ -194,6 +212,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
# 多个型号对应一个机床
|
||||
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
||||
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs', 'maintenance_equipment_id', '设备故障日志')
|
||||
equipment_oee_ids = fields.One2many('maintenance.equipment.oee', 'equipment_id', '设备OEE')
|
||||
|
||||
# def name_get(self):
|
||||
# result = []
|
||||
|
||||
@@ -23,6 +23,7 @@ class SfMaintenanceEquipmentOEE(models.Model):
|
||||
fault_nums = fields.Integer('故障次数')
|
||||
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs', 'maintenance_equipment_oee_id', '设备故障日志',
|
||||
related='equipment_id.sf_maintenance_logs_ids')
|
||||
oee_logs = fields.One2many('maintenance.equipment.oee.logs', 'equipment_oee_id', string='运行日志')
|
||||
|
||||
def name_get(self):
|
||||
result = []
|
||||
@@ -31,3 +32,18 @@ class SfMaintenanceEquipmentOEE(models.Model):
|
||||
name = parameter.equipment_id.name
|
||||
result.append((parameter.id, name))
|
||||
return result
|
||||
|
||||
|
||||
class SfMaintenanceEquipmentOEELog(models.Model):
|
||||
_name = 'maintenance.equipment.oee.logs'
|
||||
_description = '设备运行日志'
|
||||
|
||||
name = fields.Char('运行日志')
|
||||
run_time = fields.Datetime('时间')
|
||||
state = fields.Selection([("开机", "开机"), ("关机", "关机"), ("等待", "等待"), ("开始加工", "开始加工"),
|
||||
("结束加工", "结束加工"), ("故障", "故障"),
|
||||
("检修", "检修"), ("保养", "保养")], default="", string="事件/状态")
|
||||
workorder_id = fields.Char('加工订单')
|
||||
time = fields.Char('持续时长')
|
||||
color = fields.Char('颜色', default=1)
|
||||
equipment_oee_id = fields.Many2one('maintenance.equipment.oee', '设备OEE')
|
||||
|
||||
@@ -7,12 +7,18 @@ access_maintenance_equipment,maintenance_equipment,model_maintenance_equipment,s
|
||||
access_maintenance_equipment_oee,maintenance_equipment_oee,model_maintenance_equipment_oee,sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_equipment_oee,maintenance_equipment_oee,model_maintenance_equipment_oee,sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_equipment_oee,maintenance_equipment_oee,model_maintenance_equipment_oee,base.group_user,1,1,1,1
|
||||
access_maintenance_equipment_oee_logs,maintenance_equipment_oee_logs,model_maintenance_equipment_oee_logs,sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_equipment_oee_logs,maintenance_equipment_oee_logs,model_maintenance_equipment_oee_logs,sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_equipment_oee_logs,maintenance_equipment_oee_logs,model_maintenance_equipment_oee_logs,base.group_user,1,1,1,1
|
||||
access_maintenance_standards,maintenance_standards,model_maintenance_standards,sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_standards,maintenance_standards,model_maintenance_standards,sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_standard_image,maintenance_standard_image,model_maintenance_standard_image,sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_standard_image,maintenance_standard_image,model_maintenance_standard_image,sf_group_equipment_manager,1,1,1,0
|
||||
access_sf_robot_axis_num,sf_robot_axis_num,model_sf_robot_axis_num,sf_group_equipment_user,1,0,0,0
|
||||
access_sf_robot_axis_num,sf_robot_axis_num,model_sf_robot_axis_num,sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_equipment_agv_log,maintenance_equipment_agv_log,model_maintenance_equipment_agv_log,sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_equipment_agv_log,maintenance_equipment_agv_log,model_maintenance_equipment_agv_log,sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_equipment_agv_log,maintenance_equipment_agv_log,model_maintenance_equipment_agv_log,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
access_maintenance_system_user,equipment.request system user,maintenance.model_maintenance_request,base.group_user,1,0,0,0
|
||||
|
||||
|
@@ -49,6 +49,19 @@
|
||||
</group>
|
||||
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="运行日志">
|
||||
<field name="oee_logs">
|
||||
<tree create="1" edit="1" delete="1" editable="bottom">
|
||||
<field name = 'run_time'/>
|
||||
<field name = 'state'/>
|
||||
<field name = 'workorder_id'/>
|
||||
<field name = 'time'/>
|
||||
<field name = 'color' widget="color"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
@@ -63,6 +76,7 @@
|
||||
<searchpanel>
|
||||
<field name="equipment_id" icon="fa-building" enable_counters="1"/>
|
||||
</searchpanel>
|
||||
<field name="equipment_id"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -32,6 +32,14 @@
|
||||
<field string="设备故障日志" name="sf_maintenance_logs_ids" widget="statinfo"/>
|
||||
</button>
|
||||
|
||||
<button name="%(action_maintenance_oee)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
context="{'search_default_equipment_id': [active_id]}"
|
||||
icon="fa-exchange"
|
||||
attrs="{'invisible': [('state_zc', '!=', '已注册')]}">
|
||||
<field string="设备oee" name="equipment_oee_ids" widget="statinfo"/>
|
||||
</button>
|
||||
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='maintenance_team_id']" position="before">
|
||||
@@ -63,15 +71,18 @@
|
||||
attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
|
||||
<group>
|
||||
<group string="基础参数">
|
||||
<field name="control_system_id" attrs="{'required': [('equipment_type', '=', '机床')]}" options="{'no_create': True}"/>
|
||||
<field name="control_system_id" attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'no_create': True}"/>
|
||||
<label for="workbench_L" string="工作台尺寸(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="workbench_L" string="长"/>
|
||||
<field name="workbench_L" class="o_address_zip" attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
<field name="workbench_L" class="o_address_zip"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="workbench_W" string="宽"/>
|
||||
<field name="workbench_W" class="o_address_zip" attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
<field name="workbench_W" class="o_address_zip"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="workpiece_load"/>
|
||||
@@ -115,22 +126,26 @@
|
||||
|
||||
<!-- <field name="lead_screw" required="1"/>-->
|
||||
<!-- <field name="guide_rail" required="1"/>-->
|
||||
<field name="number_of_axles" attrs="{'required': [('equipment_type', '=', '机床')]}" widget="radio"
|
||||
<field name="number_of_axles" attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
widget="radio"
|
||||
options="{'horizontal': true}"/>
|
||||
<label for="x_axis" string="加工行程(mm)"
|
||||
attrs="{'invisible': [('number_of_axles', '=', False)]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('number_of_axles', '=', False)]}">
|
||||
<label for="x_axis" string="x"/>
|
||||
<field name="x_axis" class="o_address_zip" attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
<field name="x_axis" class="o_address_zip"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="y_axis" string="y"/>
|
||||
<field name="y_axis" class="o_address_zip" attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
<field name="y_axis" class="o_address_zip"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="z_axis" string="z"/>
|
||||
<field name="z_axis" class="o_address_zip" attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
<field name="z_axis" class="o_address_zip"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="a_axis" string="a"
|
||||
@@ -177,58 +192,74 @@
|
||||
|
||||
<!-- <field name="distance" required="1"/>-->
|
||||
</group>
|
||||
<group string="刀具">
|
||||
<!-- <field name="knife_type" required="1"/>-->
|
||||
<field name="number_of_knife_library" attrs="{'required': [('equipment_type', '=', '机床')]}" options="{'format': false}"/>
|
||||
<!-- <field name="tool_speed" required="1"/>-->
|
||||
<field name="tool_full_diameter_max"/>
|
||||
<field name="tool_perimeter_diameter_max"/>
|
||||
<field name="tool_long_max"/>
|
||||
<!-- <label for="tool_diameter_min" string="刀具刀径(mm)"/>-->
|
||||
<!-- <div class="test_model">-->
|
||||
<!-- <label for="tool_diameter_min" string="最小(min)"/>-->
|
||||
<!-- <field name="tool_diameter_min" class="o_address_zip" required="1"-->
|
||||
<!-- options="{'format': false}"/>-->
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<!-- <label for="tool_diameter_max" string="最大(max)"/>-->
|
||||
<!-- <field name="tool_diameter_max" class="o_address_zip" required="1"-->
|
||||
<!-- options="{'format': false}"/>-->
|
||||
<!-- </div>-->
|
||||
<field name="tool_quality_max"/>
|
||||
<field name="T_tool_time"/>
|
||||
<field name="C_tool_time"/>
|
||||
</group>
|
||||
|
||||
<group string="进给参数">
|
||||
<field name="X_axis_rapid_traverse_speed"/>
|
||||
<field name="Y_axis_rapid_traverse_speed"/>
|
||||
<field name="Z_axis_rapid_traverse_speed"/>
|
||||
<field name="a_axis_rapid_traverse_speed"/>
|
||||
<field name="b_axis_rapid_traverse_speed"/>
|
||||
<field name="c_axis_rapid_traverse_speed"/>
|
||||
<field name="straight_cutting_feed_rate"/>
|
||||
<field name="rotary_cutting_feed_rate"/>
|
||||
</group>
|
||||
<group string="精度参数">
|
||||
<field name="X_precision"/>
|
||||
<field name="X_precision_repeat"/>
|
||||
<field name="Y_precision"/>
|
||||
<field name="Y_precision_repeat"/>
|
||||
<field name="Z_precision"/>
|
||||
<field name="Z_precision_repeat"/>
|
||||
<field name="a_precision"/>
|
||||
<field name="a_precision_repeat"/>
|
||||
<field name="b_precision"/>
|
||||
<field name="b_precision_repeat"/>
|
||||
<field name="c_precision"/>
|
||||
<field name="c_precision_repeat"/>
|
||||
</group>
|
||||
|
||||
<group string="刀具">
|
||||
<!-- <field name="knife_type" required="1"/>-->
|
||||
<field name="number_of_knife_library"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
<!-- <field name="tool_speed" required="1"/>-->
|
||||
<field name="tool_full_diameter_max"/>
|
||||
<field name="tool_perimeter_diameter_max"/>
|
||||
<field name="tool_long_max"/>
|
||||
<!-- <label for="tool_diameter_min" string="刀具刀径(mm)"/>-->
|
||||
<!-- <div class="test_model">-->
|
||||
<!-- <label for="tool_diameter_min" string="最小(min)"/>-->
|
||||
<!-- <field name="tool_diameter_min" class="o_address_zip" required="1"-->
|
||||
<!-- options="{'format': false}"/>-->
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<!-- <label for="tool_diameter_max" string="最大(max)"/>-->
|
||||
<!-- <field name="tool_diameter_max" class="o_address_zip" required="1"-->
|
||||
<!-- options="{'format': false}"/>-->
|
||||
<!-- </div>-->
|
||||
<field name="tool_quality_max"/>
|
||||
<field name="T_tool_time"/>
|
||||
<field name="C_tool_time"/>
|
||||
</group>
|
||||
|
||||
<group string="进给参数">
|
||||
<field name="X_axis_rapid_traverse_speed"/>
|
||||
<field name="Y_axis_rapid_traverse_speed"/>
|
||||
<field name="Z_axis_rapid_traverse_speed"/>
|
||||
<field name="a_axis_rapid_traverse_speed"/>
|
||||
<field name="b_axis_rapid_traverse_speed"/>
|
||||
<field name="c_axis_rapid_traverse_speed"/>
|
||||
<field name="straight_cutting_feed_rate"/>
|
||||
<field name="rotary_cutting_feed_rate"/>
|
||||
</group>
|
||||
<group string="精度参数">
|
||||
<field name="X_precision"/>
|
||||
<field name="X_precision_repeat"/>
|
||||
<field name="Y_precision"/>
|
||||
<field name="Y_precision_repeat"/>
|
||||
<field name="Z_precision"/>
|
||||
<field name="Z_precision_repeat"/>
|
||||
<field name="a_precision"/>
|
||||
<field name="a_precision_repeat"/>
|
||||
<field name="b_precision"/>
|
||||
<field name="b_precision_repeat"/>
|
||||
<field name="c_precision"/>
|
||||
<field name="c_precision_repeat"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
|
||||
|
||||
</page>
|
||||
<page string="AGV运行日志" name="sf_equipment"
|
||||
attrs="{'invisible': [('equipment_type', '!=', 'AGV小车')]}">
|
||||
<field name="agv_logs">
|
||||
<tree create="1" edit="1" delete="1" editable="bottom">
|
||||
<field name = 'run_type'/>
|
||||
<field name = 'run_code'/>
|
||||
<field name = 'run_first'/>
|
||||
<field name = 'run_last'/>
|
||||
<field name = 'production_line'/>
|
||||
<field name = 'workorder'/>
|
||||
<field name = 'time'/>
|
||||
<field name = 'state'/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
<page string="设备参数" name="sf_equipment"
|
||||
attrs="{'invisible': [('equipment_type', '!=', 'AGV小车')]}">
|
||||
@@ -913,28 +944,30 @@
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//notebook" position="before">
|
||||
<group string="加工能力" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" class="processingMethod">
|
||||
<group string="加工能力" attrs="{'invisible': [('equipment_type', '!=', '机床')]}"
|
||||
class="processingMethod">
|
||||
<div>
|
||||
<field name='image_id' widget="custom_many2many_checkboxes" string="">
|
||||
<field name='image_id' widget="custom_many2many_checkboxes" string="">
|
||||
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="image" widget="image"
|
||||
options="{'size': [100, 100], 'click enlarge': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="image" widget="image"
|
||||
options="{'size': [100, 100], 'click enlarge': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</div>
|
||||
</group>
|
||||
<group string="冷却方式" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" class="processingMethod">
|
||||
<group string="冷却方式" attrs="{'invisible': [('equipment_type', '!=', '机床')]}"
|
||||
class="processingMethod">
|
||||
<div>
|
||||
<field name='image_lq_id' widget="custom_many2many_checkboxes" string="">
|
||||
<field name='image_lq_id' widget="custom_many2many_checkboxes" string="">
|
||||
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="image" widget="image"
|
||||
options="{'size': [100, 100], 'click enlarge': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="image" widget="image"
|
||||
options="{'size': [100, 100], 'click enlarge': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</div>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
@@ -314,12 +314,12 @@ class sfProductionProcess(models.Model):
|
||||
brand = self.env['sf.production.process'].search(
|
||||
[("code", '=', item['code'])])
|
||||
if brand:
|
||||
brand.name = item['name'],
|
||||
brand.name = item['name']
|
||||
brand.category_id = self.env['sf.production.process.category'].search(
|
||||
[("code", '=', item['category_code'])]).id,
|
||||
brand.code = item['code'],
|
||||
brand.remark = item['remark'],
|
||||
brand.active = item['active'],
|
||||
[("code", '=', item['category_code'])]).id
|
||||
brand.code = item['code']
|
||||
brand.remark = item['remark']
|
||||
brand.active = item['active']
|
||||
brand.remark = item['remark']
|
||||
production_process = self.search([("code", '=', item['code'])])
|
||||
category = self.env['sf.production.process.category'].search(
|
||||
|
||||
@@ -15,6 +15,7 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组', related='functional_tool_name_id.tool_groups_id')
|
||||
code = fields.Char('编码', related='functional_tool_name_id.code')
|
||||
rfid = fields.Char('rfid', readonly=True)
|
||||
name = fields.Char(related='functional_tool_name_id.name')
|
||||
functional_tool_name_id = fields.Many2one('sf.functional.tool.assembly', string='功能刀具名称', readonly=True)
|
||||
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号', readonly=True)
|
||||
@@ -211,6 +212,7 @@ class FunctionalToolWarning(models.Model):
|
||||
_description = '功能刀具预警'
|
||||
|
||||
code = fields.Char('编码', related='functional_tool_name_id.code')
|
||||
rfid = fields.Char('rfid', related='functional_tool_name_id.rfid')
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组', related='functional_tool_name_id.tool_groups_id')
|
||||
name = fields.Char('名称', invisible=True, readonly=True, related='functional_tool_name_id.name')
|
||||
# 机床信息
|
||||
@@ -281,6 +283,7 @@ class StockMoveLine(models.Model):
|
||||
knife_tip_r_angle = fields.Float(string='刀尖R角(mm)', related='functional_tool_name_id.knife_tip_r_angle')
|
||||
install_tool_time = fields.Datetime("刀具组装时间", related='functional_tool_name_id.tool_loading_time')
|
||||
code = fields.Char('编码', related='functional_tool_name_id.code')
|
||||
rfid = fields.Char('rfid', related='functional_tool_name_id.rfid')
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组', related='functional_tool_name_id.tool_groups_id')
|
||||
|
||||
@api.model
|
||||
@@ -476,6 +479,7 @@ class MachineTableToolChangingApply(models.Model):
|
||||
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号', store=True,
|
||||
domain=[('product_id.name', '=', '功能刀具')],
|
||||
related='functional_tool_name_id.barcode_id')
|
||||
rfid = fields.Char('rfid', related='functional_tool_name_id.rfid')
|
||||
functional_tool_name_id = fields.Many2one('sf.functional.tool.assembly', domain=[('assemble_status', '=', '1')],
|
||||
string='功能刀具名称')
|
||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', store=True,
|
||||
@@ -502,7 +506,7 @@ class MachineTableToolChangingApply(models.Model):
|
||||
reason_for_applying = fields.Char(string='申请原因', readonly=True)
|
||||
remark = fields.Char(string='备注说明', readonly=False)
|
||||
|
||||
status = fields.Selection([('0', '未操作'), ('1', '已换刀申请'), ('2', '已转移'), ('3', '已组装')],
|
||||
status = fields.Selection([('0', '未操作'), ('1', '已申请换刀'), ('2', '已转移'), ('3', '已组装')],
|
||||
string='操作状态', default='0')
|
||||
|
||||
sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装单', readonly=True)
|
||||
@@ -787,6 +791,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
obj.name = obj.after_assembly_functional_tool_name
|
||||
|
||||
code = fields.Char('功能刀具编码', readonly=True)
|
||||
rfid = fields.Char('rfid', readonly=True)
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组', readonly=True)
|
||||
name = fields.Char(string='名称', readonly=True, compute='_compute_name')
|
||||
assembly_order_code = fields.Char(string='组装单编码', readonly=True)
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<field name="model">sf.functional.cutting.tool.entity</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="功能刀具列表" create="0" edit="0" delete="0">
|
||||
<field name="barcode_id"/>
|
||||
<field name="barcode_id" invisible="1"/>
|
||||
<field name="rfid"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="image" widget='image'/>
|
||||
<field name="tool_groups_id"/>
|
||||
@@ -76,12 +77,13 @@
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="barcode_id" readonly="1" nolabel="True"/>
|
||||
<field name="code" readonly="1" nolabel="True"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="code" readonly="1"/>
|
||||
<field name="barcode_id" invisible="1"/>
|
||||
<field name="rfid" readonly="1"/>
|
||||
<field name="functional_tool_name_id" invisible="False"
|
||||
placeholder="请输入20字以内的名称"/>
|
||||
<field name="sf_cutting_tool_type_id"/>
|
||||
@@ -178,6 +180,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="barcode_id"/>
|
||||
<field name="rfid"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="image" widget='image'/>
|
||||
<field name="functional_tool_diameter"/>
|
||||
@@ -224,7 +227,8 @@
|
||||
<field name="maintenance_equipment_id" optional="hide"/>
|
||||
<field name="machine_tool_code"/>
|
||||
<field name="cutter_spacing_code_id"/>
|
||||
<field name="barcode_id"/>
|
||||
<field name="barcode_id" invisible="1"/>
|
||||
<field name="rfid"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="diameter"/>
|
||||
<field name="knife_tip_r_angle"/>
|
||||
@@ -250,6 +254,7 @@
|
||||
<field name="machine_tool_code"/>
|
||||
<field name="cutter_spacing_code_id"/>
|
||||
<field name="barcode_id"/>
|
||||
<field name="rfid"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="diameter"/>
|
||||
<field name="knife_tip_r_angle"/>
|
||||
@@ -376,7 +381,7 @@
|
||||
<page string="刀具信息">
|
||||
<field name="sf_functional_cutting_tool_entity_ids" widget="many2many">
|
||||
<tree edit="0" create="0" delete="0">
|
||||
<field name="barcode_id"/>
|
||||
<field name="rfid"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="new_former"/>
|
||||
<field name="tool_loading_length" string="总长度(mm)"/>
|
||||
@@ -435,7 +440,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="功能刀具出入库记录" create="0" edit="0" delete="0">
|
||||
<field name="reference" string="单据号"/>
|
||||
<field name="lot_id" string="功能刀具序列号"/>
|
||||
<field name="lot_id" invisible="1"/>
|
||||
<field name="rfid"/>
|
||||
<field name="functional_tool_name_id" string="功能刀具名称"/>
|
||||
<field name="diameter"/>
|
||||
<field name="knife_tip_r_angle"/>
|
||||
@@ -457,6 +463,7 @@
|
||||
<search>
|
||||
<field name="reference"/>
|
||||
<field name="lot_id"/>
|
||||
<field name="rfid"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="diameter"/>
|
||||
<field name="knife_tip_r_angle"/>
|
||||
@@ -510,6 +517,7 @@
|
||||
|
||||
<field name="machine_table_type_id" invisible="1"/>
|
||||
<field name="barcode_id" invisible="1"/>
|
||||
<field name="rfid" invisible="1"/>
|
||||
<field name="functional_tool_type_id" invisible="1"/>
|
||||
<field name="tool_position_interface_type" invisible="1"/>
|
||||
<field name="extension_length" invisible="1"/>
|
||||
@@ -529,6 +537,7 @@
|
||||
'default_machine_tool_code': machine_tool_code,
|
||||
'default_cutter_spacing_code_id': cutter_spacing_code_id,
|
||||
'default_barcode_id': barcode_id,
|
||||
'default_rfid': rfid,
|
||||
'default_functional_tool_name': functional_tool_name,
|
||||
'default_functional_tool_type_id': functional_tool_type_id,
|
||||
'default_tool_position_interface_type': tool_position_interface_type,
|
||||
@@ -551,7 +560,7 @@
|
||||
'default_replacement_extension_length': extension_length,
|
||||
'default_replacement_effective_length': effective_length,
|
||||
}"
|
||||
attrs="{'invisible': [('status', '!=', '0')]}"
|
||||
attrs="{'invisible': ['|',('status', '!=', '0'), ('functional_tool_name_id', '=', False)]}"
|
||||
class="btn-primary" groups="sf_base.group_sf_mrp_user"
|
||||
/>
|
||||
<button string="转移"
|
||||
@@ -566,6 +575,7 @@
|
||||
'default_machine_tool_code': machine_tool_code,
|
||||
'default_cutter_spacing_code_id': cutter_spacing_code_id,
|
||||
'default_barcode_id': barcode_id,
|
||||
'default_rfid': rfid,
|
||||
'default_functional_tool_name': functional_tool_name,
|
||||
'default_functional_tool_type_id': functional_tool_type_id,
|
||||
'default_tool_position_interface_type': tool_position_interface_type,
|
||||
@@ -582,9 +592,11 @@
|
||||
attrs="{'invisible': ['|',('status', '!=', '0'), ('functional_tool_name_id', '=', False)]}"
|
||||
/>
|
||||
<button string="撤回换刀申请" name="revocation_1" type="object" class="btn-primary"
|
||||
attrs="{'invisible': [('status', '!=', '1')]}" groups="sf_base.group_sf_mrp_user" confirm="是否确认撤回换刀申请"/>
|
||||
attrs="{'invisible': [('status', '!=', '1')]}" groups="sf_base.group_sf_mrp_user"
|
||||
confirm="是否确认撤回换刀申请"/>
|
||||
<button string="撤回转移" name="revocation_2" type="object" class="btn-primary"
|
||||
attrs="{'invisible': [('status', '!=', '2')]}" groups="sf_base.group_sf_mrp_user" confirm="是否确认撤回转移"/>
|
||||
attrs="{'invisible': [('status', '!=', '2')]}" groups="sf_base.group_sf_mrp_user"
|
||||
confirm="是否确认撤回转移"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -607,6 +619,7 @@
|
||||
'default_machine_tool_code': machine_tool_code,
|
||||
'default_cutter_spacing_code_id': cutter_spacing_code_id,
|
||||
'default_barcode_id': barcode_id,
|
||||
'default_rfid': rfid,
|
||||
'default_functional_tool_name': functional_tool_name,
|
||||
'default_functional_tool_type_id': functional_tool_type_id,
|
||||
'default_tool_position_interface_type': tool_position_interface_type,
|
||||
@@ -629,7 +642,7 @@
|
||||
'default_replacement_extension_length': extension_length,
|
||||
'default_replacement_effective_length': effective_length,
|
||||
}"
|
||||
attrs="{'invisible': [('status', '!=', '0')]}"
|
||||
attrs="{'invisible': ['|',('status', '!=', '0'), ('functional_tool_name_id', '=', False)]}"
|
||||
class="btn-primary" groups="sf_base.group_sf_mrp_user"
|
||||
/>
|
||||
<button string="转移"
|
||||
@@ -642,6 +655,7 @@
|
||||
'default_machine_tool_code': machine_tool_code,
|
||||
'default_cutter_spacing_code_id': cutter_spacing_code_id,
|
||||
'default_barcode_id': barcode_id,
|
||||
'default_rfid': rfid,
|
||||
'default_functional_tool_name': functional_tool_name,
|
||||
'default_functional_tool_type_id': functional_tool_type_id,
|
||||
'default_tool_position_interface_type': tool_position_interface_type,
|
||||
@@ -657,9 +671,12 @@
|
||||
class="btn-primary" groups="sf_base.group_sf_mrp_user"
|
||||
attrs="{'invisible': ['|',('status', '!=', '0'),('functional_tool_name_id', '=', False)]}"/>
|
||||
<button string="撤回换刀申请" name="revocation_1" type="object" class="btn-primary"
|
||||
attrs="{'invisible': [('status', '!=', '1')]}" groups="sf_base.group_sf_mrp_user" confirm="是否确认撤回换刀申请"/>
|
||||
<button string="撤回转移" name="revocation_2" type="object" groups="sf_base.group_sf_mrp_user" class="btn-primary"
|
||||
attrs="{'invisible': [('status', '!=', '1')]}" groups="sf_base.group_sf_mrp_user"
|
||||
confirm="是否确认撤回换刀申请"/>
|
||||
<button string="撤回转移" name="revocation_2" type="object" groups="sf_base.group_sf_mrp_user"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('status', '!=', '2')]}" confirm="是否确认撤回转移"/>
|
||||
<field name="status" widget="statusbar" statusbar_visible="0,1,2,3"/>
|
||||
</header>
|
||||
<field name="functional_tool_status" string="状态" invisible="True"/>
|
||||
<sheet>
|
||||
@@ -686,7 +703,8 @@
|
||||
<page string="功能刀具信息">
|
||||
<group>
|
||||
<group>
|
||||
<field name="barcode_id"/>
|
||||
<field name="barcode_id" invisible="1"/>
|
||||
<field name="rfid"/>
|
||||
<field name="code"/>
|
||||
<field name="functional_tool_name_id"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
@@ -722,6 +740,7 @@
|
||||
<field name="machine_table_type_id"/>
|
||||
<field name="cutter_spacing_code_id" optional="hide"/>
|
||||
<field name="barcode_id" invisible="1"/>
|
||||
<field name="rfid" invisible="1"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="diameter"/>
|
||||
<field name="knife_tip_r_angle"/>
|
||||
@@ -948,7 +967,8 @@
|
||||
}"
|
||||
attrs="{'invisible': [('assemble_status', '!=', '0')]}" groups="sf_base.group_sf_mrp_user"
|
||||
class="btn-primary"/>
|
||||
<button string="组装单打印" name="assemble_single_print" type="object" groups="sf_base.group_sf_mrp_user"
|
||||
<button string="组装单打印" name="assemble_single_print" type="object"
|
||||
groups="sf_base.group_sf_mrp_user"
|
||||
attrs="{'invisible': [('assemble_status', '=', '0')]}" class="btn-primary"
|
||||
confirm="是否确认打印组装单"/>
|
||||
</tree>
|
||||
@@ -986,10 +1006,12 @@
|
||||
attrs="{'invisible': [('assemble_status', '!=', '0')]}"
|
||||
class="btn-primary"/>
|
||||
|
||||
<button string="打印二维码" name="automatic_printing_of_QR_code" type="object" groups="sf_base.group_sf_mrp_user"
|
||||
<button string="打印二维码" name="automatic_printing_of_QR_code" type="object"
|
||||
groups="sf_base.group_sf_mrp_user"
|
||||
attrs="{'invisible': [('assemble_status', '=', '0')]}" class="btn-primary"
|
||||
confirm="是否确认打印二维码"/>
|
||||
<button string="组装单打印" name="assemble_single_print" type="object" groups="sf_base.group_sf_mrp_user"
|
||||
<button string="组装单打印" name="assemble_single_print" type="object"
|
||||
groups="sf_base.group_sf_mrp_user"
|
||||
attrs="{'invisible': [('assemble_status', '=', '0')]}" class="btn-primary"
|
||||
confirm="是否确认打印组装单"/>
|
||||
<field name="assemble_status" widget="statusbar" statusbar_visible="0,1"/>
|
||||
@@ -1021,7 +1043,8 @@
|
||||
<group col="1">
|
||||
<group>
|
||||
<group>
|
||||
<field name="barcode_id"/>
|
||||
<field name="barcode_id" invisible="True"/>
|
||||
<field name="rfid" string="功能刀具rfid"/>
|
||||
<field name="code"/>
|
||||
<field name="after_assembly_functional_tool_name"
|
||||
string="功能刀具名称"/>
|
||||
|
||||
@@ -9,6 +9,7 @@ class ToolChangeRequirementInformation(models.TransientModel):
|
||||
_description = '换刀需求信息'
|
||||
|
||||
code = fields.Char('编码', readonly=True)
|
||||
rfid = fields.Char('rfid', readonly=True)
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组', readonly=True)
|
||||
name = fields.Char('名称', related='maintenance_equipment_id.name', store=True, readonly=True)
|
||||
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='CNC机床', readonly=True)
|
||||
@@ -321,6 +322,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
|
||||
# 组装功能刀具参数信息
|
||||
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号')
|
||||
rfid = fields.Char('rfid', required=True)
|
||||
tool_code = fields.Char(string='功能刀具编码', readonly=True, compute='_compute_tool_code')
|
||||
after_assembly_functional_tool_name = fields.Char(string='组装后功能刀具名称', compute='_compute_name')
|
||||
after_assembly_functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model',
|
||||
@@ -522,6 +524,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
return {
|
||||
'barcode_id': stock_lot.id,
|
||||
'code': self.tool_code,
|
||||
'rfid': self.rfid,
|
||||
'tool_groups_id': self.tool_groups_id.id,
|
||||
'integral_code_id': self.integral_code_id.id,
|
||||
'blade_code_id': self.blade_code_id.id,
|
||||
@@ -558,6 +561,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
return {
|
||||
'barcode_id': stock_lot.id,
|
||||
'code': self.tool_code,
|
||||
'rfid': self.rfid,
|
||||
'tool_groups_id': self.tool_groups_id.id,
|
||||
'functional_tool_name_id': functional_tool_assembly_id.id,
|
||||
'sf_cutting_tool_type_id': self.after_assembly_functional_tool_type_id.id,
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
<field name="whether_standard_knife"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="barcode_id"/>
|
||||
<field name="barcode_id" invisible="1"/>
|
||||
<field name="rfid"/>
|
||||
<field name="code"/>
|
||||
<field name="functional_tool_name"/>
|
||||
<field name="functional_tool_type_id"/>
|
||||
@@ -334,6 +335,7 @@
|
||||
<group>
|
||||
<field name="barcode_id" invisible="True"/>
|
||||
<field name="tool_code" readonly="True"/>
|
||||
<field name="rfid" placeholder="请输入rfid码"/>
|
||||
<field name="after_assembly_functional_tool_name" string="功能刀具名称"/>
|
||||
<field name="after_assembly_functional_tool_type_id" string="功能刀具类型"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
import logging
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.osv import expression
|
||||
@@ -224,6 +225,23 @@ class ShelfLocation(models.Model):
|
||||
_description = '货架货位'
|
||||
_order = 'name'
|
||||
|
||||
# current_location_id = fields.Many2one('sf.shelf.location', string='当前位置')
|
||||
# # 目的位置
|
||||
# destination_location_id = fields.Many2one('sf.shelf.location', string='目的位置')
|
||||
current_move_ids = fields.One2many('stock.move.line', 'current_location_id', '当前位置调拨单')
|
||||
destination_move_ids = fields.One2many('stock.move.line', 'destination_location_id', '目标位置调拨单')
|
||||
storage_time = fields.Datetime('入库时间', compute='_compute_location_status')
|
||||
|
||||
@api.depends('location_status')
|
||||
def _compute_location_status(self):
|
||||
for record in self:
|
||||
if record.location_status == '占用':
|
||||
record.storage_time = datetime.datetime.now()
|
||||
if record.location_status == '空闲':
|
||||
record.storage_time = False
|
||||
if record.location_status == '禁用':
|
||||
record.storage_time = False
|
||||
|
||||
name = fields.Char('名称', required=True, size=20)
|
||||
barcode = fields.Char('编码', copy=False, size=15)
|
||||
|
||||
@@ -291,8 +309,8 @@ class ShelfLocation(models.Model):
|
||||
record.sudo().product_id = record.product_sn_id.product_id
|
||||
record.sudo().location_status = '占用'
|
||||
else:
|
||||
record.sudo().product_id = False
|
||||
record.sudo().location_status = '空闲'
|
||||
record.product_id = False
|
||||
# record.location_status = '空闲'
|
||||
|
||||
@api.depends('location_type')
|
||||
def _compute_hide_what(self):
|
||||
@@ -453,7 +471,7 @@ class SfStockPicking(models.Model):
|
||||
if line:
|
||||
if line.current_location_id:
|
||||
line.current_location_id.product_sn_id = False
|
||||
line.current_location_id = False
|
||||
line.current_location_id.location_status = '空闲'
|
||||
return res
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #fff !important;
|
||||
background-color: #27FEA9 !important;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='location_id'][2]" position="after">
|
||||
<field name="current_location_id"/>
|
||||
<field name="current_location_id" force_save="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='location_dest_id'][2]" position="after">
|
||||
<field name="destination_location_id" domain="[
|
||||
@@ -23,13 +23,31 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_view_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">sf.stock.move.line.tree</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='location_id']" position="after">
|
||||
<field name="current_location_id" force_save="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='location_dest_id']" position="after">
|
||||
<field name="destination_location_id" />
|
||||
<!-- <field name="location_dest_id_product_type"/> -->
|
||||
<!-- <field name="location_dest_id"/> -->
|
||||
<field name="location_dest_id_value" invisible="1"/>
|
||||
<!-- <button name="button_test" string="测试" type="object" class="oe_highlight"/> -->
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_stock_move_line_form" model="ir.ui.view">
|
||||
<field name="name">sf.stock.move.line.form</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form//sheet//group//group//field[@name='location_id']" position="after">
|
||||
<field name="current_location_id" options="{'no_create': False}"/>
|
||||
<field name="current_location_id" options="{'no_create': False}" force_save="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//form//sheet//group//group//field[@name='location_dest_id']" position="after">
|
||||
<field name="destination_location_id" options="{'no_create': False}"/>
|
||||
|
||||
@@ -9,26 +9,82 @@
|
||||
<field name="name" string="名称"/>
|
||||
<field name="barcode" string="编码"/>
|
||||
<field name="location_type"/>
|
||||
<!-- <field name="check_state" widget="label_selection"-->
|
||||
<!-- options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>-->
|
||||
<!-- <button name="action_check" string="审核" type="object"-->
|
||||
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
|
||||
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
|
||||
<!-- class="oe_highlight"/>-->
|
||||
<!-- <field name="check_state" widget="label_selection"-->
|
||||
<!-- options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>-->
|
||||
<!-- <button name="action_check" string="审核" type="object"-->
|
||||
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
|
||||
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
|
||||
<!-- class="oe_highlight"/>-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- 货架货位移动历史按钮-->
|
||||
|
||||
<record id="sf_stock_move_line_view_search" model="ir.ui.view">
|
||||
<field name="name">sf.view.picking.form</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.stock_move_line_view_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field name='current_location_id'/>
|
||||
<field name='destination_location_id'/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_move_line_action1" model="ir.actions.act_window">
|
||||
<field name="name">移动历史</field>
|
||||
<field name="res_model">stock.move.line</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="sf_stock_move_line_view_search"/>
|
||||
<field name="view_id" ref="stock.view_move_line_tree"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
产品移动历史
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_shelf_location_form" model="ir.ui.view">
|
||||
<field name="name">Shelf Location form</field>
|
||||
<field name="model">sf.shelf.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Shelf Location">
|
||||
|
||||
<header>
|
||||
<button string="生成货位" name="create_location" type="object" class="oe_highlight"
|
||||
attrs="{'invisible': [('hide_shelf', '=', False)]}"/>
|
||||
|
||||
<!-- <button name="%(shelf_location_kanban_action_id)d"-->
|
||||
<!-- type="action"-->
|
||||
<!-- class="oe_stat_button"-->
|
||||
<!-- context="{'search_default_maintenance_equipment_id': [active_id]}"-->
|
||||
<!-- icon="fa-wrench">-->
|
||||
<!-- <field string="目标位置调拨" name="destination_move_ids" widget="statinfo"/>-->
|
||||
<!-- </button>-->
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="%(stock_move_line_action1)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
context="{'search_default_current_location_id': [active_id]}"
|
||||
icon="fa-exchange">
|
||||
|
||||
<field string="当前位置历史" name="current_move_ids" widget="statinfo"/>
|
||||
</button>
|
||||
<button name="%(stock_move_line_action1)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
context="{'search_default_destination_location_id': [active_id]}"
|
||||
icon="fa-exchange">
|
||||
|
||||
<field string="目标位置历史" name="destination_move_ids" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<group>
|
||||
<field name="hide_shelf" invisible="1"/>
|
||||
<field name="hide_location" invisible="1"/>
|
||||
@@ -55,6 +111,7 @@
|
||||
<!-- <field name="product_type" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}" widget="many2many_tags"/> -->
|
||||
<field name="location_status"
|
||||
attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False)]}"/>
|
||||
<field name="storage_time" widget="datetime"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user