规范问题优化

This commit is contained in:
mgw
2023-11-22 10:29:04 +08:00
parent d6dcb6bf55
commit cc58425f50
3 changed files with 8 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
import cpca
import base64 import base64
import logging import logging
from datetime import datetime from datetime import datetime
import requests import requests
import cpca
from odoo.exceptions import UserError from odoo.exceptions import UserError
from odoo.exceptions import ValidationError from odoo.exceptions import ValidationError
from odoo import api, fields, models, SUPERUSER_ID, _ from odoo import api, fields, models, SUPERUSER_ID, _

View File

@@ -13,9 +13,9 @@ class CustomKanbanController extends KanbanController {
async setup() { async setup() {
super.setup(); super.setup();
console.log('99999999111'); // console.log('99999999111');
this.workOrders = await this.getAllWorkOrders(); this.workOrders = await this.getAllWorkOrders();
this.workOrdersNew = this.workOrders; // this.workOrdersNew = this.workOrders;
// console.log('lines222222222', this.workOrders); // console.log('lines222222222', this.workOrders);
// //
// console.log(typeof this.workOrders); // console.log(typeof this.workOrders);
@@ -39,14 +39,14 @@ class CustomKanbanController extends KanbanController {
const id = button.getAttribute('data-id'); const id = button.getAttribute('data-id');
console.log('true_id', id); console.log('true_id', id);
const context = {production_line_show: 'shengchanxian1'} // const context = {production_line_show: 'shengchanxian1'}
this.env.services.rpc('/web/dataset/call_kw', { this.env.services.rpc('/web/dataset/call_kw', {
model: 'mrp.workcenter', model: 'mrp.workcenter',
method: 'search_read', method: 'search_read',
args: [[], ['id']], args: [[], ['id']],
kwargs: {} kwargs: {}
}).then((records) => { }).then((records) => {
console.log(records) // console.log(records)
const ids = records.map(record => record.id); const ids = records.map(record => record.id);
const context = {production_line_show: id}; const context = {production_line_show: id};
this.env.services.rpc('/web/dataset/call_kw', { this.env.services.rpc('/web/dataset/call_kw', {
@@ -55,7 +55,7 @@ class CustomKanbanController extends KanbanController {
args: [ids, context], args: [ids, context],
kwargs: {} kwargs: {}
}).then((response) => { }).then((response) => {
console.log('response', response); // console.log('response', response);
location.reload(); location.reload();
window.onload = function () { window.onload = function () {
button.classList.add('choose') button.classList.add('choose')
@@ -77,7 +77,7 @@ class CustomKanbanController extends KanbanController {
// args: [], // args: [],
// kwargs: {}, // kwargs: {},
// }); // });
console.log('response', response); // console.log('response', response);
// console.log('response1', response1); // console.log('response1', response1);
// 你可以在这里处理响应,例如将其存储在控制器的状态中 // 你可以在这里处理响应,例如将其存储在控制器的状态中
return response; return response;

View File

@@ -42,7 +42,7 @@ export class StepViewer extends Component {
// url = "web_widget_model_viewer/static/src/images/not_model.png"; // url = "web_widget_model_viewer/static/src/images/not_model.png";
} }
} else { } else {
var oImg = document.getElementsByClassName('test')[0] // var oImg = document.getElementsByClassName('test')[0]
// console.log(oImg) // console.log(oImg)
} }
} }