寫開源項目的想法由來已久,先前也做過嘗試,通過插件模式開發的WPF許可權控制框架。然而一直沒有堅持下來,主要有兩方面的原因:一是時間有限,對基礎開發框架也不感冒,畢竟社區裡面已經有不少了;二是走產品路線的話,除了需要瞭解業務,編碼需要更多的時間投入。 但當瞭解到Odoo這樣的低代碼平臺後,我想情況就會 ...
寫開源項目的想法由來已久,先前也做過嘗試,通過插件模式開發的WPF許可權控制框架。然而一直沒有堅持下來,主要有兩方面的原因:一是時間有限,對基礎開發框架也不感冒,畢竟社區裡面已經有不少了;二是走產品路線的話,除了需要瞭解業務,編碼需要更多的時間投入。
但當瞭解到Odoo這樣的低代碼平臺後,我想情況就會有改變了。Odoo採用python開發語言,有近20年的發展歷史,每年10月份都會有新產品發佈;社區活躍,在全球範圍內,有50000+ 公司使用Odoo發展其業務。
把使用Odoo做開源產品的想法跟幾個小伙伴溝通後,大家也都覺得好。於是先從第一款產品“物流管理系統”開始,因為我們幾個人中有參與過物流項目的經驗,以下是手機端的項目截圖。
微信小程式截圖
手機藍牙列印截圖
開篇先參考通用的物流項目,整理出常用的菜單,後期會根據具體業務需要對菜單進行調整,代碼如下:
1 <?xml version="1.0" encoding="utf-8"?> 2 <odoo> 3 <menuitem name="物流" id="logistics_root" /> 4 5 <menuitem name="檔案管理" id="archives_firstmenu" parent="logistics_root" sequence="1"/> 6 <menuitem name="貨運" id="freight_secondmenu" parent="archives_firstmenu"/> 7 <menuitem name="客戶分類管理" id="khflgl_thirdmenu" parent="freight_secondmenu" action="waybill_action"/> 8 <menuitem name="包裝方式" id="bzfs_thirdmenu" parent="freight_secondmenu" action="waybill_action"/> 9 <menuitem name="貨物檔案" id="hwda_thirdmenu" parent="freight_secondmenu" action="waybill_action"/> 10 <menuitem name="保價費率" id="bjfl_thirdmenu" parent="freight_secondmenu" action="waybill_action"/> 11 <menuitem name="往來" id="dealings_secondmenu" parent="archives_firstmenu"/> 12 <menuitem name="運力分類管理" id="ylflgl_thirdmenu" parent="dealings_secondmenu" action="waybill_action"/> 13 <menuitem name="承運合同管理" id="cyhtgl_thirdmenu" parent="dealings_secondmenu" action="waybill_action"/> 14 <menuitem name="合作單位管理" id="hzdwgl_thirdmenu" parent="dealings_secondmenu" action="waybill_action"/> 15 <menuitem name="目的地名管理" id="mddmgl_thirdmenu" parent="dealings_secondmenu" action="waybill_action"/> 16 <menuitem name="內部" id="internal_secondmenu" parent="archives_firstmenu"/> 17 <menuitem name="內部公告管理" id="nbgggl_thirdmenu" parent="internal_secondmenu" action="waybill_action"/> 18 <menuitem name="部門職員設置" id="bmzysz_thirdmenu" parent="internal_secondmenu" action="waybill_action"/> 19 <menuitem name="異地網點配置" id="ydwdpz_thirdmenu" parent="internal_secondmenu" action="waybill_action"/> 20 <menuitem name="會計科目設置" id="kjkmsz_thirdmenu" parent="internal_secondmenu" action="waybill_action"/> 21 22 <menuitem name="物流管理" id="logistics_firstmenu" parent="logistics_root" sequence="2"/> 23 <menuitem name="始發站" id="start_secondmenu" parent="logistics_firstmenu" sequence="1"/> 24 <menuitem name="導入外部運單" id="drwbyd_thirdmenu" parent="start_secondmenu" action="waybill_action"/> 25 <menuitem name="貨物托運憑證" id="hwtypz_thirdmenu" parent="start_secondmenu" action="waybill_action"/> 26 <menuitem name="簡單接貨受理" id="jdjhsl_thirdmenu" parent="start_secondmenu" action="waybill_action"/> 27 <menuitem name="標準接貨受理" id="bzjhsl_thirdmenu" parent="start_secondmenu" action="waybill_action"/> 28 <menuitem name="承運裝車發運" id="cyzcfy_thirdmenu" parent="start_secondmenu" action="waybill_action"/> 29 <menuitem name="派工到門接貨" id="pgdmjh_thirdmenu" parent="start_secondmenu" action="waybill_action"/> 30 <menuitem name="目的站" id="destination_secondmenu" parent="logistics_firstmenu" sequence="2"/> 31 <menuitem name="承運車輛到達" id="cycldd_thirdmenu" parent="destination_secondmenu" action="waybill_action"/> 32 <menuitem name="自提通知登記" id="zttzdj_thirdmenu" parent="destination_secondmenu" action="waybill_action"/> 33 <menuitem name="派工到門送貨" id="pgdmsh_thirdmenu" parent="destination_secondmenu" action="waybill_action"/> 34 <menuitem name="中轉物流登記" id="zzwldj_thirdmenu" parent="destination_secondmenu" action="waybill_action"/> 35 <menuitem name="第三方" id="third_secondmenu" parent="logistics_firstmenu" sequence="3"/> 36 <menuitem name="本地中介登記" id="bdzjdj_thirdmenu" parent="third_secondmenu" action="waybill_action"/> 37 <menuitem name="本地中介結算" id="bdzjjs_thirdmenu" parent="third_secondmenu" action="waybill_action"/> 38 <menuitem name="本地外包登記" id="bdwbdj_thirdmenu" parent="third_secondmenu" action="waybill_action"/> 39 <menuitem name="本地外包結算" id="bdwbjs_thirdmenu" parent="third_secondmenu" action="waybill_action"/> 40 <menuitem name="貨品控制" id="goods_control_secondmenu" parent="logistics_firstmenu" sequence="4"/> 41 <menuitem name="條碼掃描平臺" id="tmsmpt_thirdmenu" parent="goods_control_secondmenu" action="waybill_action"/> 42 <menuitem name="貨差控制明細" id="hckzmx_thirdmenu" parent="goods_control_secondmenu" action="waybill_action"/> 43 <menuitem name="自定條碼列印" id="zdytmdy_thirdmenu" parent="goods_control_secondmenu" action="waybill_action"/> 44 45 <menuitem name="財務結算" id="financial_firstmenu" parent="logistics_root" sequence="3"/> 46 <menuitem name="應收" id="receivable_secondmenu" parent="financial_firstmenu"/> 47 <menuitem name="客戶運費結算" id="khyfjs_thirdmenu" parent="receivable_secondmenu" action="waybill_action"/> 48 <menuitem name="其他收入結算" id="qtsrjs_thirdmenu" parent="receivable_secondmenu" action="waybill_action"/> 49 <menuitem name="客戶運費變動" id="khyfbd_thirdmenu" parent="receivable_secondmenu" action="waybill_action"/> 50 <menuitem name="應收餘額清零" id="ysyeql_thirdmenu" parent="receivable_secondmenu" action="waybill_action"/> 51 <menuitem name="應付" id="payable_secondmenu" parent="financial_firstmenu"/> 52 <menuitem name="司機運費結算" id="sjyfjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 53 <menuitem name="車輛報銷結算" id="clbxjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 54 <menuitem name="墊付運費結算" id="dfyfjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 55 <menuitem name="中轉費用結算" id="zzfyjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 56 <menuitem name="接貨費用結算" id="jhfyjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 57 <menuitem name="送貨費用結算" id="shfyjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 58 <menuitem name="其他費用結算" id="qtfyjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 59 <menuitem name="貨損賠款結算" id="hspkjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 60 <menuitem name="業務返款結算" id="ywfkjs_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 61 <menuitem name="司機運費變動" id="sjyfbd_thirdmenu" parent="payable_secondmenu" action="waybill_action"/> 62 <menuitem name="貨款" id="payment_secondmenu" parent="financial_firstmenu"/> 63 <menuitem name="代收收取結算" id="dssqjs_thirdmenu" parent="payment_secondmenu" action="waybill_action"/> 64 <menuitem name="代收網點過賬" id="dswdgz_thirdmenu" parent="payment_secondmenu" action="waybill_action"/> 65 <menuitem name="代收網點對賬" id="dswddz_thirdmenu" parent="payment_secondmenu" action="waybill_action"/> 66 <menuitem name="代收發放結算" id="dsffjs_thirdmenu" parent="payment_secondmenu" action="waybill_action"/> 67 <menuitem name="代收墊付結算" id="dsdfjs_thirdmenu" parent="payment_secondmenu" action="waybill_action"/> 68 <menuitem name="代收貨款變動" id="dshkbd_thirdmenu" parent="payment_secondmenu" action="waybill_action"/> 69 70 <menuitem name="登記對賬" id="reconciliation_firstmenu" parent="logistics_root" sequence="4"/> 71 <menuitem name="記賬" id="accounting_secondmenu" parent="reconciliation_firstmenu"/> 72 <menuitem name="車輛報銷登記" id="clbxdj_thirdmenu" parent="accounting_secondmenu" action="waybill_action"/> 73 <menuitem name="其他費用登記" id="qtfydj_thirdmenu" parent="accounting_secondmenu" action="waybill_action"/> 74 <menuitem name="其他收入登記" id="qtsrdj_thirdmenu" parent="accounting_secondmenu" action="waybill_action"/> 75 <menuitem name="資金流向管理" id="zjlxgl_thirdmenu" parent="accounting_secondmenu" action="waybill_action"/> 76 <menuitem name="對賬" id="check_secondmenu" parent="reconciliation_firstmenu"/> 77 <menuitem name="應收款催收賬" id="yskcsz_thirdmenu" parent="check_secondmenu" action="waybill_action"/> 78 <menuitem name="網點過賬" id="wdgz_thirdmenu" parent="check_secondmenu" action="waybill_action"/> 79 <menuitem name="出納對賬" id="cndz_thirdmenu" parent="check_secondmenu" action="waybill_action"/> 80 <menuitem name="財務對賬" id="cwdz_thirdmenu" parent="check_secondmenu" action="waybill_action"/> 81 82 <menuitem name="業務統計" id="statistics_firstmenu" parent="logistics_root" sequence="5"/> 83 <menuitem name="發站存貨查詢" id="fzchcx_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 84 <menuitem name="到站存貨查詢" id="dzchcx_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 85 <menuitem name="在途貨物查詢" id="zthwcx_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 86 <menuitem name="線路統計" id="xltj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 87 <menuitem name="發站統計" id="fztj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 88 <menuitem name="到站統計" id="dztj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 89 <menuitem name="職員統計" id="zytj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 90 <menuitem name="客戶統計" id="khtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 91 <menuitem name="司機統計" id="sjtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 92 <menuitem name="接貨統計" id="jhtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 93 <menuitem name="送貨統計" id="shtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 94 <menuitem name="中轉統計" id="zztj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 95 <menuitem name="車輛報銷統計" id="clbxtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 96 <menuitem name="其他費用統計" id="qtfytj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 97 <menuitem name="其他收入統計" id="qtsrtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 98 <menuitem name="貨物統計" id="hwtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 99 <menuitem name="中介統計" id="zjtj_secondmenu" parent="statistics_firstmenu" action="waybill_action"/> 100 <menuitem name="外包統計" id="wbtj_secondmenu"