上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页
摘要: from odoo.exceptions import UserError import requests from odoo.http import request def action_commit_approval(self,action_type='commit_approval'): "" 阅读全文
posted @ 2023-05-21 18:36 CrossPython 阅读(59) 评论(0) 推荐(0) 编辑
摘要: PostgreSQL获取数据库中所有table名: SELECT tablename FROM pg_tables WHERE tablename NOT LIKE 'pg%' AND tablename NOT LIKE 'sql_%' ORDER BY tablename; PostgreSQL 阅读全文
posted @ 2023-05-21 15:43 CrossPython 阅读(684) 评论(0) 推荐(0) 编辑
摘要: def goto_mystock(self): self.ensure_one() view_id = self.env.ref('mystock.mystock_form_view').id # a = self.env['mystock'].create({'billno': 'ABCDE', 阅读全文
posted @ 2023-05-19 18:17 CrossPython 阅读(10) 评论(0) 推荐(0) 编辑
摘要: <field name="operator" style="background:Blue;" attrs="{'readonly':[('state', '=', 'done')]}"/> if you need to give color for your letters, then use s 阅读全文
posted @ 2023-05-18 21:20 CrossPython 阅读(145) 评论(0) 推荐(0) 编辑
摘要: lookupvaluerelatedrelatedtable度量值: sumcalculate引擎 =>基础表和业务表会有不一样的表现多条件calculate和筛选表度量值独立表 ->处理度量值比较方便高级筛选器filter : 逐行扫描并输出一个新的矩阵.可以套在其他公式里.filter: 从唯一 阅读全文
posted @ 2023-05-17 17:07 CrossPython 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 以下是一个使用Rust编写的程序,可以使用快捷键启动、最小化、最大化和关闭窗口: use gtk::{prelude::*, Application, ApplicationWindow, WindowPosition}; use gdk::enums::key; fn main() { let a 阅读全文
posted @ 2023-05-17 17:06 CrossPython 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 看不到的情况下, 可以截图 session.driver.save_screenshot(r'C:\Users\1234\Desktop\tmp\123.png') 阅读全文
posted @ 2023-05-17 15:58 CrossPython 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Session(webdriver_path=r'C:\py\tools\chromedriver.exe', browser='chrome', default_timeout=30, webdriver_options={ 'arguments': [ 'headless', 'window-s 阅读全文
posted @ 2023-05-17 15:55 CrossPython 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 网上找了好多资料,都是说怎么设置请求头的信息。却没有说怎么获取由 selenium 提交的请求头。尝试了好久,总结了一个办法,下面上代码: from selenium import webdriver driver_path = r'F:\driver\chromedriver.exe' # 这是c 阅读全文
posted @ 2023-05-17 15:50 CrossPython 阅读(316) 评论(0) 推荐(0) 编辑
摘要: from os import name import threading from socket import * import time lock = threading.Lock() # 确保 多个线程在共享资源的时候不会出现脏数据 openNum = 0 # 端口开放数量统计 threads 阅读全文
posted @ 2023-05-17 14:00 CrossPython 阅读(13) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/sum1201/article/details/128599006 阅读全文
posted @ 2023-05-16 21:57 CrossPython 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 路线规则的优先级 我们知道,odoo中的路线可以在四个地方设置,分别是产品路线、产品分类路线、仓库路线和订单明细行中的路线。这四种路线的优先级为: 1 销售订单明细行 ——> 产品路线——> 产品分类路线——> 仓库路线 这个很好理解,当几个路线对某个库位设置的规则冲突时,依据本优先级进行应用。现在 阅读全文
posted @ 2023-05-16 21:56 CrossPython 阅读(378) 评论(0) 推荐(0) 编辑
摘要: postgresql 数据库创建触发器记录对A表增删改(之前之后或更新时)的详细数据1、创建functionCREATE OR REPLACE FUNCTION auditlogfunc() RETURNS TRIGGER AS $example_table$BEGININSERT INTO AUD 阅读全文
posted @ 2023-05-16 09:58 CrossPython 阅读(80) 评论(0) 推荐(0) 编辑
摘要: <button name="click_created" type="object" string="点变created" class="oe_highlight" confirm="确认吗?" /> 阅读全文
posted @ 2023-05-14 10:44 CrossPython 阅读(21) 评论(0) 推荐(0) 编辑
摘要: # def click_created(self): # sender = self.env['res.partner'].browse(2) # receiver = self.env['res.partner'].browse(6) # message = self.env['mail.mess 阅读全文
posted @ 2023-05-13 20:31 CrossPython 阅读(32) 评论(0) 推荐(0) 编辑
摘要: self.env['res.partner'].search([('id', '=', 2)]) 阅读全文
posted @ 2023-05-13 19:04 CrossPython 阅读(23) 评论(0) 推荐(0) 编辑
摘要: def click_created(self): return { 'type': 'ir.actions.client', 'tag': 'display_notification', 'params': { 'title': '提示点击', 'message': '游戏哦', 'sticky': 阅读全文
posted @ 2023-05-13 08:21 CrossPython 阅读(106) 评论(0) 推荐(0) 编辑
摘要: import win32com.client TASK_ENUM_HIDDEN = 1 TASK_STATE = {0: 'Unknown', 1: 'Disabled', 2: 'Queued', 3: 'Ready', 4: 'Running'} scheduler = win32com.cli 阅读全文
posted @ 2023-05-10 09:50 CrossPython 阅读(95) 评论(0) 推荐(0) 编辑
摘要: # 升级 pip 到最新的版本 (>=10.0.0) 后进行配置 pip install pip -U # 清华源 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # 阿里云源 pip config s 阅读全文
posted @ 2023-05-07 13:33 CrossPython 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 首先在security目录下新增security.xml文件,并添加__manifest__.py引用,xml内容如下 <?xml version="1.0" ?> <odoo> <data> <record id="module_xxx_title" model="ir.module.catego 阅读全文
posted @ 2023-05-07 10:58 CrossPython 阅读(37) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?> <odoo> <data noupdate="0"> <!-- 创建类别 --> <record model="ir.module.category" id="module_roke_stock_hidden"> <fie 阅读全文
posted @ 2023-05-07 10:35 CrossPython 阅读(16) 评论(0) 推荐(0) 编辑
摘要: import odoorpc # Prepare the connection to the server odoo = odoorpc.ODOO('127.0.0.1', port=8069) # Check available databases print(odoo.db.list()) # 阅读全文
posted @ 2023-05-01 21:44 CrossPython 阅读(49) 评论(0) 推荐(0) 编辑
摘要: import xmlrpc.client # info = xmlrpc.client.ServerProxy('http://127.0.0.1:8069/').start() # url, db, username, password = info['host'], info['database 阅读全文
posted @ 2023-05-01 21:27 CrossPython 阅读(48) 评论(0) 推荐(0) 编辑
摘要: <record id="mypartner_tree_view" model="ir.ui.view"> <field name="name">Mypartner清单</field> <field name="model">mypartner</field> <field name="arch" t 阅读全文
posted @ 2023-05-01 16:30 CrossPython 阅读(11) 评论(0) 推荐(0) 编辑
摘要: odoo标准视图国家省城市三级联动:代码如下 country_bank = fields.Many2one('res.country', '开户行国家', ondelete='restrict') province_bank = fields.Many2one('res.country.state' 阅读全文
posted @ 2023-05-01 15:31 CrossPython 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Odoo10.0中可以通过两种方式来实现工作流(workflow) 一种的官网API中给出的方式,链接:https://www.odoo.com/documentation/10.0/reference/workflows.html 还有一种是通过查看Odoo10.0的源码,发现自带模块中使用的方式 阅读全文
posted @ 2023-04-26 21:15 CrossPython 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Workflows Workflows 是通过model 来描述业务逻辑之间的变化过程,Workflows are also used to track processes that evolve over time. 练习 6-1 给session 添加一个 state field ,用来帮助弄 阅读全文
posted @ 2023-04-26 21:03 CrossPython 阅读(41) 评论(0) 推荐(0) 编辑
摘要: console.log(owl.Component.env);var itemType = owl.Component.env.form_view.model.data.itemtype; 阅读全文
posted @ 2023-04-22 22:27 CrossPython 阅读(17) 评论(0) 推荐(0) 编辑
摘要: setup(){ this.action = useService("action"); } openSettings(){ console.log("click action"); // this.action.doAction("base_setup.action_general_configu 阅读全文
posted @ 2023-04-22 14:50 CrossPython 阅读(88) 评论(0) 推荐(0) 编辑
摘要: import { registry } from "@web/core/registry"; const myService = { dependencies: ["notification"], start(env, { notification }) { let counter = 1; set 阅读全文
posted @ 2023-04-21 14:55 CrossPython 阅读(50) 评论(0) 推荐(0) 编辑
摘要: https://odoo.github.io/owl/playground/ /** @odoo-module **/ const { Component, useState, useRef, mount, onMounted, props, useEnv, reactive } = owl; fu 阅读全文
posted @ 2023-04-20 10:25 CrossPython 阅读(23) 评论(0) 推荐(0) 编辑
摘要: https://odoo.github.io/owl/playground/ /** @odoo-module **/ const { Component, useState, useRef, mount, props } = owl; class Task extends Component { 阅读全文
posted @ 2023-04-20 09:46 CrossPython 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2023-04-19 13:07 CrossPython 阅读(43) 评论(0) 推荐(0) 编辑
摘要: import xmlrpc.client url = 'http://0.0.0.0:8015' db = 'dev_db' username = 'admin' password = 'admin' common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/c 阅读全文
posted @ 2023-04-15 22:08 CrossPython 阅读(42) 评论(0) 推荐(0) 编辑
摘要: document.querySelector('.abcd'); 阅读全文
posted @ 2023-04-12 23:06 CrossPython 阅读(13) 评论(0) 推荐(0) 编辑
摘要: odoo中如果前端界面要调用后台model中写好的方法,很简单。使用 do_action 即可,比如要调用改res.users的默认语言后执行的方法 odoo.define('switch_language.SwitchLanguageMenu', function (require) { "use 阅读全文
posted @ 2023-04-11 14:01 CrossPython 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 前面我们讲到了odoo的前端js加载以及怎么把自己写的js插入odoo的框架中。那在这里,有些人就会问了,odoo的模块安装是乱序的,我们怎么保证前端js在执行的时候,那些依赖的底层包已经加载了呢?如果两个模块之间有依赖关系,那在上一节讲的前端继承加载的位置是否有要注意的呢? 其实这些都不用担心,o 阅读全文
posted @ 2023-04-11 13:51 CrossPython 阅读(306) 评论(0) 推荐(1) 编辑
摘要: [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["winuser"] } [dependencies] #[cfg(windows)] extern crate winapi; use std: 阅读全文
posted @ 2023-04-11 08:20 CrossPython 阅读(87) 评论(0) 推荐(0) 编辑
摘要: import cv2 from PIL import ImageGrab import numpy as np import pyautogui if __name__ == '__main__': im = ImageGrab.grab() im.save('./res/screen.png', 阅读全文
posted @ 2023-04-10 14:38 CrossPython 阅读(101) 评论(0) 推荐(0) 编辑
摘要: [dependencies] web-view = "0.7.3" use std::thread; use web_view::*; fn main() { let handle = thread::spawn(|| { let webview = web_view::builder() .tit 阅读全文
posted @ 2023-04-04 20:54 CrossPython 阅读(94) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页