Accept Merge Request #1978: (feature/制造功能优化 -> develop)
Merge Request: Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造功能优化 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1978?initial=true
This commit is contained in:
17472
jikimo_purchase_tier_validation/i18n/zh_CN.po
Normal file
17472
jikimo_purchase_tier_validation/i18n/zh_CN.po
Normal file
File diff suppressed because it is too large
Load Diff
@@ -206,7 +206,15 @@ class QualityCheck(models.Model):
|
||||
('NG', 'NG')
|
||||
], string='出厂检验报告结果', default='OK')
|
||||
measure_operator = fields.Many2one('res.users', string='操机员')
|
||||
quality_manager = fields.Many2one('res.users', string='质检员')
|
||||
quality_manager = fields.Many2one('res.users', string='质检员', compute='_compute_quality_manager', store=True)
|
||||
|
||||
@api.depends('measure_line_ids')
|
||||
def _compute_quality_manager(self):
|
||||
for record in self:
|
||||
if record.measure_line_ids:
|
||||
record.quality_manager = record.env.user.id
|
||||
else:
|
||||
record.quality_manager = False
|
||||
|
||||
# 流水号(从1开始,最大99)
|
||||
serial_number = fields.Integer('流水号', default=1, readonly=True)
|
||||
@@ -336,7 +344,6 @@ class QualityCheck(models.Model):
|
||||
|
||||
# 7. 更新其他信息
|
||||
self.serial_number += 1
|
||||
self.quality_manager = self.env.user.id
|
||||
|
||||
if self.publish_status == 'canceled' and self.picking_id.state == 'done':
|
||||
self.upload_factory_report()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="model">quality.check.measure.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" class="measureTable">
|
||||
<field name="sequence" class="measureTableSequence"/>
|
||||
<!-- <field name="sequence" class="measureTableSequence"/> -->
|
||||
<!-- <field name="column_nums"/> -->
|
||||
<field name="measure_item"/>
|
||||
<field name="measure_value1" attrs="{ 'column_invisible': [('parent.column_nums', '<', 1)] }"/>
|
||||
|
||||
@@ -567,7 +567,7 @@ class Sf_Dashboard_Connect(http.Controller):
|
||||
"""
|
||||
res = {'status': 1, 'message': '成功', 'data': {}}
|
||||
# plan_obj = request.env['sf.production.plan'].sudo()
|
||||
plan_obj = request.env['mrp.production'].sudo()
|
||||
plan_obj = request.env['mrp.workorder'].sudo().search([('routing_type', '=', 'CNC加工')])
|
||||
line_list = ast.literal_eval(kw['line_list'])
|
||||
begin_time_str = kw['begin_time'].strip('"')
|
||||
end_time_str = kw['end_time'].strip('"')
|
||||
@@ -618,7 +618,7 @@ class Sf_Dashboard_Connect(http.Controller):
|
||||
start_time, end_time = time_interval
|
||||
|
||||
orders = plan_obj.search([
|
||||
('production_line_id.name', '=', line),
|
||||
('production_id.production_line_id.name', '=', line),
|
||||
('state', 'in', ['done']),
|
||||
(date_field_name, '>=', start_time.strftime('%Y-%m-%d %H:%M:%S')),
|
||||
(date_field_name, '<=', end_time.strftime('%Y-%m-%d %H:%M:%S')) # 包括结束时间
|
||||
@@ -638,18 +638,18 @@ class Sf_Dashboard_Connect(http.Controller):
|
||||
|
||||
for date in date_list:
|
||||
next_day = date + timedelta(days=1)
|
||||
orders = plan_obj.search([('production_line_id.name', '=', line), ('state', 'in', ['done']),
|
||||
orders = plan_obj.search([('production_id.production_line_id.name', '=', line), ('state', 'in', ['done']),
|
||||
(date_field_name, '>=', date.strftime('%Y-%m-%d 00:00:00')),
|
||||
(date_field_name, '<', next_day.strftime('%Y-%m-%d 00:00:00'))
|
||||
])
|
||||
|
||||
rework_orders = plan_obj.search(
|
||||
[('production_line_id.name', '=', line), ('state', 'in', ['rework']),
|
||||
[('production_id.production_line_id.name', '=', line), ('state', 'in', ['rework']),
|
||||
(date_field_name, '>=', date.strftime('%Y-%m-%d 00:00:00')),
|
||||
(date_field_name, '<', next_day.strftime('%Y-%m-%d 00:00:00'))
|
||||
])
|
||||
not_passed_orders = plan_obj.search(
|
||||
[('production_line_id.name', '=', line), ('state', 'in', ['scrap', 'cancel']),
|
||||
[('production_id.production_line_id.name', '=', line), ('state', 'in', ['scrap', 'cancel']),
|
||||
(date_field_name, '>=', date.strftime('%Y-%m-%d 00:00:00')),
|
||||
(date_field_name, '<', next_day.strftime('%Y-%m-%d 00:00:00'))
|
||||
])
|
||||
@@ -942,7 +942,7 @@ class Sf_Dashboard_Connect(http.Controller):
|
||||
# machine_list = ast.literal_eval(kw['machine_list'])
|
||||
# for item in machine_list:
|
||||
# machine_data = equipment_obj.search([('code', '=', item)])
|
||||
for log in maintenance_logs_obj.search([]):
|
||||
for log in maintenance_logs_obj.search([], order='id desc', limit=30):
|
||||
res['data'].append({
|
||||
'name': log.name,
|
||||
'alarm_time': log.alarm_time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<t t-call="sf_quality.report_quality_header"/>
|
||||
|
||||
|
||||
<div class="page" style="min-height: 800px; position: relative; padding-bottom: 150px;">
|
||||
<div class="page" style="min-height: 800px; position: relative; padding-bottom: 250px;">
|
||||
|
||||
<table class="table table-sm o_main_table mt-4" style="border: 1px solid black;">
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user