Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/订单计划
This commit is contained in:
@@ -184,6 +184,7 @@ class WorkLogSetting(models.Model):
|
|||||||
'name_id': self.id,
|
'name_id': self.id,
|
||||||
'calendar_code': self.code,
|
'calendar_code': self.code,
|
||||||
'date_time': single_date})
|
'date_time': single_date})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def daterange(start_date, end_date):
|
def daterange(start_date, end_date):
|
||||||
"""
|
"""
|
||||||
@@ -193,6 +194,12 @@ class WorkLogSetting(models.Model):
|
|||||||
for n in range(int((end_date - start_date).days)):
|
for n in range(int((end_date - start_date).days)):
|
||||||
yield start_date + timedelta(n)
|
yield start_date + timedelta(n)
|
||||||
|
|
||||||
|
def open_work_schedule_calendar(self):
|
||||||
|
action = self.env.ref('sf_plan_management.sf_work_schedule_calendar_act')
|
||||||
|
result = action.read()[0]
|
||||||
|
result['domain'] = [('name_id', '=', self.id)]
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
class WorkingShift(models.Model):
|
class WorkingShift(models.Model):
|
||||||
_name = 'sf.working.shift'
|
_name = 'sf.working.shift'
|
||||||
|
|||||||
@@ -40,10 +40,10 @@
|
|||||||
sequence="15"
|
sequence="15"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menuitem id="menu_sf_work_schedule_calendar"
|
<!-- <menuitem id="menu_sf_work_schedule_calendar"-->
|
||||||
name="工作日历"
|
<!-- name="工作日历"-->
|
||||||
parent="menu_sf_basic_setting"
|
<!-- parent="menu_sf_basic_setting"-->
|
||||||
action="sf_work_schedule_calendar_act"
|
<!-- action="sf_work_schedule_calendar_act"-->
|
||||||
sequence="15"
|
<!-- sequence="15"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -16,7 +16,11 @@
|
|||||||
<field name="status"/>
|
<field name="status"/>
|
||||||
<field name="update_person"/>
|
<field name="update_person"/>
|
||||||
<field name="update_time"/>
|
<field name="update_time"/>
|
||||||
<!-- <button string="查看日历" type="object" name="sf_work_schedule_calendar_act"/>-->
|
<button string="查看日历"
|
||||||
|
type="object"
|
||||||
|
name="open_work_schedule_calendar"
|
||||||
|
class="oe_highlight"
|
||||||
|
/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
# string='换刀需求信息',
|
# string='换刀需求信息',
|
||||||
# attrs="{'invisible': 1}")
|
# attrs="{'invisible': 1}")
|
||||||
|
|
||||||
CNC_machine_table = fields.Char(string='CNC机床')
|
name = fields.Char(string='CNC机床')
|
||||||
# todo 机床类型和刀位号 为 Many2one
|
# todo 机床类型和刀位号 为 Many2one
|
||||||
machine_table_type = fields.Char(string='机床类型')
|
machine_table_type = fields.Char(string='机床类型')
|
||||||
machine_tool_code = fields.Char(string='机台号', attrs="{'invisible': 1}")
|
machine_tool_code = fields.Char(string='机台号', attrs="{'invisible': 1}")
|
||||||
@@ -151,7 +151,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
# todo 自动换刀申请条件需补充完善
|
# todo 自动换刀申请条件需补充完善
|
||||||
if(self.functional_tool_status == '异常'):
|
if(self.functional_tool_status == '异常'):
|
||||||
self.env['sf.machine.table.tool.changing.apply'].search([
|
self.env['sf.machine.table.tool.changing.apply'].search([
|
||||||
('CNC_machine_table', '=', self.CNC_machine_table)]).write({
|
('name', '=', self.name)]).write({
|
||||||
'replacement_tool_code': self.functional_tool_code,
|
'replacement_tool_code': self.functional_tool_code,
|
||||||
'replacement_tool_name': self.functional_tool_name,
|
'replacement_tool_name': self.functional_tool_name,
|
||||||
'replacement_tool_type': self.functional_tool_type,
|
'replacement_tool_type': self.functional_tool_type,
|
||||||
@@ -167,7 +167,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
# 新建组装任务
|
# 新建组装任务
|
||||||
self.env['sf.functional.tool.assembly'].create({
|
self.env['sf.functional.tool.assembly'].create({
|
||||||
'functional_tool_code': self.functional_tool_code,
|
'functional_tool_code': self.functional_tool_code,
|
||||||
'functional_tool_name': self.functional_tool_name,
|
'name': self.functional_tool_name,
|
||||||
'functional_tool_type': self.functional_tool_type,
|
'functional_tool_type': self.functional_tool_type,
|
||||||
'functional_tool_diameter': self.diameter,
|
'functional_tool_diameter': self.diameter,
|
||||||
'loading_task_source': '1',
|
'loading_task_source': '1',
|
||||||
@@ -189,7 +189,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
"""
|
"""
|
||||||
# 增加设置直径的值
|
# 增加设置直径的值
|
||||||
tool_changing_apply = self.env['sf.machine.table.tool.changing.apply'].search(
|
tool_changing_apply = self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
[('CNC_machine_table', '=', vals['machine_tool_name'])])
|
[('name', '=', vals['name'])])
|
||||||
vals['functional_tool_diameter'] = tool_changing_apply.diameter
|
vals['functional_tool_diameter'] = tool_changing_apply.diameter
|
||||||
|
|
||||||
self.env['sf.functional.tool.assembly'].create(vals)
|
self.env['sf.functional.tool.assembly'].create(vals)
|
||||||
@@ -201,7 +201,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
# 撤回数据更新
|
# 撤回数据更新
|
||||||
self.env['sf.machine.table.tool.changing.apply'].search([('CNC_machine_table', '=', self.CNC_machine_table)]).write({
|
self.env['sf.machine.table.tool.changing.apply'].search([('name', '=', self.name)]).write({
|
||||||
'replacement_tool_code': None,
|
'replacement_tool_code': None,
|
||||||
'replacement_tool_name': None,
|
'replacement_tool_name': None,
|
||||||
'replacement_tool_type': None,
|
'replacement_tool_type': None,
|
||||||
@@ -225,7 +225,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
self.env['sf.machine.table.tool.changing.apply'].search(
|
self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
[('CNC_machine_table', '=', self.CNC_machine_table)]).write({
|
[('name', '=', self.name)]).write({
|
||||||
'status': '0'
|
'status': '0'
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
_name = 'sf.cam.work.order.program.knife.plan'
|
_name = 'sf.cam.work.order.program.knife.plan'
|
||||||
_description = 'CAM工单程序用刀计划'
|
_description = 'CAM工单程序用刀计划'
|
||||||
|
|
||||||
ticket_task_code = fields.Char(string='工单任务编号')
|
name = fields.Char(string='工单任务编号')
|
||||||
cam_procedure_code = fields.Char(string='CAM程序编号')
|
cam_procedure_code = fields.Char(string='CAM程序编号')
|
||||||
cam_cutter_spacing_code = fields.Char(string='CAM刀位号')
|
cam_cutter_spacing_code = fields.Char(string='CAM刀位号')
|
||||||
functional_tool_code = fields.Char(string='功能刀具编码')
|
functional_tool_code = fields.Char(string='功能刀具编码')
|
||||||
@@ -263,7 +263,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
"""
|
"""
|
||||||
self.env['sf.functional.tool.assembly'].create({
|
self.env['sf.functional.tool.assembly'].create({
|
||||||
'functional_tool_code': self.functional_tool_code,
|
'functional_tool_code': self.functional_tool_code,
|
||||||
'functional_tool_name': self.functional_tool_name,
|
'name': self.functional_tool_name,
|
||||||
'functional_tool_type': self.functional_tool_type,
|
'functional_tool_type': self.functional_tool_type,
|
||||||
'functional_tool_diameter': self.diameter,
|
'functional_tool_diameter': self.diameter,
|
||||||
'functional_tool_length': self.tool_loading_length,
|
'functional_tool_length': self.tool_loading_length,
|
||||||
@@ -304,7 +304,7 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
_order = 'use_tool_time asc'
|
_order = 'use_tool_time asc'
|
||||||
|
|
||||||
functional_tool_code = fields.Char(string='功能刀具编码')
|
functional_tool_code = fields.Char(string='功能刀具编码')
|
||||||
functional_tool_name = fields.Char(string='功能刀具名称')
|
name = fields.Char(string='功能刀具名称')
|
||||||
functional_tool_type = fields.Char(string='功能刀具类型')
|
functional_tool_type = fields.Char(string='功能刀具类型')
|
||||||
functional_tool_diameter = fields.Char(string='功能刀具直径')
|
functional_tool_diameter = fields.Char(string='功能刀具直径')
|
||||||
functional_tool_length = fields.Char(string='功能刀具伸出长')
|
functional_tool_length = fields.Char(string='功能刀具伸出长')
|
||||||
@@ -389,7 +389,7 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
for val in vals:
|
for val in vals:
|
||||||
self.env['sf.delivery.of.cargo.from.storage'].create({
|
self.env['sf.delivery.of.cargo.from.storage'].create({
|
||||||
'functional_tool_code': val.functional_tool_code,
|
'functional_tool_code': val.functional_tool_code,
|
||||||
'functional_tool_name': val.functional_tool_name,
|
'name': val.name,
|
||||||
'functional_tool_type': val.functional_tool_type,
|
'functional_tool_type': val.functional_tool_type,
|
||||||
'production_line_name': val.production_line_name,
|
'production_line_name': val.production_line_name,
|
||||||
'machine_tool_code': val.machine_tool_code,
|
'machine_tool_code': val.machine_tool_code,
|
||||||
@@ -399,7 +399,7 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
else:
|
else:
|
||||||
self.env['sf.delivery.of.cargo.from.storage'].create({
|
self.env['sf.delivery.of.cargo.from.storage'].create({
|
||||||
'functional_tool_code': self.functional_tool_code,
|
'functional_tool_code': self.functional_tool_code,
|
||||||
'functional_tool_name': self.functional_tool_name,
|
'name': self.name,
|
||||||
'functional_tool_type': self.functional_tool_type,
|
'functional_tool_type': self.functional_tool_type,
|
||||||
'production_line_name': self.production_line_name,
|
'production_line_name': self.production_line_name,
|
||||||
'machine_tool_code': self.machine_tool_code,
|
'machine_tool_code': self.machine_tool_code,
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
<field name="model">sf.machine.table.tool.changing.apply</field>
|
<field name="model">sf.machine.table.tool.changing.apply</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree>
|
<tree>
|
||||||
<field name="CNC_machine_table"/>
|
<field name="name"/>
|
||||||
<field name="machine_tool_code" invisible="1"/>
|
<field name="machine_tool_code" invisible="1"/>
|
||||||
<field name="machine_table_type"/>
|
<field name="machine_table_type"/>
|
||||||
<field name="cutter_spacing_code"/>
|
<field name="cutter_spacing_code"/>
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
<button string="换刀申请"
|
<button string="换刀申请"
|
||||||
name="%(sf_tool_management.sf_tool_change_requirement_information_act)d"
|
name="%(sf_tool_management.sf_tool_change_requirement_information_act)d"
|
||||||
type="action"
|
type="action"
|
||||||
context="{ 'default_CNC_machine_table':CNC_machine_table,
|
context="{ 'default_name':name,
|
||||||
'default_machine_tool_code': machine_tool_code,
|
'default_machine_tool_code': machine_tool_code,
|
||||||
'default_cutter_spacing_code': cutter_spacing_code,
|
'default_cutter_spacing_code': cutter_spacing_code,
|
||||||
'default_replacement_tool_code': functional_tool_code,
|
'default_replacement_tool_code': functional_tool_code,
|
||||||
@@ -204,11 +204,11 @@
|
|||||||
<button string="转移"
|
<button string="转移"
|
||||||
name="%(sf_tool_management.sf_tool_transfer_request_information_act)d"
|
name="%(sf_tool_management.sf_tool_transfer_request_information_act)d"
|
||||||
type="action"
|
type="action"
|
||||||
context="{ 'default_CNC_machine_table':CNC_machine_table,
|
context="{ 'default_name':name,
|
||||||
'default_machine_tool_code': machine_tool_code,
|
'default_machine_tool_code': machine_tool_code,
|
||||||
'default_cutter_spacing_code': cutter_spacing_code,
|
'default_cutter_spacing_code': cutter_spacing_code,
|
||||||
'default_functional_tool_code': functional_tool_code,
|
'default_functional_tool_code': functional_tool_code,
|
||||||
'default_functional_tool_name': functional_tool_name,
|
'default_name': functional_tool_name,
|
||||||
'default_functional_tool_type': functional_tool_type}"
|
'default_functional_tool_type': functional_tool_type}"
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
attrs="{'invisible': [('status', '!=', '0')]}"
|
attrs="{'invisible': [('status', '!=', '0')]}"
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
<field name="model">sf.machine.table.tool.changing.apply</field>
|
<field name="model">sf.machine.table.tool.changing.apply</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<field name="CNC_machine_table"/>
|
<field name="name"/>
|
||||||
<field name="machine_tool_code" invisible="1"/>
|
<field name="machine_tool_code" invisible="1"/>
|
||||||
<field name="machine_table_type"/>
|
<field name="machine_table_type"/>
|
||||||
<field name="cutter_spacing_code"/>
|
<field name="cutter_spacing_code"/>
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree>
|
<tree>
|
||||||
<field name="ticket_task_code"/>
|
<field name="name"/>
|
||||||
<field name="cam_procedure_code"/>
|
<field name="cam_procedure_code"/>
|
||||||
<field name="cam_cutter_spacing_code"/>
|
<field name="cam_cutter_spacing_code"/>
|
||||||
<field name="functional_tool_code"/>
|
<field name="functional_tool_code"/>
|
||||||
@@ -303,12 +303,12 @@
|
|||||||
<button string="装刀申请"
|
<button string="装刀申请"
|
||||||
name="%(sf_tool_management.sf_apply_for_tooling_act)d"
|
name="%(sf_tool_management.sf_apply_for_tooling_act)d"
|
||||||
type="action"
|
type="action"
|
||||||
context="{ 'default_ticket_task_code':ticket_task_code,
|
context="{ 'default_name':name,
|
||||||
'default_cam_procedure_code': cam_procedure_code,
|
'default_cam_procedure_code': cam_procedure_code,
|
||||||
'default_machine_table_name': machine_table_name,
|
'default_machine_table_name': machine_table_name,
|
||||||
'default_cam_cutter_spacing_code': cam_cutter_spacing_code,
|
'default_cam_cutter_spacing_code': cam_cutter_spacing_code,
|
||||||
'default_functional_tool_code': functional_tool_code,
|
'default_functional_tool_code': functional_tool_code,
|
||||||
'default_functional_tool_name': functional_tool_name,
|
'default_name': functional_tool_name,
|
||||||
'default_functional_tool_type': functional_tool_type,
|
'default_functional_tool_type': functional_tool_type,
|
||||||
'default_diameter': diameter,
|
'default_diameter': diameter,
|
||||||
'default_tool_loading_length': tool_loading_length,
|
'default_tool_loading_length': tool_loading_length,
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<field name="ticket_task_code"/>
|
<field name="name"/>
|
||||||
<field name="cam_procedure_code"/>
|
<field name="cam_procedure_code"/>
|
||||||
<field name="cam_cutter_spacing_code"/>
|
<field name="cam_cutter_spacing_code"/>
|
||||||
<field name="functional_tool_code"/>
|
<field name="functional_tool_code"/>
|
||||||
@@ -375,7 +375,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree>
|
<tree>
|
||||||
<field name="functional_tool_code"/>
|
<field name="functional_tool_code"/>
|
||||||
<field name="functional_tool_name"/>
|
<field name="name"/>
|
||||||
<field name="functional_tool_type"/>
|
<field name="functional_tool_type"/>
|
||||||
<field name="functional_tool_diameter"/>
|
<field name="functional_tool_diameter"/>
|
||||||
<field name="functional_tool_length"/>
|
<field name="functional_tool_length"/>
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
context="{
|
context="{
|
||||||
'default_machine_tool_name': machine_tool_name,
|
'default_machine_tool_name': machine_tool_name,
|
||||||
'default_cutter_spacing_code': cutter_spacing_code,
|
'default_cutter_spacing_code': cutter_spacing_code,
|
||||||
'default_functional_tool_name': functional_tool_name,
|
'default_name': name,
|
||||||
'default_functional_tool_type': functional_tool_type,
|
'default_functional_tool_type': functional_tool_type,
|
||||||
'default_functional_tool_length': functional_tool_length,
|
'default_functional_tool_length': functional_tool_length,
|
||||||
'default_effective_length': None,
|
'default_effective_length': None,
|
||||||
@@ -449,7 +449,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<field name="functional_tool_code"/>
|
<field name="functional_tool_code"/>
|
||||||
<field name="functional_tool_name"/>
|
<field name="name"/>
|
||||||
<field name="functional_tool_type"/>
|
<field name="functional_tool_type"/>
|
||||||
<field name="functional_tool_diameter"/>
|
<field name="functional_tool_diameter"/>
|
||||||
<field name="functional_tool_length"/>
|
<field name="functional_tool_length"/>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class ToolChangeRequirementInformation(models.TransientModel):
|
|||||||
|
|
||||||
# tool_change_to_apply_id = fields.Many2one('sf.machine.table.tool.changing.apply', string='机床换刀申请')
|
# tool_change_to_apply_id = fields.Many2one('sf.machine.table.tool.changing.apply', string='机床换刀申请')
|
||||||
|
|
||||||
CNC_machine_table = fields.Char(string='CNC机床', readonly=True)
|
name = fields.Char(string='CNC机床', readonly=True)
|
||||||
machine_tool_code = fields.Char(string='机台号', readonly=True)
|
machine_tool_code = fields.Char(string='机台号', readonly=True)
|
||||||
cutter_spacing_code = fields.Char(string='刀位号', readonly=True)
|
cutter_spacing_code = fields.Char(string='刀位号', readonly=True)
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ class ToolChangeRequirementInformation(models.TransientModel):
|
|||||||
"""
|
"""
|
||||||
# 封装数据
|
# 封装数据
|
||||||
desc = {
|
desc = {
|
||||||
'CNC_machine_table': self.CNC_machine_table,
|
'name': self.name,
|
||||||
'machine_tool_code': self.machine_tool_code,
|
'machine_tool_code': self.machine_tool_code,
|
||||||
'cutter_spacing_code': self.cutter_spacing_code,
|
'cutter_spacing_code': self.cutter_spacing_code,
|
||||||
'replacement_tool_code': self.replacement_tool_code,
|
'replacement_tool_code': self.replacement_tool_code,
|
||||||
@@ -46,18 +46,18 @@ class ToolChangeRequirementInformation(models.TransientModel):
|
|||||||
print('desc:', desc)
|
print('desc:', desc)
|
||||||
# 将数据更新到机台换刀申请界面
|
# 将数据更新到机台换刀申请界面
|
||||||
self.env['sf.machine.table.tool.changing.apply'].search(
|
self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
[('CNC_machine_table', '=', desc.get('CNC_machine_table'))]).write(desc)
|
[('name', '=', desc.get('name'))]).write(desc)
|
||||||
|
|
||||||
# 功能刀具组装创建新任务
|
# 功能刀具组装创建新任务
|
||||||
self.env['sf.machine.table.tool.changing.apply'].new_assembly_task({
|
self.env['sf.machine.table.tool.changing.apply'].new_assembly_task({
|
||||||
'functional_tool_code': self.replacement_tool_code,
|
'functional_tool_code': self.replacement_tool_code,
|
||||||
'functional_tool_name': self.replacement_tool_name,
|
'name': self.replacement_tool_name,
|
||||||
'functional_tool_type': self.replacement_tool_type,
|
'functional_tool_type': self.replacement_tool_type,
|
||||||
'loading_task_source': '1',
|
'loading_task_source': '1',
|
||||||
'applicant': self.applicant,
|
'applicant': self.applicant,
|
||||||
'reason_for_applying': self.reason_for_applying,
|
'reason_for_applying': self.reason_for_applying,
|
||||||
'use_tool_time': self.used_tool_time,
|
'use_tool_time': self.used_tool_time,
|
||||||
'machine_tool_name': self.CNC_machine_table,
|
'machine_tool_name': self.name,
|
||||||
'machine_tool_code': self.machine_tool_code,
|
'machine_tool_code': self.machine_tool_code,
|
||||||
'cutter_spacing_code': self.cutter_spacing_code
|
'cutter_spacing_code': self.cutter_spacing_code
|
||||||
})
|
})
|
||||||
@@ -133,7 +133,7 @@ class ApplyForTooling(models.TransientModel):
|
|||||||
"""
|
"""
|
||||||
self.env['sf.functional.tool.assembly'].create({
|
self.env['sf.functional.tool.assembly'].create({
|
||||||
'functional_tool_code': self.functional_tool_code,
|
'functional_tool_code': self.functional_tool_code,
|
||||||
'functional_tool_name': self.functional_tool_name,
|
'name': self.functional_tool_name,
|
||||||
'functional_tool_type': self.functional_tool_type,
|
'functional_tool_type': self.functional_tool_type,
|
||||||
'functional_tool_diameter': self.diameter,
|
'functional_tool_diameter': self.diameter,
|
||||||
'functional_tool_length': self.tool_loading_length,
|
'functional_tool_length': self.tool_loading_length,
|
||||||
@@ -227,7 +227,7 @@ class DeliveryOfCargoFromStorage(models.TransientModel):
|
|||||||
|
|
||||||
order = fields.Integer(string='序')
|
order = fields.Integer(string='序')
|
||||||
functional_tool_code = fields.Char(string='功能刀具编码')
|
functional_tool_code = fields.Char(string='功能刀具编码')
|
||||||
functional_tool_name = fields.Char(string='功能刀具名称')
|
name = fields.Char(string='功能刀具名称')
|
||||||
functional_tool_type = fields.Char(string='功能刀具类型')
|
functional_tool_type = fields.Char(string='功能刀具类型')
|
||||||
production_line_name = fields.Char(string='产线名称')
|
production_line_name = fields.Char(string='产线名称')
|
||||||
machine_tool_code = fields.Char(string='机台号')
|
machine_tool_code = fields.Char(string='机台号')
|
||||||
@@ -244,7 +244,7 @@ class DeliveryOfCargoFromStorage(models.TransientModel):
|
|||||||
for val in vals:
|
for val in vals:
|
||||||
self.env['sf.functional.tool.assembly'].search([
|
self.env['sf.functional.tool.assembly'].search([
|
||||||
('functional_tool_code', '=', val.functional_tool_code),
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
('functional_tool_name', '=', val.functional_tool_name)
|
('name', '=', val.name)
|
||||||
]).write({
|
]).write({
|
||||||
'assemble_status': '2',
|
'assemble_status': '2',
|
||||||
'receive_person': self.env.user.name,
|
'receive_person': self.env.user.name,
|
||||||
@@ -253,13 +253,13 @@ class DeliveryOfCargoFromStorage(models.TransientModel):
|
|||||||
|
|
||||||
tool_assembly = self.env['sf.functional.tool.assembly'].search([
|
tool_assembly = self.env['sf.functional.tool.assembly'].search([
|
||||||
('functional_tool_code', '=', val.functional_tool_code),
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
('functional_tool_name', '=', val.functional_tool_name)
|
('name', '=', val.name)
|
||||||
])
|
])
|
||||||
# 判断装刀任务来源,如果来源于CAM装刀,则修改CAM装刀的计划执行状态
|
# 判断装刀任务来源,如果来源于CAM装刀,则修改CAM装刀的计划执行状态
|
||||||
if tool_assembly.loading_task_source == '0':
|
if tool_assembly.loading_task_source == '0':
|
||||||
self.env['sf.cam.work.order.program.knife.plan'].search([
|
self.env['sf.cam.work.order.program.knife.plan'].search([
|
||||||
('functional_tool_code', '=', val.functional_tool_code),
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
('functional_tool_name', '=', val.functional_tool_name)
|
('functional_tool_name', '=', val.name)
|
||||||
]).write({
|
]).write({
|
||||||
'plan_execute_status': '2'
|
'plan_execute_status': '2'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="CNC_machine_table"/>
|
<field name="name"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="machine_tool_code"/>
|
<field name="machine_tool_code"/>
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
<tree>
|
<tree>
|
||||||
<field name="order"/>
|
<field name="order"/>
|
||||||
<field name="functional_tool_code"/>
|
<field name="functional_tool_code"/>
|
||||||
<field name="functional_tool_name"/>
|
<field name="name"/>
|
||||||
<field name="functional_tool_type"/>
|
<field name="functional_tool_type"/>
|
||||||
<field name="production_line_name"/>
|
<field name="production_line_name"/>
|
||||||
<field name="machine_tool_code"/>
|
<field name="machine_tool_code"/>
|
||||||
|
|||||||
@@ -7,52 +7,60 @@ body.o_web_client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.list_view_sticky_header{
|
&.list_view_sticky_header {
|
||||||
// LIST VIEW STICKY HEADER AND FOOTER
|
// LIST VIEW STICKY HEADER AND FOOTER
|
||||||
.o_list_view{
|
.o_list_view {
|
||||||
.o_content .o_list_renderer.table-responsive{
|
.o_content .o_list_renderer.table-responsive {
|
||||||
overflow-x: initial;
|
overflow-x: initial;
|
||||||
.o_list_table{
|
|
||||||
|
.o_list_table {
|
||||||
thead, thead tr:nth-child(1) th {
|
thead, thead tr:nth-child(1) th {
|
||||||
position: sticky !important;
|
position: sticky !important;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
tfoot, tfoot tr:nth-child(1) td {
|
tfoot, tfoot tr:nth-child(1) td {
|
||||||
position: sticky !important;
|
position: sticky !important;
|
||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
thead, tfoot{
|
|
||||||
|
thead, tfoot {
|
||||||
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08) !important;
|
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// LIST VIEW STICKY HEADER AND FOOTER END
|
// LIST VIEW STICKY HEADER AND FOOTER END
|
||||||
}
|
}
|
||||||
|
|
||||||
&.list_compact{
|
&.list_compact {
|
||||||
.o_list_renderer{
|
.o_list_renderer {
|
||||||
--ListRenderer-thead-padding-v: 0.5rem;
|
--ListRenderer-thead-padding-v: 0.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_list_view{
|
.o_list_view {
|
||||||
.o_content .o_list_renderer.table-responsive{
|
.o_content .o_list_renderer.table-responsive {
|
||||||
.o_list_table{
|
.o_list_table {
|
||||||
|
table-layout: unset !important;
|
||||||
|
|
||||||
thead, thead tr:nth-child(1) th, tfoot, tfoot tr:nth-child(1) td {
|
thead, thead tr:nth-child(1) th, tfoot, tfoot tr:nth-child(1) td {
|
||||||
background-color: var(--biz-theme-secondary-color) !important;
|
background-color: var(--biz-theme-secondary-color) !important;
|
||||||
}
|
}
|
||||||
thead, tfoot{
|
|
||||||
|
thead, tfoot {
|
||||||
border-radius: var(--border-radius-lg) !important;
|
border-radius: var(--border-radius-lg) !important;
|
||||||
|
|
||||||
th, td{
|
th, td {
|
||||||
&:first-child{
|
&:first-child {
|
||||||
border-top-left-radius: var(--border-radius-lg) !important;
|
border-top-left-radius: var(--border-radius-lg) !important;
|
||||||
border-bottom-left-radius: var(--border-radius-lg) !important;
|
border-bottom-left-radius: var(--border-radius-lg) !important;
|
||||||
}
|
}
|
||||||
&:last-child{
|
|
||||||
|
&:last-child {
|
||||||
border-top-right-radius: var(--border-radius-lg) !important;
|
border-top-right-radius: var(--border-radius-lg) !important;
|
||||||
border-bottom-right-radius: var(--border-radius-lg) !important;
|
border-bottom-right-radius: var(--border-radius-lg) !important;
|
||||||
}
|
}
|
||||||
@@ -62,41 +70,48 @@ body.o_web_client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_list_renderer{
|
.o_list_renderer {
|
||||||
.o_list_table{
|
.o_list_table {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
|
|
||||||
thead, tfoot {
|
thead, tfoot {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
color: var(--biz-theme-body-text-color) !important;
|
color: var(--biz-theme-body-text-color) !important;
|
||||||
}
|
}
|
||||||
.dropdown-toggle{
|
|
||||||
|
.dropdown-toggle {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
}
|
}
|
||||||
tbody{
|
|
||||||
> tr > td:not(.o_list_record_selector).o_list_button > button{
|
tbody {
|
||||||
|
> tr > td:not(.o_list_record_selector).o_list_button > button {
|
||||||
padding: 0 5px !important;
|
padding: 0 5px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_content {
|
.o_content {
|
||||||
.o_list_renderer {
|
.o_list_renderer {
|
||||||
.o_list_table {
|
.o_list_table {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
|
|
||||||
thead{
|
thead {
|
||||||
color: var(--biz-theme-body-text-color) !important;
|
color: var(--biz-theme-body-text-color) !important;
|
||||||
}
|
}
|
||||||
tbody{
|
|
||||||
tr{
|
tbody {
|
||||||
|
tr {
|
||||||
&.o_group_header {
|
&.o_group_header {
|
||||||
border-radius: var(--border-radius-md);
|
border-radius: var(--border-radius-md);
|
||||||
th{
|
|
||||||
|
th {
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-top-left-radius: var(--border-radius-md);
|
border-top-left-radius: var(--border-radius-md);
|
||||||
border-bottom-left-radius: var(--border-radius-md);
|
border-bottom-left-radius: var(--border-radius-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-top-right-radius: var(--border-radius-md);
|
border-top-right-radius: var(--border-radius-md);
|
||||||
border-bottom-right-radius: var(--border-radius-md);
|
border-bottom-right-radius: var(--border-radius-md);
|
||||||
@@ -105,7 +120,8 @@ body.o_web_client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tfoot{
|
|
||||||
|
tfoot {
|
||||||
background-color: var(--biz-theme-secondary-color) !important;
|
background-color: var(--biz-theme-secondary-color) !important;
|
||||||
color: var(--biz-theme-secondary-text-color) !important;
|
color: var(--biz-theme-secondary-text-color) !important;
|
||||||
}
|
}
|
||||||
@@ -124,8 +140,8 @@ body.o_web_client {
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.o_list_record_remove{
|
.o_list_record_remove {
|
||||||
button{
|
button {
|
||||||
color: var(--biz-theme-body-text-color) !important;
|
color: var(--biz-theme-body-text-color) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,10 +149,12 @@ body.o_web_client {
|
|||||||
thead {
|
thead {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
border: unset;
|
border: unset;
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
border-top: 0 !important;
|
border-top: 0 !important;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -147,11 +165,13 @@ body.o_web_client {
|
|||||||
font-size: var(--spiffy-font-size-md);
|
font-size: var(--spiffy-font-size-md);
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_list_controller {
|
.o_list_controller {
|
||||||
.dropdown-toggle {
|
.dropdown-toggle {
|
||||||
border: 0;
|
border: 0;
|
||||||
@@ -191,18 +211,20 @@ body.o_web_client {
|
|||||||
border-top-right-radius: var(--border-radius-lg) !important;
|
border-top-right-radius: var(--border-radius-lg) !important;
|
||||||
border-bottom-right-radius: var(--border-radius-lg) !important;
|
border-bottom-right-radius: var(--border-radius-lg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.o_selected_row{
|
&.o_selected_row {
|
||||||
td{
|
td {
|
||||||
&.o_data_cell {
|
&.o_data_cell {
|
||||||
&.o_image_cell{
|
&.o_image_cell {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
td, th {
|
td, th {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
@@ -221,10 +243,11 @@ body.o_web_client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
&.o_list_record_selector, &.o_data_cell{
|
&.o_list_record_selector, &.o_data_cell {
|
||||||
height: var(--list-table-height);
|
height: var(--list-table-height);
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
font-weight: 500 !important;
|
font-weight: 500 !important;
|
||||||
border-top: 0 !important;
|
border-top: 0 !important;
|
||||||
@@ -240,7 +263,7 @@ body.o_web_client {
|
|||||||
height: 35px
|
height: 35px
|
||||||
}
|
}
|
||||||
|
|
||||||
@include media-breakpoint-down(lg){
|
@include media-breakpoint-down(lg) {
|
||||||
.biz_attachment_section {
|
.biz_attachment_section {
|
||||||
flex-wrap: unset !important;
|
flex-wrap: unset !important;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
@@ -255,22 +278,26 @@ body.o_web_client {
|
|||||||
|
|
||||||
.biz_attachment_section {
|
.biz_attachment_section {
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
.attachment_box:not(.attachment_box_counter){
|
|
||||||
|
.attachment_box:not(.attachment_box_counter) {
|
||||||
.attachment-name {
|
.attachment-name {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-name {
|
.attachment-name {
|
||||||
white-space: nowrap !important;
|
white-space: nowrap !important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment_box {
|
.attachment_box {
|
||||||
padding: 0.2rem;
|
padding: 0.2rem;
|
||||||
min-height: 36px;
|
min-height: 36px;
|
||||||
border-radius: var(--border-radius-lg) !important;
|
border-radius: var(--border-radius-lg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_image {
|
.o_image {
|
||||||
width: 30px !important;
|
width: 30px !important;
|
||||||
height: 30px !important;
|
height: 30px !important;
|
||||||
@@ -282,13 +309,16 @@ body.o_web_client {
|
|||||||
tfoot {
|
tfoot {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
|
|
||||||
tr td {
|
tr td {
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_list_number {
|
.o_list_number {
|
||||||
color: var(--biz-theme-primary-color) !important;
|
color: var(--biz-theme-primary-color) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_optional_columns_dropdown_toggle {
|
.o_optional_columns_dropdown_toggle {
|
||||||
top: 10px !important;
|
top: 10px !important;
|
||||||
}
|
}
|
||||||
@@ -304,11 +334,13 @@ body.o_web_client {
|
|||||||
.attachment_div {
|
.attachment_div {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.biz_attachment_section {
|
.biz_attachment_section {
|
||||||
.attachment_box {
|
.attachment_box {
|
||||||
padding-left: 0.5rem !important;
|
padding-left: 0.5rem !important;
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_image {
|
.o_image {
|
||||||
width: 20px !important;
|
width: 20px !important;
|
||||||
height: 20px !important;
|
height: 20px !important;
|
||||||
@@ -354,15 +386,18 @@ body.o_web_client.dark_mode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
border: unset;
|
border: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody {
|
tbody {
|
||||||
> tr.o_group_header{
|
> tr.o_group_header {
|
||||||
background-image: linear-gradient(to bottom, #242424, #343434) !important;
|
background-image: linear-gradient(to bottom, #242424, #343434) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.table-responsive {
|
&.table-responsive {
|
||||||
.o_list_table {
|
.o_list_table {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
@@ -382,6 +417,7 @@ body.o_web_client.dark_mode {
|
|||||||
&.o_is_line_section {
|
&.o_is_line_section {
|
||||||
background-color: #161616 !important;
|
background-color: #161616 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-top-left-radius: var(--border-radius-lg) !important;
|
border-top-left-radius: var(--border-radius-lg) !important;
|
||||||
@@ -498,6 +534,7 @@ body.o_web_client {
|
|||||||
border: 1px solid #F4A460 !important;
|
border: 1px solid #F4A460 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_badge_cell {
|
.o_badge_cell {
|
||||||
// .o_field_badge {
|
// .o_field_badge {
|
||||||
// background-color: transparent !important;
|
// background-color: transparent !important;
|
||||||
@@ -509,6 +546,7 @@ body.o_web_client {
|
|||||||
color: rgba(40, 167, 69, 0.9) !important;
|
color: rgba(40, 167, 69, 0.9) !important;
|
||||||
border: 1px solid #28a745b0 !important;
|
border: 1px solid #28a745b0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-info-light {
|
.bg-info-light {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
color: rgba(23, 162, 184, 0.9) !important;
|
color: rgba(23, 162, 184, 0.9) !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user