Accept Merge Request #381: (feature/修改机床参数bug -> develop)
Merge Request: 设备图文展示 Created By: @龚启豪 Accepted By: @龚启豪 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/381?initial=true
This commit is contained in:
@@ -19,6 +19,7 @@ class SfEquipmentSaintenanceStandards(models.Model):
|
|||||||
num = "%04d" % m
|
num = "%04d" % m
|
||||||
return num
|
return num
|
||||||
code = fields.Char(string='编码', default=get_no)
|
code = fields.Char(string='编码', default=get_no)
|
||||||
|
remark = fields.Char('备注')
|
||||||
maintenance_type = fields.Selection([('保养', '保养'), ("检修", "检修")], string='类型', default='保养')
|
maintenance_type = fields.Selection([('保养', '保养'), ("检修", "检修")], string='类型', default='保养')
|
||||||
name = fields.Char(string='名称')
|
name = fields.Char(string='名称')
|
||||||
created_user_id = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user)
|
created_user_id = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user)
|
||||||
@@ -26,7 +27,7 @@ class SfEquipmentSaintenanceStandards(models.Model):
|
|||||||
maintenance_equipment_ids = fields.Many2many(
|
maintenance_equipment_ids = fields.Many2many(
|
||||||
'maintenance.equipment',
|
'maintenance.equipment',
|
||||||
'sf_maintenance_equipment_ids',
|
'sf_maintenance_equipment_ids',
|
||||||
string='设备',
|
string='适用设备',
|
||||||
domain="[('category_id', '=', maintenance_equipment_category_id)]"
|
domain="[('category_id', '=', maintenance_equipment_category_id)]"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -42,23 +43,29 @@ class SfEquipmentSaintenanceStandards(models.Model):
|
|||||||
if record.maintenance_type == '检修':
|
if record.maintenance_type == '检修':
|
||||||
record.write({'overhaul_ids': [(6, 0, record.maintenance_equipment_ids.ids)]})
|
record.write({'overhaul_ids': [(6, 0, record.maintenance_equipment_ids.ids)]})
|
||||||
|
|
||||||
@api.onchange("maintenance_standards_ids")
|
# @api.onchange("maintenance_standards_ids")
|
||||||
def _reset_work_order_sequence(self):
|
# def _reset_work_order_sequence(self):
|
||||||
for rec in self:
|
# for rec in self:
|
||||||
current_sequence = 1
|
# current_sequence = 1
|
||||||
for work in rec.maintenance_standards_ids:
|
# for work in rec.maintenance_standards_ids:
|
||||||
work.sequence = current_sequence
|
# work.sequence = current_sequence
|
||||||
current_sequence += 1
|
# current_sequence += 1
|
||||||
|
|
||||||
class SfSaintenanceStandards(models.Model):
|
class SfSaintenanceStandards(models.Model):
|
||||||
_name = 'maintenance.standards'
|
_name = 'maintenance.standards'
|
||||||
_description = '维保项目'
|
_description = '维保项目'
|
||||||
|
_order = 'sequence'
|
||||||
|
|
||||||
|
sequence = fields.Integer('序号')
|
||||||
name = fields.Char('维保项目')
|
name = fields.Char('维保项目')
|
||||||
maintenance_standards = fields.Char('维保标准')
|
maintenance_standards = fields.Char('维保标准')
|
||||||
|
fault_type = fields.Selection(
|
||||||
|
[('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='类别')
|
||||||
equipment_maintenance_standards_id = fields.Many2one('equipment.maintenance.standards', string='设备维保标准')
|
equipment_maintenance_standards_id = fields.Many2one('equipment.maintenance.standards', string='设备维保标准')
|
||||||
maintenance_request_id = fields.Many2one('maintenance.request', string='设备维保计划')
|
maintenance_request_id = fields.Many2one('maintenance.request', string='设备维保计划')
|
||||||
images = fields.One2many('maintenance.standard.image', 'standard_id', string='反馈图片')
|
images = fields.One2many('maintenance.standard.image', 'standard_id', string='反馈图片')
|
||||||
|
Period = fields.Integer('周期/频次(天)')
|
||||||
|
remark = fields.Char('备注说明')
|
||||||
|
|
||||||
|
|
||||||
class MaintenanceStandardImage(models.Model):
|
class MaintenanceStandardImage(models.Model):
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
overhaul_period = fields.Integer(string='预防检修频次')
|
overhaul_period = fields.Integer(string='预防检修频次')
|
||||||
overhaul_duration = fields.Float(string='检修时长')
|
overhaul_duration = fields.Float(string='检修时长')
|
||||||
|
|
||||||
|
|
||||||
overhaul_id = fields.Many2one('equipment.maintenance.standards', string='设备检修标准',
|
overhaul_id = fields.Many2one('equipment.maintenance.standards', string='设备检修标准',
|
||||||
domain="[('maintenance_type','=','检修')]")
|
domain="[('maintenance_type','=','检修')]")
|
||||||
|
|
||||||
@@ -142,7 +143,7 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
# 多个型号对应一个机床
|
# 多个型号对应一个机床
|
||||||
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
||||||
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs','maintenance_equipment_id', '设备故障日志')
|
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs', 'maintenance_equipment_id', '设备故障日志')
|
||||||
|
|
||||||
|
|
||||||
def name_get(self):
|
def name_get(self):
|
||||||
@@ -474,3 +475,15 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
('sf_maintenance_type', '=', '检修')])
|
('sf_maintenance_type', '=', '检修')])
|
||||||
if not next_requests:
|
if not next_requests:
|
||||||
equipment._create_new_request1(equipment.overhaul_date)
|
equipment._create_new_request1(equipment.overhaul_date)
|
||||||
|
|
||||||
|
image_id = fields.Many2many('maintenance.equipment.image', 'equipment_id', string='设备图文')
|
||||||
|
|
||||||
|
class MaintenanceStandardImage(models.Model):
|
||||||
|
_name = 'maintenance.equipment.image'
|
||||||
|
_description = '设备图文展示'
|
||||||
|
|
||||||
|
|
||||||
|
active = fields.Boolean('有效', default=True)
|
||||||
|
name = fields.Char('加工能力')
|
||||||
|
image = fields.Binary(string='设备图文')
|
||||||
|
equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备')
|
||||||
@@ -22,3 +22,5 @@ class SfMaintenanceLogs(models.Model):
|
|||||||
recovery_time = fields.Datetime(string='复原时间')
|
recovery_time = fields.Datetime(string='复原时间')
|
||||||
fault_duration = fields.Float(string='故障时长')
|
fault_duration = fields.Float(string='故障时长')
|
||||||
note = fields.Text(string='备注')
|
note = fields.Text(string='备注')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ access_sf_maintenance_logs,sf_maintenance_logs,model_sf_maintenance_logs,base.gr
|
|||||||
access_maintenance_equipment,maintenance_equipment,model_maintenance_equipment,base.group_user,1,1,1,1
|
access_maintenance_equipment,maintenance_equipment,model_maintenance_equipment,base.group_user,1,1,1,1
|
||||||
access_maintenance_standards,maintenance_standards,model_maintenance_standards,base.group_user,1,1,1,1
|
access_maintenance_standards,maintenance_standards,model_maintenance_standards,base.group_user,1,1,1,1
|
||||||
access_maintenance_standard_image,maintenance_standard_image,model_maintenance_standard_image,base.group_user,1,1,1,1
|
access_maintenance_standard_image,maintenance_standard_image,model_maintenance_standard_image,base.group_user,1,1,1,1
|
||||||
|
access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance_equipment_image,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -21,14 +21,26 @@
|
|||||||
<group>
|
<group>
|
||||||
<field name="maintenance_type" required="1"/>
|
<field name="maintenance_type" required="1"/>
|
||||||
<field name="created_user_id"/>
|
<field name="created_user_id"/>
|
||||||
|
<field name="remark"/>
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="maintenance_equipment_ids" widget="many2many_tags" attrs="{'invisible': [('maintenance_equipment_category_id', '=', False)]}"/>
|
<field name="maintenance_equipment_ids" widget="many2many_tags" attrs="{'invisible': [('maintenance_equipment_category_id', '=', False)]}"/>
|
||||||
</group>
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page string="维保项目">
|
||||||
|
|
||||||
|
<field name="maintenance_standards_ids">
|
||||||
|
<tree editable="bottom">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="fault_type"/>
|
||||||
|
<field name="maintenance_standards"/>
|
||||||
|
<field name="Period"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -46,6 +58,7 @@
|
|||||||
<field name="maintenance_equipment_ids"/>
|
<field name="maintenance_equipment_ids"/>
|
||||||
<field name="created_user_id"/>
|
<field name="created_user_id"/>
|
||||||
<field name="create_date" string="创建时间"/>
|
<field name="create_date" string="创建时间"/>
|
||||||
|
<field name="remark"/>
|
||||||
|
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -34,25 +34,39 @@
|
|||||||
<field name="model">sf.maintenance.logs</field>
|
<field name="model">sf.maintenance.logs</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="设备故障日志">
|
<form string="设备故障日志">
|
||||||
<group>
|
<header>
|
||||||
<field name="code"/>
|
<field name="alarm_level" widget="statusbar"/>
|
||||||
<field name="name"/>
|
</header>
|
||||||
<field name="type"/>
|
<sheet>
|
||||||
<field name="brand"/>
|
<div class="oe_title">
|
||||||
<field name="maintenance_equipment_id"/>
|
<h1>
|
||||||
<field name="code_location"/>
|
<field name="code" readonly="1"/>
|
||||||
<field name="fault_type"/>
|
</h1>
|
||||||
<field name="fault_code"/>
|
</div>
|
||||||
<field name="fault_alarm_info"/>
|
<group>
|
||||||
<field name="alarm_level"/>
|
<group>
|
||||||
<field name="alarm_time"/>
|
|
||||||
<field name="alarm_way"/>
|
<field name="name"/>
|
||||||
<field name="fault_process"/>
|
<field name="type" required="1" widget="radio" options="{'horizontal': true}"/>
|
||||||
<field name="operator"/>
|
<field name="brand"/>
|
||||||
<field name="recovery_time"/>
|
<field name="maintenance_equipment_id"/>
|
||||||
<field name="fault_duration"/>
|
<field name="code_location"/>
|
||||||
<field name="note"/>
|
<field name="fault_type" required="1" widget="radio" options="{'horizontal': true}"/>
|
||||||
</group>
|
<field name="fault_code"/>
|
||||||
|
<field name="fault_process"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="fault_alarm_info"/>
|
||||||
|
<field name="alarm_time"/>
|
||||||
|
<field name="alarm_way" required="1" widget="radio" options="{'horizontal': true}"/>
|
||||||
|
<field name="operator"/>
|
||||||
|
<field name="recovery_time"/>
|
||||||
|
<field name="fault_duration"/>
|
||||||
|
<field name="note"/>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -64,8 +78,8 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="maintenance_equipment_id" icon="fa-building" enable_counters="1"/>
|
<field name="maintenance_equipment_id" icon="fa-building" enable_counters="1"/>
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
@@ -90,28 +104,28 @@
|
|||||||
|
|
||||||
<!-- Action -->
|
<!-- Action -->
|
||||||
|
|
||||||
<record id="action_maintenance_logs" model="ir.actions.act_window">
|
<record id="action_maintenance_logs" model="ir.actions.act_window">
|
||||||
<field name="name">设备故障日志</field>
|
<field name="name">设备故障日志</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sf.maintenance.logs</field>
|
<field name="res_model">sf.maintenance.logs</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="view_id" ref="view_maintenance_logs_tree"/>
|
<field name="view_id" ref="view_maintenance_logs_tree"/>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="oe_view_nocontent_create">
|
<p class="oe_view_nocontent_create">
|
||||||
设备故障日志
|
设备故障日志
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="action_maintenance_logs" model="ir.actions.act_window">-->
|
<!-- <record id="action_maintenance_logs" model="ir.actions.act_window">-->
|
||||||
<!-- <field name="name">设备故障日志</field>-->
|
<!-- <field name="name">设备故障日志</field>-->
|
||||||
<!-- <field name="res_model">sf.maintenance.logs</field>-->
|
<!-- <field name="res_model">sf.maintenance.logs</field>-->
|
||||||
<!-- <field name="view_type">form</field>-->
|
<!-- <field name="view_type">form</field>-->
|
||||||
<!-- <field name="view_mode">tree,form</field>-->
|
<!-- <field name="view_mode">tree,form</field>-->
|
||||||
<!-- <field name="view_id" ref="view_maintenance_logs_tree"/>-->
|
<!-- <field name="view_id" ref="view_maintenance_logs_tree"/>-->
|
||||||
<!-- </record>-->
|
<!-- </record>-->
|
||||||
|
|
||||||
<!-- Menu -->
|
<!-- Menu -->
|
||||||
<menuitem name="设备故障日志" id="menu_maintenance_logs" parent="maintenance.menu_m_request"
|
<menuitem name="设备故障日志" id="menu_maintenance_logs" parent="maintenance.menu_m_request"
|
||||||
sequence="10" action="action_maintenance_logs"/>
|
sequence="10" action="action_maintenance_logs"/>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -24,9 +24,11 @@
|
|||||||
<page string="维保标准" attrs="{'invisible': [('equipment_maintenance_id', '=', False)]}">
|
<page string="维保标准" attrs="{'invisible': [('equipment_maintenance_id', '=', False)]}">
|
||||||
<field name="maintenance_standards" widget="ony2many">
|
<field name="maintenance_standards" widget="ony2many">
|
||||||
<tree>
|
<tree>
|
||||||
|
<field name="sequence"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="maintenance_standards"/>
|
<field name="maintenance_standards"/>
|
||||||
<field name="images"/>
|
<field name="images"/>
|
||||||
|
<field name="remark"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
@@ -78,8 +80,16 @@
|
|||||||
<form string="设备维保项目">
|
<form string="设备维保项目">
|
||||||
<sheet>
|
<sheet>
|
||||||
<group>
|
<group>
|
||||||
<field name="name"/>
|
<group>
|
||||||
<field name="maintenance_standards"/>
|
<field name="sequence"/>
|
||||||
|
<field name="name"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="maintenance_standards"/>
|
||||||
|
<field name="remark"/>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="上传图片">
|
<page string="上传图片">
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
<!-- <field string="Maintenance" name="maintenance_count" widget="statinfo"/>-->
|
<!-- <field string="Maintenance" name="maintenance_count" widget="statinfo"/>-->
|
||||||
<xpath expr="//div[@name='button_box']" position="inside">
|
<xpath expr="//div[@name='button_box']" position="inside">
|
||||||
|
|
||||||
|
|
||||||
<button name="%(action_maintenance_logs)d"
|
<button name="%(action_maintenance_logs)d"
|
||||||
type="action"
|
type="action"
|
||||||
class="oe_stat_button"
|
class="oe_stat_button"
|
||||||
@@ -46,6 +47,10 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='maintenance_team_id']" position="before">
|
<xpath expr="//field[@name='maintenance_team_id']" position="before">
|
||||||
<field name="machine_tool_picture" widget="image"/>
|
<field name="machine_tool_picture" widget="image"/>
|
||||||
|
<label for="enroll_machine_tool"/>
|
||||||
|
<div class="col-12 col-lg-6 o_setting_box" style="white-space: nowrap">
|
||||||
|
<button type="object" class="oe_highlight" name='enroll_machine_tool' string="机床注册"/>
|
||||||
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='category_id']" position="after">
|
<xpath expr="//field[@name='category_id']" position="after">
|
||||||
<field name="state_zc" readonly="1"/>
|
<field name="state_zc" readonly="1"/>
|
||||||
@@ -172,6 +177,16 @@
|
|||||||
|
|
||||||
</page>
|
</page>
|
||||||
|
|
||||||
|
<page string="图文展示">
|
||||||
|
<field name='image_id' widget="custom_many2many_checkboxes">
|
||||||
|
<tree editable="bottom">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"
|
||||||
|
options="{'size': [100, 100], 'click enlarge': True}"/>
|
||||||
|
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
@@ -210,11 +225,11 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<xpath expr="//page[@name='maintenance']" position="after">
|
<xpath expr="//page[@name='maintenance']" position="after">
|
||||||
<page string="其他" attrs="{'invisible': [('type_id', '=', False)]}">
|
<page string="其他" attrs="{'invisible': [('type_id', '=', False)]}">
|
||||||
<group string="其他">
|
<group string="其他">
|
||||||
<field name="remark"/>
|
<field name="remark"/>
|
||||||
</group>
|
</group>
|
||||||
<button type="object" class="oe_highlight" name='enroll_machine_tool' string="机床注册"/>
|
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
@@ -360,7 +375,51 @@
|
|||||||
<!-- name="设备管理"-->
|
<!-- name="设备管理"-->
|
||||||
<!-- parent="menu_maintenance_title_sf"-->
|
<!-- parent="menu_maintenance_title_sf"-->
|
||||||
<!-- groups="maintenance.group_equipment_manager,base.group_user"-->
|
<!-- groups="maintenance.group_equipment_manager,base.group_user"-->
|
||||||
<!-- sequence="1"/>-->
|
<!-- sequence="1"/-->
|
||||||
|
<!-- 设备图文展示-->
|
||||||
|
<record id="view_maintenance_equipment_image_tree" model="ir.ui.view">
|
||||||
|
<field name="name">maintenance.equipment.image.tree</field>
|
||||||
|
<field name="model">maintenance.equipment.image</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="设备图文">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"/>
|
||||||
|
<field name="equipment_id" invisible="1"/>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_maintenance_equipment_image_form" model="ir.ui.view">
|
||||||
|
<field name="name">maintenance.equipment.image.form</field>
|
||||||
|
<field name="model">maintenance.equipment.image</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="设备图文">
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"/>
|
||||||
|
<field name="equipment_id" invisible="1"/>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_maintenance_equipment_image" model="ir.actions.act_window">
|
||||||
|
<field name="name">设备图文图文</field>
|
||||||
|
<field name="res_model">maintenance.equipment.image</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="domain">[]</field>
|
||||||
|
</record>
|
||||||
|
<menuitem
|
||||||
|
id="maintenance_equipment_image_form"
|
||||||
|
name="设备图文展示"
|
||||||
|
parent="maintenance.menu_m_request"
|
||||||
|
action="action_maintenance_equipment_image"
|
||||||
|
groups="maintenance.group_equipment_manager,base.group_user"
|
||||||
|
sequence="2"/>
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -11,13 +11,18 @@ class ResWorkcenter(models.Model):
|
|||||||
production_line_show = fields.Char(string='生产线名称')
|
production_line_show = fields.Char(string='生产线名称')
|
||||||
machine_tool_id = fields.Many2one('sf.machine_tool', string='机床')
|
machine_tool_id = fields.Many2one('sf.machine_tool', string='机床')
|
||||||
production_line_id = fields.Many2one('sf.production.line', string='生产线')
|
production_line_id = fields.Many2one('sf.production.line', string='生产线')
|
||||||
is_process_outsourcing = fields.Boolean('工艺外协')
|
|
||||||
users_ids = fields.Many2many("res.users", 'users_workcenter')
|
|
||||||
|
|
||||||
equipment_id = fields.Many2one(
|
equipment_id = fields.Many2one(
|
||||||
'maintenance.equipment', string="设备",
|
'maintenance.equipment', string="设备",
|
||||||
check_company=True)
|
check_company=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
is_process_outsourcing = fields.Boolean('工艺外协')
|
||||||
|
users_ids = fields.Many2many("res.users", 'users_workcenter')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
equipment_status = fields.Selection(
|
equipment_status = fields.Selection(
|
||||||
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
|
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
|
||||||
string="设备状态", compute='_compute_equipment_id')
|
string="设备状态", compute='_compute_equipment_id')
|
||||||
|
|||||||
Reference in New Issue
Block a user