Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug
This commit is contained in:
@@ -31,7 +31,7 @@ export class MyCustomWidget extends Many2ManyCheckboxesField {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyCustomWidget.template = "sf_plan.MyCustomWidget"
|
MyCustomWidget.template = "jikimo_frontend.MyCustomWidget"
|
||||||
// MyCustomWidget.supportedTypes = ['many2many'];
|
// MyCustomWidget.supportedTypes = ['many2many'];
|
||||||
|
|
||||||
registry.category("fields").add("custom_many2many_checkboxes", MyCustomWidget);
|
registry.category("fields").add("custom_many2many_checkboxes", MyCustomWidget);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<templates xml:space="preserve">
|
<templates xml:space="preserve">
|
||||||
|
|
||||||
<t t-name="sf_plan.MyCustomWidget" owl="1">
|
<t t-name="jikimo_frontend.MyCustomWidget" owl="1">
|
||||||
<div aria-atomic="true" class="many2many_flex">
|
<div aria-atomic="true" class="many2many_flex">
|
||||||
<t t-foreach="items" t-as="item" t-key="item[0]">
|
<t t-foreach="items" t-as="item" t-key="item[0]">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ class StockRule(models.Model):
|
|||||||
productions = self.env['sf.production.plan'].with_user(SUPERUSER_ID).sudo().with_company(company_id). \
|
productions = self.env['sf.production.plan'].with_user(SUPERUSER_ID).sudo().with_company(company_id). \
|
||||||
create({
|
create({
|
||||||
'name': production.name,
|
'name': production.name,
|
||||||
|
'order_deadline': sale_order.deadline_of_delivery,
|
||||||
'production_id': production.id,
|
'production_id': production.id,
|
||||||
'date_planned_start': production.date_planned_start,
|
'date_planned_start': production.date_planned_start,
|
||||||
'origin': production.origin,
|
'origin': production.origin,
|
||||||
|
|||||||
@@ -8,6 +8,37 @@ class SuitableMachiningMethod(models.Model):
|
|||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
image = fields.Image('图片')
|
image = fields.Image('图片')
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||||
|
# 调用父类的name_search方法,获取原始的结果列表
|
||||||
|
res = super().name_search(name, args, operator, limit)
|
||||||
|
# 定义一个空字典用来存储id和name的映射关系
|
||||||
|
name_dict = {}
|
||||||
|
# 遍历结果列表,将id和name存入字典中
|
||||||
|
for item in res:
|
||||||
|
id = item[0]
|
||||||
|
name = item[1]
|
||||||
|
name_dict[id] = name
|
||||||
|
# 根据id列表搜索符合条件的记录
|
||||||
|
records = self.browse(name_dict.keys())
|
||||||
|
# 定义一个新的结果列表用来存储修改后的结果
|
||||||
|
new_res = []
|
||||||
|
# 遍历每条记录
|
||||||
|
for record in records:
|
||||||
|
# 获取记录的id,name和image属性
|
||||||
|
id = record.id
|
||||||
|
name = name_dict[id]
|
||||||
|
image = record.image
|
||||||
|
# 如果image不为空,将其转换为data URI scheme
|
||||||
|
if image:
|
||||||
|
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
||||||
|
else:
|
||||||
|
data_uri = ""
|
||||||
|
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
||||||
|
new_res.append([id, name, data_uri])
|
||||||
|
# 返回新的结果列表
|
||||||
|
return new_res
|
||||||
|
|
||||||
|
|
||||||
class BladeTipCharacteristics(models.Model):
|
class BladeTipCharacteristics(models.Model):
|
||||||
_name = 'sf.blade.tip.characteristics'
|
_name = 'sf.blade.tip.characteristics'
|
||||||
@@ -16,6 +47,37 @@ class BladeTipCharacteristics(models.Model):
|
|||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
image = fields.Image('图片')
|
image = fields.Image('图片')
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||||
|
# 调用父类的name_search方法,获取原始的结果列表
|
||||||
|
res = super().name_search(name, args, operator, limit)
|
||||||
|
# 定义一个空字典用来存储id和name的映射关系
|
||||||
|
name_dict = {}
|
||||||
|
# 遍历结果列表,将id和name存入字典中
|
||||||
|
for item in res:
|
||||||
|
id = item[0]
|
||||||
|
name = item[1]
|
||||||
|
name_dict[id] = name
|
||||||
|
# 根据id列表搜索符合条件的记录
|
||||||
|
records = self.browse(name_dict.keys())
|
||||||
|
# 定义一个新的结果列表用来存储修改后的结果
|
||||||
|
new_res = []
|
||||||
|
# 遍历每条记录
|
||||||
|
for record in records:
|
||||||
|
# 获取记录的id,name和image属性
|
||||||
|
id = record.id
|
||||||
|
name = name_dict[id]
|
||||||
|
image = record.image
|
||||||
|
# 如果image不为空,将其转换为data URI scheme
|
||||||
|
if image:
|
||||||
|
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
||||||
|
else:
|
||||||
|
data_uri = ""
|
||||||
|
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
||||||
|
new_res.append([id, name, data_uri])
|
||||||
|
# 返回新的结果列表
|
||||||
|
return new_res
|
||||||
|
|
||||||
|
|
||||||
class HandleType(models.Model):
|
class HandleType(models.Model):
|
||||||
_name = 'sf.handle.type'
|
_name = 'sf.handle.type'
|
||||||
@@ -24,6 +86,37 @@ class HandleType(models.Model):
|
|||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
image = fields.Image('图片')
|
image = fields.Image('图片')
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||||
|
# 调用父类的name_search方法,获取原始的结果列表
|
||||||
|
res = super().name_search(name, args, operator, limit)
|
||||||
|
# 定义一个空字典用来存储id和name的映射关系
|
||||||
|
name_dict = {}
|
||||||
|
# 遍历结果列表,将id和name存入字典中
|
||||||
|
for item in res:
|
||||||
|
id = item[0]
|
||||||
|
name = item[1]
|
||||||
|
name_dict[id] = name
|
||||||
|
# 根据id列表搜索符合条件的记录
|
||||||
|
records = self.browse(name_dict.keys())
|
||||||
|
# 定义一个新的结果列表用来存储修改后的结果
|
||||||
|
new_res = []
|
||||||
|
# 遍历每条记录
|
||||||
|
for record in records:
|
||||||
|
# 获取记录的id,name和image属性
|
||||||
|
id = record.id
|
||||||
|
name = name_dict[id]
|
||||||
|
image = record.image
|
||||||
|
# 如果image不为空,将其转换为data URI scheme
|
||||||
|
if image:
|
||||||
|
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
||||||
|
else:
|
||||||
|
data_uri = ""
|
||||||
|
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
||||||
|
new_res.append([id, name, data_uri])
|
||||||
|
# 返回新的结果列表
|
||||||
|
return new_res
|
||||||
|
|
||||||
|
|
||||||
class CuttingDirection(models.Model):
|
class CuttingDirection(models.Model):
|
||||||
_name = 'sf.cutting.direction'
|
_name = 'sf.cutting.direction'
|
||||||
@@ -32,6 +125,37 @@ class CuttingDirection(models.Model):
|
|||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
image = fields.Image('图片')
|
image = fields.Image('图片')
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||||
|
# 调用父类的name_search方法,获取原始的结果列表
|
||||||
|
res = super().name_search(name, args, operator, limit)
|
||||||
|
# 定义一个空字典用来存储id和name的映射关系
|
||||||
|
name_dict = {}
|
||||||
|
# 遍历结果列表,将id和name存入字典中
|
||||||
|
for item in res:
|
||||||
|
id = item[0]
|
||||||
|
name = item[1]
|
||||||
|
name_dict[id] = name
|
||||||
|
# 根据id列表搜索符合条件的记录
|
||||||
|
records = self.browse(name_dict.keys())
|
||||||
|
# 定义一个新的结果列表用来存储修改后的结果
|
||||||
|
new_res = []
|
||||||
|
# 遍历每条记录
|
||||||
|
for record in records:
|
||||||
|
# 获取记录的id,name和image属性
|
||||||
|
id = record.id
|
||||||
|
name = name_dict[id]
|
||||||
|
image = record.image
|
||||||
|
# 如果image不为空,将其转换为data URI scheme
|
||||||
|
if image:
|
||||||
|
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
||||||
|
else:
|
||||||
|
data_uri = ""
|
||||||
|
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
||||||
|
new_res.append([id, name, data_uri])
|
||||||
|
# 返回新的结果列表
|
||||||
|
return new_res
|
||||||
|
|
||||||
|
|
||||||
class SuitableCoolant(models.Model):
|
class SuitableCoolant(models.Model):
|
||||||
_name = 'sf.suitable.coolant'
|
_name = 'sf.suitable.coolant'
|
||||||
@@ -40,6 +164,37 @@ class SuitableCoolant(models.Model):
|
|||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
image = fields.Image('图片')
|
image = fields.Image('图片')
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||||
|
# 调用父类的name_search方法,获取原始的结果列表
|
||||||
|
res = super().name_search(name, args, operator, limit)
|
||||||
|
# 定义一个空字典用来存储id和name的映射关系
|
||||||
|
name_dict = {}
|
||||||
|
# 遍历结果列表,将id和name存入字典中
|
||||||
|
for item in res:
|
||||||
|
id = item[0]
|
||||||
|
name = item[1]
|
||||||
|
name_dict[id] = name
|
||||||
|
# 根据id列表搜索符合条件的记录
|
||||||
|
records = self.browse(name_dict.keys())
|
||||||
|
# 定义一个新的结果列表用来存储修改后的结果
|
||||||
|
new_res = []
|
||||||
|
# 遍历每条记录
|
||||||
|
for record in records:
|
||||||
|
# 获取记录的id,name和image属性
|
||||||
|
id = record.id
|
||||||
|
name = name_dict[id]
|
||||||
|
image = record.image
|
||||||
|
# 如果image不为空,将其转换为data URI scheme
|
||||||
|
if image:
|
||||||
|
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
||||||
|
else:
|
||||||
|
data_uri = ""
|
||||||
|
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
||||||
|
new_res.append([id, name, data_uri])
|
||||||
|
# 返回新的结果列表
|
||||||
|
return new_res
|
||||||
|
|
||||||
|
|
||||||
class CuttingSpeed(models.Model):
|
class CuttingSpeed(models.Model):
|
||||||
_name = 'sf.cutting.speed'
|
_name = 'sf.cutting.speed'
|
||||||
|
|||||||
@@ -12,11 +12,26 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="sf_suitable_machining_method_form">
|
||||||
|
<field name="name">适合加工方式</field>
|
||||||
|
<field name="model">sf.suitable.machining.method</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="sf_suitable_machining_method_act" model="ir.actions.act_window">
|
<record id="sf_suitable_machining_method_act" 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.suitable.machining.method</field>
|
<field name="res_model">sf.suitable.machining.method</field>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
@@ -32,11 +47,26 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="sf_blade_tip_characteristics_form">
|
||||||
|
<field name="name">刀尖特征</field>
|
||||||
|
<field name="model">sf.blade.tip.characteristics</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="sf_blade_tip_characteristics_act" model="ir.actions.act_window">
|
<record id="sf_blade_tip_characteristics_act" 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.blade.tip.characteristics</field>
|
<field name="res_model">sf.blade.tip.characteristics</field>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
@@ -52,11 +82,26 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="sf_handle_type_forme">
|
||||||
|
<field name="name">柄部类型</field>
|
||||||
|
<field name="model">sf.handle.type</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="sf_handle_type_act" model="ir.actions.act_window">
|
<record id="sf_handle_type_act" 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.handle.type</field>
|
<field name="res_model">sf.handle.type</field>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
@@ -72,11 +117,26 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="sf_cutting_direction_form">
|
||||||
|
<field name="name">走刀方向</field>
|
||||||
|
<field name="model">sf.cutting.direction</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="sf_cutting_direction_act" model="ir.actions.act_window">
|
<record id="sf_cutting_direction_act" 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.cutting.direction</field>
|
<field name="res_model">sf.cutting.direction</field>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
@@ -92,11 +152,24 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="sf_suitable_coolant_form">
|
||||||
|
<field name="name">适合冷却液</field>
|
||||||
|
<field name="model">sf.suitable.coolant</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="image" widget="image"/>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="sf_suitable_coolant_act" model="ir.actions.act_window">
|
<record id="sf_suitable_coolant_act" 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.suitable.coolant</field>
|
<field name="res_model">sf.suitable.coolant</field>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,25 +12,46 @@ class sf_production_plan(models.Model):
|
|||||||
# _inherit = 'mrp.production'
|
# _inherit = 'mrp.production'
|
||||||
_description = 'sf_production_plan'
|
_description = 'sf_production_plan'
|
||||||
|
|
||||||
name = fields.Char(string='名称')
|
state = fields.Selection([
|
||||||
|
('draft', '待排程'),
|
||||||
|
('done', '已排程'),
|
||||||
|
('processing', '已加工'),
|
||||||
|
('finished', '已完成')
|
||||||
|
], string='工单状态', tracking=True)
|
||||||
|
name = fields.Char(string='工单编号')
|
||||||
# selected = fields.Boolean(default=False)
|
# selected = fields.Boolean(default=False)
|
||||||
|
# order_number = fields.Char(string='订单号')
|
||||||
|
order_deadline = fields.Datetime(string='订单交期')
|
||||||
production_id = fields.Many2one('mrp.production', '关联制造订单')
|
production_id = fields.Many2one('mrp.production', '关联制造订单')
|
||||||
product_qty = fields.Float(string='数量', digits='Product Unit of Measure', required=True, default=0.0)
|
product_qty = fields.Float(string='数量', digits='Product Unit of Measure', required=True, default=0.0)
|
||||||
|
production_line_id = fields.Many2one('sf.production.line', string='生产线')
|
||||||
date_planned_start = fields.Datetime(string='计划开始时间', required=True, index=True, copy=False,
|
date_planned_start = fields.Datetime(string='计划开始时间', required=True, index=True, copy=False,
|
||||||
default=fields.Datetime.now)
|
default=fields.Datetime.now)
|
||||||
date_planned_finished = fields.Datetime(string='计划结束时间')
|
date_planned_finished = fields.Datetime(string='计划结束时间')
|
||||||
state = fields.Selection([
|
# 排程设置selection(倒排,顺排,默认倒排)
|
||||||
('draft', '未排程'), ('done', '已排程')], string='状态', copy=False, index=True, readonly=True,
|
schedule_setting = fields.Selection([
|
||||||
store=True)
|
('reverse', '倒排'), ('positive', '顺排')], string='排程设置', default='reverse')
|
||||||
product_id = fields.Many2one('product.product', '关联产品')
|
product_id = fields.Many2one('product.product', '关联产品')
|
||||||
origin = fields.Char(string='来源')
|
origin = fields.Char(string='订单号')
|
||||||
|
# 加工时长
|
||||||
|
process_time = fields.Float(string='加工时长', digits=(16, 2))
|
||||||
|
# 实际加工时长、实际开始时间、实际结束时间
|
||||||
|
actual_process_time = fields.Float(string='实际加工时长', digits=(16, 2))
|
||||||
|
actual_start_time = fields.Datetime(string='实际开始时间')
|
||||||
|
actual_end_time = fields.Datetime(string='实际结束时间')
|
||||||
|
shift = fields.Char(string='班次')
|
||||||
|
|
||||||
|
|
||||||
# 序号、坯料编号、坯料名称、材质、数量、长度、宽度、厚度、直径、计划开始时间、计划结束时间、状态(已产出与待产出)、操作、创建人、创建时间、客户名称、订单号、行号、长度、宽度、厚度、直径、交货数量、交货日期
|
# 序号、坯料编号、坯料名称、材质、数量、长度、宽度、厚度、直径、计划开始时间、计划结束时间、状态(已产出与待产出)、操作、创建人、创建时间、客户名称、订单号、行号、长度、宽度、厚度、直径、交货数量、交货日期
|
||||||
# sequence = fields.Integer(string='序号', required=True, copy=False, readonly=True, index=True,
|
# sequence = fields.Integer(string='序号', required=True, copy=False, readonly=True, index=True,
|
||||||
# default=lambda self: self.env['ir.sequence'].sudo().next_by_code('sf.pl.plan'))
|
# default=lambda self: self.env['ir.sequence'].sudo().next_by_code('sf.pl.plan'))
|
||||||
sequence = fields.Integer(string='序号', copy=False, readonly=True, index=True)
|
sequence = fields.Integer(string='序号', copy=False, readonly=True, index=True)
|
||||||
current_operation_name = fields.Char(string='当前工序名称', size=64, default='生产计划')
|
current_operation_name = fields.Char(string='当前工序名称', size=64, default='生产计划')
|
||||||
production_line_id = fields.Many2one('sf.production.line', string='生产线')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# state = fields.Selection([
|
# state = fields.Selection([
|
||||||
# ('未排程', '未排程'), ('已排程', '已排程')], string='State', copy=False, index=True, readonly=True,
|
# ('未排程', '未排程'), ('已排程', '已排程')], string='State', copy=False, index=True, readonly=True,
|
||||||
|
|||||||
@@ -9,11 +9,15 @@
|
|||||||
<!-- <field name="selected" widget="boolean_toggle"/> -->
|
<!-- <field name="selected" widget="boolean_toggle"/> -->
|
||||||
<!-- sequence、pl_no、pl_name、quantity、plan_start_time、plan_end_time、actual_start_time、actual_end_time、state、create_uid、create_date -->
|
<!-- sequence、pl_no、pl_name、quantity、plan_start_time、plan_end_time、actual_start_time、actual_end_time、state、create_uid、create_date -->
|
||||||
<!-- <field name="sequence"/> -->
|
<!-- <field name="sequence"/> -->
|
||||||
|
<field name="state" widget="badge" decoration-warning="state == 'draft'" decoration-success="state == 'done'"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
<field name="origin"/>
|
||||||
|
<field name="order_deadline"/>
|
||||||
<field name="product_qty"/>
|
<field name="product_qty"/>
|
||||||
|
<field name="production_line_id"/>
|
||||||
<field name="date_planned_start"/>
|
<field name="date_planned_start"/>
|
||||||
<field name="date_planned_finished"/>
|
<field name="date_planned_finished"/>
|
||||||
<field name="state" widget="badge" decoration-warning="state == 'draft'" decoration-success="state == 'done'"/>
|
<field name="schedule_setting"/>
|
||||||
<button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object" attrs="{'invisible': [('state', 'not in', ['draft'])]}"/>
|
<button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object" attrs="{'invisible': [('state', 'not in', ['draft'])]}"/>
|
||||||
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程" type="object" attrs="{'invisible': [('state', 'not in', ['done'])]}"/>
|
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程" type="object" attrs="{'invisible': [('state', 'not in', ['done'])]}"/>
|
||||||
</tree>
|
</tree>
|
||||||
@@ -28,6 +32,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<!-- <button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" icon="fa-step-forward"/> -->
|
<!-- <button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" icon="fa-step-forward"/> -->
|
||||||
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight"/>
|
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight"/>
|
||||||
|
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"/>
|
||||||
<!-- <button string="销售单" name="test_sale_order" type="object" class="oe_highlight"/> -->
|
<!-- <button string="销售单" name="test_sale_order" type="object" class="oe_highlight"/> -->
|
||||||
<!-- <button string="测试流程" name="liucheng_cs" type="object" class="oe_highlight"/> -->
|
<!-- <button string="测试流程" name="liucheng_cs" type="object" class="oe_highlight"/> -->
|
||||||
<!-- <field name="state" widget="statusbar" statusbar_visible="draft,produce"/> -->
|
<!-- <field name="state" widget="statusbar" statusbar_visible="draft,produce"/> -->
|
||||||
@@ -40,14 +45,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group string="基本信息">
|
<group string="基本信息">
|
||||||
<field name="production_id"/>
|
<field name="production_id" widget="many2one_button"/>
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="origin"/>
|
<field name="origin"/>
|
||||||
<field name="product_qty"/>
|
<field name="product_qty"/>
|
||||||
|
<field name="order_deadline"/>
|
||||||
|
<field name="process_time"/>
|
||||||
|
<field name="schedule_setting"/>
|
||||||
|
<field name="production_line_id"/>
|
||||||
<field name="date_planned_start"/>
|
<field name="date_planned_start"/>
|
||||||
<field name="date_planned_finished"/>
|
<field name="date_planned_finished"/>
|
||||||
|
<field name="actual_process_time"/>
|
||||||
|
<field name="actual_start_time"/>
|
||||||
|
<field name="actual_end_time"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<field name="production_line_id"/>
|
<field name="shift" widget="time"/>
|
||||||
</group>
|
</group>
|
||||||
<!-- <group string="规格信息" col="1"> -->
|
<!-- <group string="规格信息" col="1"> -->
|
||||||
<!-- <group col="3"> -->
|
<!-- <group col="3"> -->
|
||||||
@@ -115,8 +127,11 @@
|
|||||||
color="production_line_id"
|
color="production_line_id"
|
||||||
decoration-success="state == 'done'"
|
decoration-success="state == 'done'"
|
||||||
progress_bar="name"
|
progress_bar="name"
|
||||||
form_view_id="sf_production_plan_form">
|
form_view_id="sf_production_plan_form"
|
||||||
|
default_scale="year"
|
||||||
|
scales="day,week,month,year"
|
||||||
|
precision="{'day': 'hour:quarter', 'week': 'day:half', 'month': 'day', 'year': 'month:quarter'}">
|
||||||
|
<field name="shift"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="product_qty"/>
|
<field name="product_qty"/>
|
||||||
<field name="date_planned_start"/>
|
<field name="date_planned_start"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user