Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改刀具标准库部分字段类型

This commit is contained in:
jinling.yang
2023-11-28 17:09:10 +08:00
51 changed files with 859 additions and 539 deletions

View File

@@ -41,14 +41,6 @@
],
'qweb': [
],
'assets': {
'web.assets_backend': [
'sf_manufacturing/static/src/js/kanban_change.js',
'sf_manufacturing/static/src/scss/kanban_change.scss',
'sf_manufacturing/static/src/xml/kanban_change.xml',
],
},
'license': 'LGPL-3',
'installable': True,
'application': False,

View File

@@ -1,4 +1,4 @@
from odoo import fields, models, api
from odoo import fields, models
class ModelType(models.Model):

View File

@@ -616,7 +616,7 @@ class CNCprocessing(models.Model):
logging.info('folder_name:%s' % folder_name)
serverdir = os.path.join('/tmp', folder_name, 'return', processing_panel)
logging.info('serverdir:%s' % serverdir)
for root, dirs, files in os.walk(serverdir):
for root, files in os.walk(serverdir):
for f in files:
logging.info('f:%s' % f)
if os.path.splitext(f)[1] == ".pdf":

View File

@@ -5,7 +5,7 @@ import logging
import json
from re import split as regex_split
from re import findall as regex_findall
from datetime import datetime, timedelta
from datetime import datetime
import requests
from odoo import SUPERUSER_ID, _, api, fields, models
from odoo.tools import float_compare
@@ -149,8 +149,8 @@ class StockRule(models.Model):
raise ProcurementException(errors)
for company_id, productions_values in productions_values_by_company.items():
# create the MO as SUPERUSER because the current user may not have the rights to do it (mto product
# launched by a sale for example)
# create the MO as SUPERUSER because the current user may not have the rights to do it
# (mto product launched by a sale for example)
'''创建制造订单'''
productions = self.env['mrp.production'].with_user(SUPERUSER_ID).sudo().with_company(company_id).create(
productions_values)
@@ -201,18 +201,17 @@ class StockRule(models.Model):
sale_order = self.env['sale.order'].sudo().search([('name', '=', production.origin)])
if sale_order:
bb = sale_order.deadline_of_delivery
productions = self.env['sf.production.plan'].with_user(SUPERUSER_ID).sudo().with_company(company_id). \
create({
'name': production.name,
'order_deadline': sale_order.deadline_of_delivery,
'production_id': production.id,
'date_planned_start': production.date_planned_start,
'origin': production.origin,
'product_qty': production.product_qty,
'product_id': production.product_id.id,
'state': 'draft',
})
self.env['sf.production.plan'].sudo().with_company(company_id). \
create({
'name': production.name,
'order_deadline': sale_order.deadline_of_delivery,
'production_id': production.id,
'date_planned_start': production.date_planned_start,
'origin': production.origin,
'product_qty': production.product_qty,
'product_id': production.product_id.id,
'state': 'draft',
})
return True

View File

@@ -17,16 +17,10 @@ class CustomKanbanController extends KanbanController {
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));
// var aDiv = document.getElementsByClassName('o_kanban_record')
// for (var i = 0; i < aDiv.length; i++) {
// console.log(aDiv[i])
@@ -37,8 +31,7 @@ class CustomKanbanController extends KanbanController {
buttonClick(ev) {
const button = ev.currentTarget;
const id = button.getAttribute('data-id');
console.log('true_id', id);
// console.log('true_id', id);
// const context = {production_line_show: 'shengchanxian1'}
this.env.services.rpc('/web/dataset/call_kw', {
model: 'mrp.workcenter',
@@ -58,8 +51,8 @@ class CustomKanbanController extends KanbanController {
// console.log('response', response);
location.reload();
window.onload = function () {
button.classList.add('choose')
}
button.classList.add('choose');
};
});
});
}
@@ -82,8 +75,6 @@ class CustomKanbanController extends KanbanController {
// 你可以在这里处理响应,例如将其存储在控制器的状态中
return response;
}
}
CustomKanbanController.template = "sf_manufacturing.CustomKanbanView1";
@@ -94,4 +85,4 @@ export const customKanbanView = {
};
// Register it to the views registry
registry.category("views").add("custom_kanban1", customKanbanView);
registry.category("views").add("custom_kanban1", customKanbanView);