diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss
index 60a4968d..3237fc2b 100644
--- a/jikimo_frontend/static/src/scss/custom_style.scss
+++ b/jikimo_frontend/static/src/scss/custom_style.scss
@@ -159,20 +159,22 @@ td.o_required_modifier {
}
.o_list_view .o_list_table thead {
- position: sticky;
- top: 0;
- //z-index: 100000;
+ position: sticky;
+ top: 0;
+ z-index: 100000;
}
+
//.o_list_view .o_list_table {
// height: 1799px !important;
//}
.table-responsive {
- overflow: unset;
+ overflow: unset;
}
+
.o_form_view.o_xxl_form_view .o_form_sheet_bg > .o_form_statusbar {
- position: sticky !important;
- top: 0;
- //z-index: 100000;
+ position: sticky !important;
+ top: 0;
+ z-index: 100000;
}
//-----------------------------------------------------------
@@ -253,6 +255,36 @@ div[class="o_content o_component_with_search_panel"] .show_state span {
div[class="o_content o_component_with_search_panel"] .o_kanban_primary_right > .row {
position: absolute;
top: 55px;
- right: 263px;
+ right: 43.5%;
}
+@media screen and (min-width: 1200px) {
+ div[class="o_content o_component_with_search_panel"] .o_kanban_primary_right > .row {
+ right: 52%;
+ }
+
+ div[class="o_content o_component_with_search_panel"] .o_kanban_card_content button {
+ left: -95px;
+ }
+
+}
+
+//.o_kanban_renderer .o_kanban_record .o_kanban_record_bottom {
+// display: flex !important;
+// flex-direction: column;
+//}
+
+.o_kanban_renderer .o_kanban_record .o_kanban_record_bottom>div:nth-child(1)>span:nth-child(1) {
+ display: inline-block;
+ margin-right: 10px;
+
+}
+
+.o_kanban_renderer .o_kanban_record .o_kanban_record_bottom>div:nth-child(1) {
+ margin-top: -5px;
+ margin-bottom: 5px;
+}
+
+.text-bg-warning {
+ background-color: #FED300 !important;
+}
\ No newline at end of file
diff --git a/sf_base/models/common.py b/sf_base/models/common.py
index 814dabb7..a6aaf0f8 100644
--- a/sf_base/models/common.py
+++ b/sf_base/models/common.py
@@ -127,19 +127,6 @@ class MrsProcessingOrder(models.Model):
index=True, string='加工工艺')
production_process_id = fields.Many2one('sf.production.process', string="表面工艺")
-
-# class Tray(models.Model):
-# _name = 'sf.tray'
-# _description = '托盘'
-#
-# code = fields.Char('编码', copy=False)
-# name = fields.Char('名称')
-# state = fields.Selection(
-# [("空闲", "空闲"), ("占用", "占用"), ("报损", "报损")],
-# default="空闲", string="状态")
-# active = fields.Boolean('有效', default=True)
-
-
class SupplierSort(models.Model):
_name = 'sf.supplier.sort'
_description = '供应商排序'
diff --git a/sf_base/views/common_view.xml b/sf_base/views/common_view.xml
index f0ff3a07..b079beda 100644
--- a/sf_base/views/common_view.xml
+++ b/sf_base/views/common_view.xml
@@ -361,26 +361,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py
index 10a3ce26..2b15ebad 100644
--- a/sf_maintenance/models/sf_maintenance.py
+++ b/sf_maintenance/models/sf_maintenance.py
@@ -14,7 +14,7 @@ class SfMaintenanceEquipmentCategory(models.Model):
_inherit = 'maintenance.equipment.category'
_description = '设备类别'
- equipment_type = fields.Selection([('机床', '机床')], string='类型', default='机床')
+ equipment_type = fields.Selection([('机床', '机床'), ('机械臂', '机械臂'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')], string='类型', default='机床')
class SfMaintenanceEquipment(models.Model):
diff --git a/sf_maintenance/views/maintenance_views.xml b/sf_maintenance/views/maintenance_views.xml
index e929b444..500d6282 100644
--- a/sf_maintenance/views/maintenance_views.xml
+++ b/sf_maintenance/views/maintenance_views.xml
@@ -332,7 +332,15 @@
@@ -349,7 +357,7 @@
diff --git a/sf_manufacturing/__manifest__.py b/sf_manufacturing/__manifest__.py
index b7fa686a..37b5fd79 100644
--- a/sf_manufacturing/__manifest__.py
+++ b/sf_manufacturing/__manifest__.py
@@ -16,14 +16,12 @@
'security/group_security.xml',
'security/ir.model.access.csv',
'views/mrp_production_addional_change.xml',
- # 'report/tray_report.xml',
# 'views/mrp_maintenance_views.xml',
'views/mrp_routing_workcenter_view.xml',
'views/mrp_workcenter_views.xml',
'views/mrp_workorder_view.xml',
'views/production_line_view.xml',
'views/tool_other_features_view.xml',
- # 'views/tray_view.xml',
'views/model_type_view.xml',
# 'views/kanban_change.xml'
diff --git a/sf_manufacturing/models/__init__.py b/sf_manufacturing/models/__init__.py
index 96accf78..c560211b 100644
--- a/sf_manufacturing/models/__init__.py
+++ b/sf_manufacturing/models/__init__.py
@@ -1,4 +1,3 @@
-from . import tray
from . import model_type
from . import product_template
from . import mrp_production
diff --git a/sf_manufacturing/models/tray.py b/sf_manufacturing/models/tray.py
deleted file mode 100644
index de1a639b..00000000
--- a/sf_manufacturing/models/tray.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# # -*- coding: utf-8 -*-
-# # Part of SmartGo. See LICENSE file for full copyright and licensing details.
-# import base64
-# from io import BytesIO
-# from odoo import api, fields, models
-# #from pystrich.code128 import Code128Encoder
-#
-#
-# class Tray(models.Model):
-# _inherit = 'sf.tray'
-# _description = '托盘'
-# qr_image = fields.Binary(string="托盘二维码", compute='compute_qr_image')
-# production_id = fields.Many2one('mrp.production', string='制造订单',
-# related='workorder_id.production_id'
-# )
-# workorder_id = fields.Many2one('mrp.workorder', string="工单"
-# )
-#
-# @api.onchange('production_id')
-# def updateTrayState(self):
-# if self.workorder_id != False and self.create_date != False:
-#
-# self.state = '占用'
-# else:
-# self.state = '空闲'
-#
-# #解绑托盘
-# def unclamp(self):
-# self.workorder_id = False
-# self.production_id = False
-# self.state = '空闲'
-#
-# @api.depends('code')
-# def compute_qr_image(self):
-# for item in self:
-# if not item.code:
-# item.qr_image = False
-# continue
-# # 根据code动态生成二维码图片
-# # qr = qrcode.QRCode(
-# # version=1,
-# # error_correction=qrcode.constants.ERROR_CORRECT_L,
-# # box_size=10,
-# # border=4,
-# # )
-# # qr.add_data(item.code)
-# # qr.make(fit=True)
-# # img = qr.make_image()
-# # 生成条形码文件
-# # bar = barcode.get("ean13", "123456789102", writer=ImageWriter())
-# # a = bar.get_fullcode()
-# # b = bar.save('occ')
-# # 生成条形码图片
-# partner_encoder = Code128Encoder(item.code)
-# # 转换bytes流
-# temp = BytesIO()
-# partner_encoder.save(temp)
-# # img.save(temp, format='PNG')
-# qr_image = base64.b64encode(temp.getvalue())
-# item.qr_image = qr_image
diff --git a/sf_manufacturing/report/tray_report.xml b/sf_manufacturing/report/tray_report.xml
deleted file mode 100644
index a096ad63..00000000
--- a/sf_manufacturing/report/tray_report.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- Dymo Label Sheet
-
- custom
- 100
- 60
- Landscape
- 0
- 0
- 0
- 0
-
- 96
-
-
-
-
- 打印条形码
- sf.tray
- qweb-pdf
- sf_manufacturing.sf_tray_template
- sf_manufacturing.sf_tray_template
-
- report
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 打印产品信息
- mrp.workorder
- qweb-pdf
- sf_manufacturing.sf_tray_template1
- sf_manufacturing.sf_tray_template1
-
- report
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml
index b326f288..186ebc1c 100644
--- a/sf_manufacturing/views/mrp_production_addional_change.xml
+++ b/sf_manufacturing/views/mrp_production_addional_change.xml
@@ -28,6 +28,9 @@
+
+
+
diff --git a/sf_manufacturing/views/tray_view.xml b/sf_manufacturing/views/tray_view.xml
deleted file mode 100644
index 33b8db9a..00000000
--- a/sf_manufacturing/views/tray_view.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sf_plan/models/custom_plan.py b/sf_plan/models/custom_plan.py
index 15af211a..064a1e20 100644
--- a/sf_plan/models/custom_plan.py
+++ b/sf_plan/models/custom_plan.py
@@ -180,9 +180,11 @@ class sf_production_plan(models.Model):
print(workorder_time)
self.date_planned_finished = self.date_planned_start + timedelta(minutes=workorder_time)
self.state = 'done'
+ aa.schedule_state = '已排'
else:
- self.date_planned_finished = self.date_planned_start + timedelta(days=3)
- self.state = 'done'
+ raise ValidationError("未找到工单")
+ # self.date_planned_finished = self.date_planned_start + timedelta(days=3)
+ # self.state = 'done'
return {
'name': '排程甘特图',
'type': 'ir.actions.act_window',
@@ -224,6 +226,8 @@ class sf_production_plan(models.Model):
def cancel_production_schedule(self):
self.date_planned_finished = False
self.state = 'draft'
+ aa = self.env['mrp.production'].sudo().search([('name', '=', self.name)])
+ aa.schedule_state = '未排'
return self.date_planned_finished
def liucheng_cs(self):
diff --git a/sf_plan/views/view.xml b/sf_plan/views/view.xml
index f7c22624..49a42c5f 100644
--- a/sf_plan/views/view.xml
+++ b/sf_plan/views/view.xml
@@ -31,7 +31,7 @@