Ir al contenido
Menú
Se marcó esta pregunta
2034 Vistas

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

Avatar
Descartar
Autor

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

Publicaciones relacionadas Respuestas Vistas Actividad
0
dic 21
1893
1
abr 25
1427
0
jun 25
1204
0
nov 22
2129
0
ene 22
2362