Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/产品验证
# Conflicts: # sf_manufacturing/models/stock.py # sf_wxwork_approval/models/model.py
This commit is contained in:
@@ -165,7 +165,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
y0 = ((y3 - y4) * (y2 * x1 - y1 * x2) - (y1 - y2) * (y4 * x3 - y3 * x4)) / (
|
||||
(y3 - y4) * (x1 - x2) - (y1 - y2) * (x3 - x4))
|
||||
x1 = ((x7 - x8) * (x6 * y5 - x5 * y6) - (x5 - x6) * (x8 * y7 - x7 * y8)) / (
|
||||
(x7 - x8) * (y5 - y6) - (x5 - x6) * (y7 - y8));
|
||||
(x7 - x8) * (y5 - y6) - (x5 - x6) * (y7 - y8))
|
||||
y1 = ((y7 - y8) * (y6 * x5 - y5 * x6) - (y5 - y6) * (y8 * x7 - y7 * x8)) / (
|
||||
(y7 - y8) * (x5 - x6) - (y5 - y6) * (x7 - x8))
|
||||
x = (x0 + x1) / 2
|
||||
@@ -189,19 +189,26 @@ class ResMrpWorkOrder(models.Model):
|
||||
def json_workorder_str(self, k, production, route):
|
||||
# 计算预计时长duration_expected
|
||||
if route.routing_type == '切割':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '切割')]).time_cycle
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', '切割')]).time_cycle
|
||||
elif route.routing_type == '获取CNC加工程序':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '获取CNC加工程序')]).time_cycle
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', '获取CNC加工程序')]).time_cycle
|
||||
elif route.routing_type == '工件装夹':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '工件装夹')]).time_cycle
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', '工件装夹')]).time_cycle
|
||||
elif route.routing_type == '前置三元定位检测':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '前置三元定位检测')]).time_cycle
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', '前置三元定位检测')]).time_cycle
|
||||
elif route.routing_type == 'CNC加工':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', 'CNC加工')]).time_cycle
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', 'CNC加工')]).time_cycle
|
||||
elif route.routing_type == '后置三元质量检测':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '后置三元质量检测')]).time_cycle
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', '后置三元质量检测')]).time_cycle
|
||||
elif route.routing_type == '解除装夹':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '解除装夹')]).time_cycle
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', '解除装夹')]).time_cycle
|
||||
else:
|
||||
duration_expected = 60
|
||||
workorders_values_str = [0, '', {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from datetime import datetime
|
||||
import requests
|
||||
import logging
|
||||
import base64
|
||||
from collections import defaultdict, namedtuple
|
||||
import logging
|
||||
from re import findall as regex_findall
|
||||
from datetime import datetime
|
||||
from re import split as regex_split
|
||||
from odoo.addons.stock.models.stock_rule import ProcurementException
|
||||
from odoo.addons.sf_base.commons.common import Common
|
||||
import requests
|
||||
from odoo import SUPERUSER_ID, _, api, fields, models
|
||||
from odoo.tools import float_compare
|
||||
from collections import defaultdict, namedtuple
|
||||
from odoo.addons.stock.models.stock_rule import ProcurementException
|
||||
from odoo.addons.sf_base.commons.common import Common
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ class CustomKanbanController extends KanbanController {
|
||||
console.log('99999999111');
|
||||
this.workOrders = await this.getAllWorkOrders();
|
||||
this.workOrdersNew = this.workOrders;
|
||||
console.log('lines222222222', this.workOrders);
|
||||
|
||||
console.log(typeof this.workOrders);
|
||||
console.log(Array.isArray(this.workOrders));
|
||||
|
||||
console.log(this.workOrders.every(order => typeof order === 'object' && order.id !== undefined));
|
||||
// console.log('lines222222222', this.workOrders);
|
||||
//
|
||||
// console.log(typeof this.workOrders);
|
||||
// console.log(Array.isArray(this.workOrders));
|
||||
//
|
||||
// console.log(this.workOrders.every(order => typeof order === 'object' && order.id !== undefined));
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -133,6 +133,10 @@
|
||||
</div>
|
||||
<field name="priority" widget="priority"/>
|
||||
</div>
|
||||
|
||||
<div name="product_specification_id" class="mt-1">
|
||||
规格: <field name="specification_id"></field>
|
||||
</div>
|
||||
<t t-if="record.default_code.value">[<field name="default_code"/>]</t>
|
||||
<div t-if="record.product_variant_count.value > 1" groups="product.group_product_variant">
|
||||
<strong>
|
||||
@@ -140,10 +144,7 @@
|
||||
</strong>
|
||||
</div>
|
||||
<div name="product_lst_price" class="mt-1">
|
||||
Price: <field name="list_price" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"></field>
|
||||
</div>
|
||||
<div name="product_specification_id" class="mt-1">
|
||||
规格: <field name="specification_id"></field>
|
||||
价格: <field name="list_price" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"></field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user