09 2023 档案

摘要:# settings.py STATIC_URL = '/static/' # 添加静态文件夹路径 STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) 可以直接访问即可: http://localhost:1000/static/css/ 阅读全文
posted @ 2023-09-30 18:22 CrossPython 阅读(83) 评论(0) 推荐(0)
摘要:ba bo be x bi bu ca x co x ce x ci x cu x da do x de di du fa fo x fe x fi x fu ga x go x ge gi x gu ha ho x he hi x hu ja x jo x je x ji ju ka ko x k 阅读全文
posted @ 2023-09-28 08:56 CrossPython 阅读(9) 评论(0) 推荐(0)
摘要:共享数据集 akshare https://akshare.akfamily.xyz/ 阅读全文
posted @ 2023-09-27 19:44 CrossPython 阅读(150) 评论(0) 推荐(0)
摘要:https://blog.51cto.com/melon0809/5389643 阅读全文
posted @ 2023-09-27 09:01 CrossPython 阅读(44) 评论(0) 推荐(0)
摘要:解决方式1: 将“&”改写为“&amp;” 解决方案2:使用CDATA区: 当大量的转义字符出现在xml文档中时,会使xml文档的可读性大幅度降低,这时应该使用CDATA段。在CDATA段中出现的“ < ”、“ > ”、“ " ”、“ ’ ”、“ & ”都无需使用转义字符,但CDATA段中不能包含“ 阅读全文
posted @ 2023-09-26 20:35 CrossPython 阅读(231) 评论(0) 推荐(0)
摘要:odoo跳转页面总结 odoo视图跳转我总结为一下几点:1. 默认的封装了两个数据,不需要人工维护 模型名称(封装到即将跳转的视图的context的active_model属性中)单据id(封装到即将跳转的视图的context的active_id属性中) 2. 返回了一个字典(两大作用) 第一个作用 阅读全文
posted @ 2023-09-26 17:35 CrossPython 阅读(275) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/tsoTeo/article/details/103905169 阅读全文
posted @ 2023-09-26 17:08 CrossPython 阅读(46) 评论(0) 推荐(0)
摘要:在Odoo框架中,可以找到各种各样的通知类型。用于在用户进行系统操作时,即时反馈相关的异常信息。常用的通知选项有如下几种: 1. Sticky Notification2. Rainbow Man Effect3. Alert4. Raise Exception/Validation 第一种显示通知 阅读全文
posted @ 2023-09-25 14:09 CrossPython 阅读(771) 评论(0) 推荐(0)
摘要:大家好, 在Odoo(原OpenERP 开源ERP)架构中,有自定义报表开发【Custom Report Engine】这一功能,但无论在海外还是国内的网站上很难找到相关的解释与介绍。所以,我们整理了相关开发介绍至本博文中。 首先,需要讲解的是 Custom Report Engine 的机制。Od 阅读全文
posted @ 2023-09-25 13:21 CrossPython 阅读(466) 评论(0) 推荐(0)
摘要:定义odoo中的报表,是创建一张数据库视图。 数据库视图和表的联系和区别联系:数据库中的数据都是存储在表中,视图(view)是在基本表之上建立的表,它的结构(即所定义的列)和内容(即所有数据行)都来自基本表,它依据基本表存在而存在。一个视图可以对应一个基本表,也可以对应多个基本表。 区别:1、视图是 阅读全文
posted @ 2023-09-25 13:18 CrossPython 阅读(85) 评论(0) 推荐(0)
摘要:在模块中新建名为report的python文件 创建__main.xml 文件 <report id = “account_invoices” model = “account.invoice” string = “Invoices” report_type = “qweb-pdf” name = 阅读全文
posted @ 2023-09-25 13:17 CrossPython 阅读(86) 评论(0) 推荐(0)
摘要:1.定义PDF报表解析类. 模型类解析类代码 from odoo import api, models class ParticularReport(models.AbstractModel): _name = 'report.hr_teacher.teacher_info_report_pdf' 阅读全文
posted @ 2023-09-25 11:23 CrossPython 阅读(236) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/weixin_37583798/article/details/81201553 https://blog.csdn.net/wei18791957243/article/details/124253528?spm=1001.2101.3001.6650. 阅读全文
posted @ 2023-09-23 22:22 CrossPython 阅读(32) 评论(0) 推荐(0)
摘要:odoo中如果前端界面要调用后台model中写好的方法,很简单。使用 do_action 即可,比如要调用改res.users的默认语言后执行的方法 odoo.define('switch_language.SwitchLanguageMenu', function (require) { "use 阅读全文
posted @ 2023-09-22 09:12 CrossPython 阅读(221) 评论(0) 推荐(0)
摘要:实践环境 Odoo 14.0-20221212 (Community Edition) 代码实现 在js脚本函数中调用模型中自定义方法: this._rpc({ model: 'demo.wizard', // 模型名称,即模型类定义中 _name 的值 method: 'action_select 阅读全文
posted @ 2023-09-22 09:11 CrossPython 阅读(192) 评论(0) 推荐(0)
摘要:this._rpc({ model: this.model, method: 'quick_publish_products', args: [this.res_id], }).then(function (result) { self.do_action(result); }); 阅读全文
posted @ 2023-09-21 18:58 CrossPython 阅读(13) 评论(0) 推荐(0)
摘要:request.make_response() # 仅返回包含 HTML 的字符串 request.render() # 返回一个模板 # 对于 json请求 。 只需要返回客户端想要的数据结构即可。 # odoo 会处理序列化。让其动作,限制数据为json可序列化的类型 # request.env 阅读全文
posted @ 2023-09-21 13:21 CrossPython 阅读(197) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/xiaoduu/article/details/112724947 阅读全文
posted @ 2023-09-21 10:53 CrossPython 阅读(33) 评论(0) 推荐(0)
摘要:看板视图是一个很常见的可视化解决方案了,例如:联系人卡片,任务卡片,还有二次元朋友们经常逛的哔站。 我个人也是非常喜欢看板视图,比起那些呆板的tree视图,看板视图给人的感觉的就是简洁直观又好看。 本人也是初学Odoo一个月,其中深意只知其一,但也想跟各位大佬分享交流,于是斗胆以拙见一篇讨教一二,文 阅读全文
posted @ 2023-09-21 10:19 CrossPython 阅读(281) 评论(0) 推荐(0)
摘要:all model: stock_valuation_layers._check_company()self._check_company() stock.valuation.layer => account.move stock_valuation_layers._validate_account 阅读全文
posted @ 2023-09-16 13:19 CrossPython 阅读(21) 评论(0) 推荐(0)
摘要:def action_validate(self): self.ensure_one() if float_is_zero(self.scrap_qty, precision_rounding=self.product_uom_id.rounding): raise UserError(_('You 阅读全文
posted @ 2023-09-16 11:47 CrossPython 阅读(14) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/weixin_44863237/article/details/124688226 阅读全文
posted @ 2023-09-15 22:12 CrossPython 阅读(18) 评论(0) 推荐(0)
摘要:https://www.odoo.com/zh_CN/forum/bang-zhu-1/how-to-insert-value-to-a-one2many-field-in-table-with-create-method-28714?forum=forum.forum%281%2C%29&ques 阅读全文
posted @ 2023-09-15 22:08 CrossPython 阅读(12) 评论(0) 推荐(0)
摘要:KEY: \addons\stock_account\models\account_move.py def _post(self, soft=True): # OVERRIDE # Don't change anything on moves used to cancel another ones. 阅读全文
posted @ 2023-09-12 19:36 CrossPython 阅读(21) 评论(0) 推荐(0)
摘要:优先考虑用 Freessl 技术方案: 问题原因 项目部署服务器的Https为私有SSL证书,目前确认不会提供共有SSL证书,导致WebView访问网页空白问题 官方设计WebView插件时,为了考虑安全性在访问https链接时,必须要求SSL证书有效,不支持自定义SSL错误的处理 解决方式 有三种 阅读全文
posted @ 2023-09-09 16:09 CrossPython 阅读(895) 评论(0) 推荐(0)
摘要:具体操作就是在flutter项目下创建/android/app/src/main/res/xml/network_security_config.xml文件,填上配置内容: <?xml version="1.0" encoding="utf-8"?> <network-security-config 阅读全文
posted @ 2023-09-09 15:29 CrossPython 阅读(402) 评论(0) 推荐(0)
摘要:下载 nginx.orgcd到目录, start nginx : 启动nginx -s stopnginx -s quit //可以修改hosts文件, 做域名指向 SSL:下载opensslopenssl genrsa -des3 -out myodoo.key 1024openssl req - 阅读全文
posted @ 2023-09-09 12:35 CrossPython 阅读(16) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/web22050702/article/details/129667358 https://www.bilibili.com/read/cv22572083/ 阅读全文
posted @ 2023-09-09 11:32 CrossPython 阅读(20) 评论(0) 推荐(0)
摘要:ENV PATH里设置好, SDK MANAGER路径要保持一致。 这个是常规操作。 还有个隐藏操作: SDK MANGER TOOLS里, 点取消 hide obse.... 然后安装 Android SDK tools 添加path: sdk 里的 D:\android_sdk\tools D: 阅读全文
posted @ 2023-09-09 10:02 CrossPython 阅读(111) 评论(0) 推荐(0)
摘要:self.env.user.notify_success(message='查询成功!') 阅读全文
posted @ 2023-09-08 18:47 CrossPython 阅读(15) 评论(0) 推荐(0)
摘要:odoo原生有一个扫码枪的模块叫做“barcodes”,这个模块中定义了一个类“'barcodes.barcode_events_mixin”,简单的处理扫码事件使用起来还是很方便的。 简单说一下使用过程:首先安装“barcodes”这个模块,在自己的模型中继承“'barcodes.barcode_ 阅读全文
posted @ 2023-09-08 18:38 CrossPython 阅读(419) 评论(0) 推荐(0)
摘要:其实要实现这个功能很简单,只要在前端js里监控扫码字段的change事件。 当满足要求,调用保存按钮的click方法,自动保存。这样扫码工人就不需要操作电脑了,可是由于对odoo前段代码不熟悉,这么个小功能花了我一周左右的时间,虽然问题解决了,但是实现的方式很暴力。不管怎么样,先解决问题再说吧。 a 阅读全文
posted @ 2023-09-08 18:37 CrossPython 阅读(200) 评论(0) 推荐(0)
摘要:可以再次下载 :Odoo 销售扫码 https://apps.odoo.com/apps/modules/11.0/sale_barcodes/ 很多人都说从9.0 之后,很多社区版功能被阉割了,比如大家常说的仓库条码扫码模块就没有了。 但是却为我们留下了bcarcode模块,方便我们进行扩展。由于 阅读全文
posted @ 2023-09-08 18:36 CrossPython 阅读(449) 评论(0) 推荐(0)
摘要:odoo扫码功能 https://www.zodioo.com/zh_TW/slides/slide/odoo-barcode-odoo14-228 https://odoo.net.cn/topic/4853/odoo-%E5%AE%9E%E6%96%BD-%E5%BC%80%E7%AE%B1%E 阅读全文
posted @ 2023-09-08 18:25 CrossPython 阅读(199) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/nhdlb/p/14960000.html 阅读全文
posted @ 2023-09-08 17:39 CrossPython 阅读(381) 评论(0) 推荐(0)
摘要:按结构复制 CREATE TABLE testdb (like testdb_old) partition by range(vdate) 增加附属表 CREATE TABLE cbd_cbdmodeldetails_1_2 PARTITION OF cbd_cbdmodeldetails FOR 阅读全文
posted @ 2023-09-06 17:10 CrossPython 阅读(1197) 评论(0) 推荐(0)
摘要:# coding=utf8 import warnings warnings.filterwarnings('ignore') 阅读全文
posted @ 2023-09-05 13:37 CrossPython 阅读(36) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/CBGCampus/article/details/125366246 https://blog.csdn.net/weixin_43674606/article/details/129193832 https://apps.odoo.com/apps/m 阅读全文
posted @ 2023-09-03 06:42 CrossPython 阅读(212) 评论(0) 推荐(0)
摘要:2. 销售出库的成本项冗余删除 == DONE 3.报废单需要输入日期. cancel 4. 增加一个成本调整单, 针对物料 == 不需要了 5.凭证编号要改成 记-XXX ==自定义一下即可.. 8.凭证的归属日期必须依据原始单据, 而不是按当前时间 -- 末..... 1. 盘点科目设置 6.价 阅读全文
posted @ 2023-09-02 22:07 CrossPython 阅读(19) 评论(0) 推荐(0)
摘要:Rc::borrow()、 Rc::as_ref()、 Rc::deref(), Rc::borrow_mut()、 Rc::as_mut()、 Rc::deref_mut() Box::borrow()、 Box::as_ref()、 Box::deref() Box::borrow_mut()、 阅读全文
posted @ 2023-09-01 09:35 CrossPython 阅读(32) 评论(0) 推荐(0)