使用odoo時經常用到的屬性

2021-09-19 08:34:29 字數 1400 閱讀 7376

隱藏字段

在某種條件下隱藏

隱藏標籤

唯讀readonly

條件域

設定值eval

表單傳值context(以default_開始代表直接賦值過去)

a
many2one小部件(預設)

one2many樹

name

="basic_incidentals"

mode

="tree"

nolabel

="1"

>

create

="false"

edit

="false"

delete

="false"

>

name

="name"

/>

name

="model"

/>

name

="specifications"

/>

name

="price"

invisible

="true"

/>

name

="number"

invisible

="true"

/>

name

="unit"

invisible

="true"

/>

name

="total_price"

invisible

="true"

/>

name

="remarks"

invisible

="true"

/>

tree

>

field

>

生成乙個動態的選擇,比如當前時間的前後5年

year = fields.selection(string=u'年度', selection=[(num, str(num)) for num in range((datetime.datetime.now().year - 5), (datetime.datetime.now().year + 5))])

使用Linux時經常用到的指令

1.複製 cp 原目標檔案路徑 檔名 目標路徑 cp r 源目錄 目標目錄 2.cd cd 返回上一級目錄 cd 返回上兩級目錄 cd 進入根目錄 cd 返回進入此目錄之前所在的目錄 3.顯示程序 ps ef grep tomcat grep是搜尋的意思 ps ef 顯示所有程序 4.殺死程序 ki...

AT指令時經常用到 c語言庫函式

1 查詢對應的字串 char p data null 找到 test rxlora 這個首位址 p data strstr const char re data,test rxlora 查詢十進位制數值 int lora rssi rssi cnt if sscanf p data,test rxl...

平時經常使用的事項

vim 搜尋 在末行模式中輸入 字串 n 向下搜尋,n向上搜尋。gg 跳到開頭,g跳到末尾 u 撤銷上一步操作 dd 刪掉游標所在的一行 yy複製游標所在的一行 p 貼上 g 也能編譯c檔案,編譯執行緒 使用 lpthread 支援c 11使用 std c 11。wall 將所有警告顯示。linux...