ReadOnly field saved with NULL value
with value null Field readonly
2023-09-27 14:28:20 时间
On CRM
opportunity form view, i added readonly="1"
for probability field. When i saved, whatever the value of my probability, it's stored with NULL value. Is it a bug on OpenERP
?
I think its a bug in openerp. I have created a patch for that. In the openerp addons, web module, goto static/src/js/view_form.js.
Index: view_form.js =================================================================== --- openerp/addons/web/static/src/js/view_form.js +++ openerp/addons/web/static/src/js/view_form.js @@ -833,11 +833,9 @@ // Special case 'id' field, do not save this field // on 'create' : save all non readonly fields // on 'edit' : save non readonly modified fields - if (!f.get("readonly")) { - values[f.name] = f.get_value(); - } else { - readonly_values[f.name] = f.get_value(); - } + values[f.name] = f.get_value(); + if (f.get("readonly")) + readonly_values[f.name] = f.get_value(); } } if (form_invalid) {
相关文章
- 【强化学习】 OpenAI Gym入门:基础组件(Getting Started With OpenAI Gym: The Basic Building Blocks)
- [Qt5] How to connect c++ with QML
- leetCode 30.Substring with Concatenation of All Words (words中全部子串相连) 解题思路和方法
- Using LACP with a vSphere Distributed Switch 5.1
- 记录mybatis添加表数据时报出的错误:Could not set property ‘id‘ of ‘class com.xxx.Manager with value ‘xx...xx‘
- .Net Core with 微服务 - 分布式事务 - 可靠消息最终一致性
- opencv报错The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support
- [答疑]-ATF中异常向量表为何没有实现“Current Exception level with SP_ELx, x>0.“
- Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'orderdetails' of 'class com.luchao.mybatis.first.po.Orders' with value 'Orderdetail [id=null, ordersId=3, itemsId=1, it
- 已解决ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a
- 【视觉SLAM】DXSLAM: A Robust and Efficient Visual SLAM System with Deep Features
- 【我的Android进阶之旅】解决Center OS 64位系统编译Android APP报错error=2和finished with non-zero exit value 127