iT邦幫忙

0

odoo 14連續新增

  • 分享至 

  • xImage

請問
如何能按ENTER就新增
並回到輸入畫面
以利連續新增

player iT邦大師 1 級 ‧ 2022-08-30 15:11:02 檢舉
建議你到這問
odoo 台灣社群
https://www.facebook.com/groups/1721662357874308

如果沒人回答你的話
寫英文到這問
https://www.facebook.com/groups/odoodevelopers
如果你是說類似銷售訂單明細,這種連續的資料的新增
你可以用tab鍵來進行多行的連續輸入
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
海綿寶寶
iT邦大神 1 級 ‧ 2022-08-30 16:59:30

當畫面只有一個按鈕(class=btn-primary)時
可以考慮買這個 app
才看一場電影的錢

但是只有10版的沒有14版的

雖然他教的是「如何把 enter key 由 submit 改成 tab」(跟你要的剛好相反)
還是可以參考這篇

如果只是用轉換頁面
return {
'res_model': 'test.model',
'type': 'ir.actions.act_window',
'name': _(text),
'context': {},
'view_mode': 'form',
'target': 'new',
}
執行會出現錯誤

Odoo Server Error

Traceback (most recent call last):
File "C:\odoo\server\odoo\addons\base\models\ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "C:\odoo\server\odoo\http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "C:\odoo\server\odoo\http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\odoo\server\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "C:\odoo\server\odoo\http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "C:\odoo\server\odoo\http.py", line 912, in call
return self.method(*args, **kw)
File "C:\odoo\server\odoo\http.py", line 531, in response_wrap
response = f(*args, **kw)
File "C:\odoo\server\odoo\addons\web\controllers\main.py", line 1394, in call_kw
return self._call_kw(model, method, args, kwargs)
File "C:\odoo\server\odoo\addons\web\controllers\main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\odoo\server\odoo\api.py", line 397, in call_kw
result = _call_kw_model_create(method, model, args, kwargs)
File "C:\odoo\server\odoo\api.py", line 378, in _call_kw_model_create
return result.id if isinstance(args[0], Mapping) else result.ids
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\odoo\server\odoo\http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\odoo\server\odoo\http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
AttributeError: 'dict' object has no attribute 'id'

我要發表回答

立即登入回答