Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/commercially_launched
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')
|
('NG', 'NG')
|
||||||
], string='出厂检验报告结果', default='OK')
|
], string='出厂检验报告结果', default='OK')
|
||||||
measure_operator = fields.Many2one('res.users', string='操机员')
|
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)
|
# 流水号(从1开始,最大99)
|
||||||
serial_number = fields.Integer('流水号', default=1, readonly=True)
|
serial_number = fields.Integer('流水号', default=1, readonly=True)
|
||||||
@@ -336,7 +344,6 @@ class QualityCheck(models.Model):
|
|||||||
|
|
||||||
# 7. 更新其他信息
|
# 7. 更新其他信息
|
||||||
self.serial_number += 1
|
self.serial_number += 1
|
||||||
self.quality_manager = self.env.user.id
|
|
||||||
|
|
||||||
if self.publish_status == 'canceled' and self.picking_id.state == 'done':
|
if self.publish_status == 'canceled' and self.picking_id.state == 'done':
|
||||||
self.upload_factory_report()
|
self.upload_factory_report()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<field name="model">quality.check.measure.line</field>
|
<field name="model">quality.check.measure.line</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree editable="bottom" class="measureTable">
|
<tree editable="bottom" class="measureTable">
|
||||||
<field name="sequence" class="measureTableSequence"/>
|
<!-- <field name="sequence" class="measureTableSequence"/> -->
|
||||||
<!-- <field name="column_nums"/> -->
|
<!-- <field name="column_nums"/> -->
|
||||||
<field name="measure_item"/>
|
<field name="measure_item"/>
|
||||||
<field name="measure_value1" attrs="{ 'column_invisible': [('parent.column_nums', '<', 1)] }"/>
|
<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': {}}
|
res = {'status': 1, 'message': '成功', 'data': {}}
|
||||||
# plan_obj = request.env['sf.production.plan'].sudo()
|
# 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'])
|
line_list = ast.literal_eval(kw['line_list'])
|
||||||
begin_time_str = kw['begin_time'].strip('"')
|
begin_time_str = kw['begin_time'].strip('"')
|
||||||
end_time_str = kw['end_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
|
start_time, end_time = time_interval
|
||||||
|
|
||||||
orders = plan_obj.search([
|
orders = plan_obj.search([
|
||||||
('production_line_id.name', '=', line),
|
('production_id.production_line_id.name', '=', line),
|
||||||
('state', 'in', ['done']),
|
('state', 'in', ['done']),
|
||||||
(date_field_name, '>=', start_time.strftime('%Y-%m-%d %H:%M:%S')),
|
(date_field_name, '>=', start_time.strftime('%Y-%m-%d %H:%M:%S')),
|
||||||
(date_field_name, '<=', end_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:
|
for date in date_list:
|
||||||
next_day = date + timedelta(days=1)
|
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, '>=', date.strftime('%Y-%m-%d 00:00:00')),
|
||||||
(date_field_name, '<', next_day.strftime('%Y-%m-%d 00:00:00'))
|
(date_field_name, '<', next_day.strftime('%Y-%m-%d 00:00:00'))
|
||||||
])
|
])
|
||||||
|
|
||||||
rework_orders = plan_obj.search(
|
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, '>=', date.strftime('%Y-%m-%d 00:00:00')),
|
||||||
(date_field_name, '<', next_day.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(
|
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, '>=', date.strftime('%Y-%m-%d 00:00:00')),
|
||||||
(date_field_name, '<', next_day.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'])
|
# machine_list = ast.literal_eval(kw['machine_list'])
|
||||||
# for item in machine_list:
|
# for item in machine_list:
|
||||||
# machine_data = equipment_obj.search([('code', '=', item)])
|
# 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({
|
res['data'].append({
|
||||||
'name': log.name,
|
'name': log.name,
|
||||||
'alarm_time': log.alarm_time.strftime('%Y-%m-%d %H:%M:%S'),
|
'alarm_time': log.alarm_time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||||
|
|||||||
@@ -314,13 +314,11 @@ class StockRule(models.Model):
|
|||||||
production_item.product_id.product_model_type_id.id)]
|
production_item.product_id.product_model_type_id.id)]
|
||||||
product_routing_workcenter = self.env[model].search(domain, order='sequence asc')
|
product_routing_workcenter = self.env[model].search(domain, order='sequence asc')
|
||||||
if production_item.production_type == '自动化产线加工':
|
if production_item.production_type == '自动化产线加工':
|
||||||
for k in ((production_item.product_id.model_processing_panel or "").split(',')):
|
for k in (production_item.product_id.model_processing_panel.split(',')):
|
||||||
if k.strip():
|
|
||||||
for route in product_routing_workcenter:
|
for route in product_routing_workcenter:
|
||||||
i += 1
|
i += 1
|
||||||
technology_design_values.append(
|
technology_design_values.append(
|
||||||
self.env['sf.technology.design'].json_technology_design_str(k, route, i, False))
|
self.env['sf.technology.design'].json_technology_design_str(k, route, i, False))
|
||||||
|
|
||||||
elif production_item.production_type == '人工线下加工':
|
elif production_item.production_type == '人工线下加工':
|
||||||
for route in product_routing_workcenter:
|
for route in product_routing_workcenter:
|
||||||
i += 1
|
i += 1
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<t t-call="sf_quality.report_quality_header"/>
|
<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;">
|
<table class="table table-sm o_main_table mt-4" style="border: 1px solid black;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user