04 2023 档案
摘要:Odoo10.0中可以通过两种方式来实现工作流(workflow) 一种的官网API中给出的方式,链接:https://www.odoo.com/documentation/10.0/reference/workflows.html 还有一种是通过查看Odoo10.0的源码,发现自带模块中使用的方式
阅读全文
摘要:Workflows Workflows 是通过model 来描述业务逻辑之间的变化过程,Workflows are also used to track processes that evolve over time. 练习 6-1 给session 添加一个 state field ,用来帮助弄
阅读全文
摘要:console.log(owl.Component.env);var itemType = owl.Component.env.form_view.model.data.itemtype;
阅读全文
摘要:setup(){ this.action = useService("action"); } openSettings(){ console.log("click action"); // this.action.doAction("base_setup.action_general_configu
阅读全文
摘要:import { registry } from "@web/core/registry"; const myService = { dependencies: ["notification"], start(env, { notification }) { let counter = 1; set
阅读全文
摘要:https://odoo.github.io/owl/playground/ /** @odoo-module **/ const { Component, useState, useRef, mount, onMounted, props, useEnv, reactive } = owl; fu
阅读全文
摘要:https://odoo.github.io/owl/playground/ /** @odoo-module **/ const { Component, useState, useRef, mount, props } = owl; class Task extends Component {
阅读全文
摘要:use std::fs::File; use std::io::{BufRead, BufReader}; fn main() { let file = File::open("f.txt").expect("File not found"); let reader = BufReader::new
阅读全文
摘要:import xmlrpc.client url = 'http://0.0.0.0:8015' db = 'dev_db' username = 'admin' password = 'admin' common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/c
阅读全文
摘要:document.querySelector('.abcd');
阅读全文
摘要:odoo中如果前端界面要调用后台model中写好的方法,很简单。使用 do_action 即可,比如要调用改res.users的默认语言后执行的方法 odoo.define('switch_language.SwitchLanguageMenu', function (require) { "use
阅读全文
摘要:前面我们讲到了odoo的前端js加载以及怎么把自己写的js插入odoo的框架中。那在这里,有些人就会问了,odoo的模块安装是乱序的,我们怎么保证前端js在执行的时候,那些依赖的底层包已经加载了呢?如果两个模块之间有依赖关系,那在上一节讲的前端继承加载的位置是否有要注意的呢? 其实这些都不用担心,o
阅读全文
摘要:[target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["winuser"] } [dependencies] #[cfg(windows)] extern crate winapi; use std:
阅读全文
摘要:import cv2 from PIL import ImageGrab import numpy as np import pyautogui if __name__ == '__main__': im = ImageGrab.grab() im.save('./res/screen.png',
阅读全文
摘要:[dependencies] web-view = "0.7.3" use std::thread; use web_view::*; fn main() { let handle = thread::spawn(|| { let webview = web_view::builder() .tit
阅读全文