当前位置:网站首页>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 resstate = 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"
边栏推荐
猜你喜欢

MySQL性能指标TPS\QPS\IOPS如何压测?

This article sorts out the development of the main models of NLP

【VSCode】一文详解vscode下安装vim后无法使用Ctrl+CV复制粘贴 使用Vim插件的配置记录

“蔚来杯“2022牛客暑期多校训练营4 N

视觉SLAM十四讲学习笔记 第7讲 视觉里程计

COMSOL空气反应 模型框架

Chinese valentine's day of young people crazy to make money, earn 140000 a week

双目立体视觉笔记(三)三角测量、极线校正

使用SQLServer复制数据库

CLS-PEG-DBCO,胆固醇-聚乙二醇-二苯基环辛炔,可用于改善循环时间
随机推荐
Two years of independent development experience Programmers tell us the experience of making money (listen to the masters who really make money)
odoo13笔记点
Chinese valentine's day of young people crazy to make money, earn 140000 a week
js正则表达式提取内容
接到“网站动态换主题”的需求,我是如何踩坑的
密码设置十准则
一分钟认识 IndexedDB 数据库,太强大了!
“蔚来杯“2022牛客暑期多校训练营3 C
视觉SLAM十四讲学习笔记 第7讲 视觉里程计
【牛客刷题-SQL大厂面试真题】NO5.某宝店铺分析(电商模式)
Cool and efficient data visualization big screen, it's really not that difficult to do!丨Geek Planet
【自动微分实现】反向OO实现自动微分(Pytroch核心机制)
Opencv学习之ORB特征提取和匹配
GeoAO:一种快速的环境光遮蔽方案
RobotFramework二次开发(一)
postgre 支持 newsql 特性可行性有多大?
关于mysql join 的一些说明
PMP每日一练 | 考试不迷路-8.4(包含敏捷+多选)
面试官:说一下NIO和BIO的区别
【水一个徽章】