Skip to Content
Menu
This question has been flagged
2 Replies
3694 Views

Good day

How do I reset the templates for Odoo... I meddled with the invoicing templates and now they dont show logos and other graphics... My company name is in a pic so without it on the documents I cant invoice anything...


Thank you

Avatar
Discard
Author Best Answer

So I uninstalled the invoicing module and reinstalled it and it seems to have solved the problem... 


Thank you 

Avatar
Discard
Best Answer

I have this bash function doing the job for qweb views. it should work for that one too or you can modify.

#!/usr/bin/env bash
fnc_reset_view() {
if [[ -z "${1}" || -z ${2} || -z ${3} ]]; then
echo "required: host user password view-id"
exit 1
fi

host=${1}; shift;
login=${1}; shift;
password=${1}; shift;
templates=${@}

headers="-H 'Content-Type: application/x-www-form-urlencoded' -H 'Cookie: local-dev=1; website_lang=en_US; session_id=add15ae1c084759fdabaf986b4562c206403bed4'"

echo "------> login"
eval "curl --data \"login=${login}&password=${password}\" ${host}/web/login ${headers} > /dev/null"

for t in ${templates}; do
echo ""
echo "------> ${t}"
eval "curl -d \"templates=${t}\" -X POST ${host}/website/reset_templates ${headers} > /dev/null"
done;
}
shift;; fnc_reset_view ${@}

resetview.sh "127.0.0.1:8090" "user" "password" "template_id"

it doesn't do anything else than reloading from disk. just in case, backup your database!


Avatar
Discard
Related Posts Replies Views Activity
0
Jul 24
224
1
Sep 23
707
1
Jun 23
1868
1
Mar 24
2510
0
Nov 22
1331