当前位置:网站首页>odoo13 note point
odoo13 note point
2022-08-04 13:04:00 【Still that Tong Weiwei】
Sorting a dictionary on the tree view (default is asc ascending, desc descending)
- Procedural presentation, draft----"Submitted----"Approval----"
- There is no parameter vals value passed in the create and write functions, and it cannot be directly obtained from vals.So how can the create function and the write function get the value of the read-only field? The method is actually very simple.
force_save='1', as you can see from the literal meaning, this attribute means to force the save, so that onlyRead the field and save it
- xml default_focus="1"
default_focus: whether the field gets the default focus- sql to update data in batches in postgresql
UPDATE account_account SET distribution_id = B.idFROM eno_fin_account B WHERE A.code = B.code
- A pop-up prompt when odoo deletes
def unlink(self):"""Override delete function:return:"""for rec in self:if rec.state != 'created':raise ValidationError('Only the transfer application form with draft status is allowed to be deleted!')return super(EnoHrApplicationResignation, self).unlink()
- Inherit the original table and add a value to the drop-down box in the original table, that is, add a value to the selection
# Employee status addeddef _selection_state(self):res = super(EnoHrEmployee, self)._selection_state()res += [('to_be_hired', 'to be hired'),('practice', 'practice')]return res
state = fields.Selection(selection=_selection_state)
Subclass inheritance, add the content of the drop-down box to the parent class
application_model = fields.Selection(selection_add=[('eno_hr', 'human resources')])
- Invalid widget in odoo
- The interval between two times in odoo
def get_difference_year(self, do_date):"""Get the year difference between the date do_date and the current date"""if do_date:return relativedelta(fields.Date.today(), do_date).yearselse:return 0
- postgresql deletes the corresponding data according to the query conditions, and sets the third level
delete from row_data where num not in(select mid from(select min(num) mid from row_data group by name,place,company,scale,salary,education,experience,label,welfare,type) as a);
- odoo personalized import button
{'src_action': 'sdszl_hpm_personal_position_import_action'}
- postgresql restore database
pg_restore -d "database name" -h localhost -p 5432 -U postgres -Opostgres is the database role name
- Enter inside the docker container
docker exec -it container name /bin/bash
- Row table, detail rows can be multiple selected
multi_select_tree eno.hpm.employee name
- How to install the module that python encounters setup.py
python setup.py buildpython setup.py install
- The many2One() field in odoo allows it to be selected only once
widget="o2m_unique"
边栏推荐
猜你喜欢
Interviewer: How to view files containing abc string in /etc directory?
rpm安装提示error: XXX: not an rpm package (or package manifest):
持续交付(二)PipeLine基本使用
汉诺塔怎么玩
Valentine's Day Romantic 3D Photo Wall [with source code]
Access Huawei game anti-addiction, click the anti-addiction pop-up window, the game crashes
视觉SLAM十四讲学习笔记 第7讲 视觉里程计
LeetCode 1403 非递增顺序的最小子序列[贪心] HERODING的LeetCode之路
手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果
判断密码是否包含键盘连续字母
随机推荐
使用SQLServer复制数据库
03 多线程与高并发 - ReentrantLock 源码解析
接到“网站动态换主题”的需求,我是如何踩坑的
c#学习_第二弹
router---Programmatic navigation
npm install出现的各种问题
石子 无限拿
HDU1580 输出先手能取的方案数
封装、继承、多态的联合使用实现不同等级学生分数信息的统计
Cockpit human-computer interaction "undercurrent", voice "down", multi-modal "up"
GeoAO:一种快速的环境光遮蔽方案
【牛客刷题-SQL大厂面试真题】NO5.某宝店铺分析(电商模式)
双目立体视觉笔记(二)
持续交付(三)Jenkinsfile语法使用介绍
【WeChat Mini Program】Social Internship Production Project for Information Management and Information System Major--Trash Fingerprint
使用COLMAP初步三维重建
Unity 3D模型展示框架篇之资源打包、加载、热更(Addressable Asset System | 简称AA)
8/3 训练日志 (树状数组+区间覆盖+思维+01字典树)
Chinese valentine's day of young people crazy to make money, earn 140000 a week
"Social Enterprises Conducting Civilian Personnel Training Specifications" group standard on the shelves of Xinhua Bookstore