Bug #1817
closedFeature #1616: CRUD Thợ sim
Bug #1782: Thợ sim - Tất cả các trường thông tin được phép nhập chưa có validation
Validation tạo/sửa thợ sim - Lỗi khi thêm trường zalo
0%
Description
- Tái hiện:
Vào màn thêm mới thợ sim
Thêm đầy đủ các trường và thêm số zalo
Chọn lưu
- Lỗi: odoo server error
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1765, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1792, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1996, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/models/models.py", line 71, in web_save
self.write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 317, in write
result = super(MailThread, self).write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_activity_mixin.py", line 248, in write
return super(MailActivityMixin, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4423, in write
real_recs._validate_fields(vals, inverse_fields)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1456, in _validate_fields
check(self)
File "/mnt/extra-addons/dth_stock/models/sim_maker.py", line 80, in _check_zalo
if not self.check_is_phone_number(r.zalo):
AttributeError: 'sim.maker' object has no attribute 'check_is_phone_number'
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://kho-dev.stl.vn/web/assets/e48b5c1/web.assets_web.min.js:2877:163)
at XMLHttpRequest.<anonymous> (https://kho-dev.stl.vn/web/assets/e48b5c1/web.assets_web.min.js:2881:13)