Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1897 Lượt xem

Hello everyone,

In case this helps, here is a workaround we had to come up with after the iotbox stopped working in production environment, randomly.
We are based in China, and github\.com\ may\ not\ always\ be\ accessible\ without\ a\ proxy\.
As\ such,\ the\ iotbox\ boot\ script\ fails\ randomly\ \(it\ clones\ certain\ modules\ of\ the\ odoo\ community\ repo\),\ which\ can\ end\ up\ in\ a\ crash\ of\ the\ odoo\ service\ on\ the\ iotbox\ \(devices\ are\ not\ detected,\ nothing\ gets\ printed\ on\ connected\ printers\)\.
Somehow\ this\ behavior\ also\ happened\ when\ we\ unticked\ the\ box\ download\ automatic\ upgrades\ in\ odoo\ enterprise/iotbox\ app\.

To\ fix\ this,\ we\ modified\ the\ remote\ source\ of\ the\ updates\ to\ use\ a\ gitlab.com mirror of the odoo official repository.
Gitlab usually works better in China, but it could be also replaced by a self hosted instance domestically.

To apply this workaround:
1. Make sure to modify the script below to use your gitlab credentials/repository (otherwise, it will NOT work)
2. Connect to the iotbox over ssh
3. Copy paste the script below, press enter
4. That's it, the upgrade should apply and be persisted on reboot.

Reminder, change the text below with your credentials:
- GITLAB_PATH
- GITLAB_USER
- GITLAB_PASSWORD

Ảnh đại diện
Huỷ bỏ
Tác giả

sudo service odoo stop
sudo mount -o remount,rw /
cp ~/odoo/.git/config ~/git-config.backup
cat > ~/odoo/.git/config <<'EOT'
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
sparsecheckout = true
[remote "origin"]
url = https://GITLAB_USER:GITLAB_PASWORD@gitlab.com/GITLAP_PATH/odoo.git
fetch = +refs/heads/16.0:refs/remotes/origin/16.0
[branch "16.0"]
remote = origin
merge = refs/heads/15.0
EOT
sudo mount -o remount,ro /
sudo mount -o remount,rw /root_bypass_ramdisks/etc/cups
cd ~/odoo/addons/point_of_sale/tools/posbox/configuration
./posbox_update.sh

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 21
1769
1
thg 4 25
1138
0
thg 6 25
949
0
thg 11 22
2007
0
thg 1 22
2143