05 2023 档案

摘要:http://127.0.0.1:8069/web/database/manager 阅读全文
posted @ 2023-05-29 19:21 CrossPython 阅读(41) 评论(0) 推荐(0)
摘要:通过scss文件处理.使必填字段下划线加粗 .o_required_modifier .o_input{ border-bottom :2px solid $o-main-text-color !important; } 必填加型号,红色 .o_required_modifier::before{ 阅读全文
posted @ 2023-05-27 22:57 CrossPython 阅读(89) 评论(0) 推荐(0)
摘要:string是字段的默认标签,在用户界面中使用。除Selection和关联字段外,它都是第一个位置参数,所以大多数情况下它用作关键字参数。如未传入,将由字段名自动生成。 default设置字段默认值。可以是具体值(如 active字段中的default=True),或是可调用引用,有名函数或匿名函数 阅读全文
posted @ 2023-05-27 20:53 CrossPython 阅读(146) 评论(0) 推荐(0)
摘要:在odoo中,通过QWeb来对模板进行渲染后加载到浏览器中,而模板中有许多的标签来定制各种需求变化,在这里记录学习过程中碰到的标签定义,以方便查询。 模板中的标签统一都是以"t-"开始的。 t-name 用于指明模板的名称 t-extend 用于指明该模板是继承自另外哪一个模板,后面会带父模板的名称 阅读全文
posted @ 2023-05-24 14:09 CrossPython 阅读(236) 评论(0) 推荐(0)
摘要:写法同之前的视图继承比较相似,话不多说,直接上案例 比如我需在在下列报表添加barcode或者其他字段 第一步先找到当前的视图位置,具体查找方法以后再讲。 最后找到视图 这里面的id还有这个xml文件所在的包会在后面用到 以上信息确认完毕之后,就可以直接写继承了 自定义一个模块,自定义一个xml文件 阅读全文
posted @ 2023-05-24 13:33 CrossPython 阅读(202) 评论(0) 推荐(0)
摘要:s 阅读全文
posted @ 2023-05-24 08:24 CrossPython 阅读(11) 评论(0) 推荐(0)
摘要:<field name="reference" groups="account.group_account_readonly" attrs="{'readonly': [('is_ref_editable', '=', False)], 'invisible': [('product_has_cos 阅读全文
posted @ 2023-05-23 22:36 CrossPython 阅读(31) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/fqfq123456/article/details/123096252 阅读全文
posted @ 2023-05-21 21:12 CrossPython 阅读(46) 评论(0) 推荐(0)
摘要:def set_values(self): super(ResConfigSettings, self).set_values() self.env['ir.config_parameter'].sudo().set_param('invoicefilepath', self.invoicefile 阅读全文
posted @ 2023-05-21 21:10 CrossPython 阅读(39) 评论(0) 推荐(0)
摘要: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 阅读(79) 评论(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 阅读(962) 评论(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 阅读(21) 评论(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 阅读(206) 评论(0) 推荐(0)
摘要:lookupvaluerelatedrelatedtable度量值: sumcalculate引擎 =>基础表和业务表会有不一样的表现多条件calculate和筛选表度量值独立表 ->处理度量值比较方便高级筛选器filter : 逐行扫描并输出一个新的矩阵.可以套在其他公式里.filter: 从唯一 阅读全文
posted @ 2023-05-17 17:07 CrossPython 阅读(160) 评论(0) 推荐(0)
摘要:以下是一个使用Rust编写的程序,可以使用快捷键启动、最小化、最大化和关闭窗口: use gtk::{prelude::*, Application, ApplicationWindow, WindowPosition}; use gdk::enums::key; fn main() { let a 阅读全文
posted @ 2023-05-17 17:06 CrossPython 阅读(437) 评论(0) 推荐(0)
摘要:看不到的情况下, 可以截图 session.driver.save_screenshot(r'C:\Users\1234\Desktop\tmp\123.png') 阅读全文
posted @ 2023-05-17 15:58 CrossPython 阅读(23) 评论(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 阅读(72) 评论(0) 推荐(0)
摘要:网上找了好多资料,都是说怎么设置请求头的信息。却没有说怎么获取由 selenium 提交的请求头。尝试了好久,总结了一个办法,下面上代码: from selenium import webdriver driver_path = r'F:\driver\chromedriver.exe' # 这是c 阅读全文
posted @ 2023-05-17 15:50 CrossPython 阅读(476) 评论(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 阅读(36) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/sum1201/article/details/128599006 阅读全文
posted @ 2023-05-16 21:57 CrossPython 阅读(69) 评论(0) 推荐(0)
摘要:路线规则的优先级 我们知道,odoo中的路线可以在四个地方设置,分别是产品路线、产品分类路线、仓库路线和订单明细行中的路线。这四种路线的优先级为: 1 销售订单明细行 ——> 产品路线——> 产品分类路线——> 仓库路线 这个很好理解,当几个路线对某个库位设置的规则冲突时,依据本优先级进行应用。现在 阅读全文
posted @ 2023-05-16 21:56 CrossPython 阅读(664) 评论(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 阅读(109) 评论(0) 推荐(0)
摘要:<button name="click_created" type="object" string="点变created" class="oe_highlight" confirm="确认吗?" /> 阅读全文
posted @ 2023-05-14 10:44 CrossPython 阅读(41) 评论(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 阅读(46) 评论(0) 推荐(0)
摘要:self.env['res.partner'].search([('id', '=', 2)]) 阅读全文
posted @ 2023-05-13 19:04 CrossPython 阅读(33) 评论(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 阅读(141) 评论(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 阅读(142) 评论(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 阅读(85) 评论(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 阅读(67) 评论(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 阅读(26) 评论(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 阅读(77) 评论(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 阅读(60) 评论(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 阅读(27) 评论(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 阅读(181) 评论(0) 推荐(0)