当前位置:网站首页>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"
边栏推荐
猜你喜欢
MySQL-数据类型
【微信小程序】信息管理与信息系统专业社会实习制作项目--垃圾指纹
Interviewer: Tell me the difference between NIO and BIO
【PHP实现微信公众平台开发—基础篇】第1章 课程介绍
LeetCode 1403 非递增顺序的最小子序列[贪心] HERODING的LeetCode之路
Chinese valentine's day of young people crazy to make money, earn 140000 a week
技术分享| 小程序实现音视频通话
【自动微分实现】反向OO实现自动微分(Pytroch核心机制)
Cool and efficient data visualization big screen, it's really not that difficult to do!丨Geek Planet
封装、继承、多态的联合使用实现不同等级学生分数信息的统计
随机推荐
Focus!2022 interview must brush 461 interview questions summary + interview + resume template
Two years of independent development experience Programmers tell us the experience of making money (listen to the masters who really make money)
倒计时 3 天|一起看云原生 Meetup 的六大议题
双目立体视觉笔记(三)三角测量、极线校正
【软考 系统架构设计师】软件架构设计② 软件架构风格
持续交付(三)Jenkinsfile语法使用介绍
npm install出现的各种问题
持续交付(二)PipeLine基本使用
抽奖/秒杀/竞价/评分/权威/投票,技术教你用合适的方法做好活动
Systemui qsSetting添加新图标
RobotFramework二次开发(一)
du命令_set命令选项
RT-Thread stm32 基础记录
TS---类型设置
LeetCode_424_替换后的最长重复字符
MATLAB——图像分块
8/3 训练日志 (树状数组+区间覆盖+思维+01字典树)
JSX使用
绩效考核带给员工的不能只是压力
Haproxy搭建web群集