Wiki & html rendering on V6

Asked by Jonathan Liuti

Hello,

I did a lot of searching to find out how to achieve this but no luck.
From what I've read, it seems there was a module in earlier version (pre-v6) that gave the ability to render the wiki as standalone html pages.

But sadly i can't find it for V6. Can someone help me figure this out ?

To make it clear: what we want to achieve is having a custom url or subdomain to access the wiki (eg: wiki.mydomain.com or mydomain.com/wiki) and have it rendered in html.

Thanks,
John.

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Web Client Edit question
Assignee:
No assignee Edit question
Solved by:
Jeroen Vet
Solved:
Last query:
Last reply:
Revision history for this message
Jonathan Liuti (liuti-john) said :
#1

Any documentation on this would be highly appreciated.

Revision history for this message
Jonathan Liuti (liuti-john) said :
#2

Ok today I installed 6.0.1 on a fresh ubuntu install (desktop 10.10) and it seems that the wiki is working !
This box never ran openerp before. (no rc)

I did install the exact same version on 3 different existing ubuntu install (2 server 10.04 and 1 desktop 10.10) which ran v6 rc before and its not working. I tried creating a new db, the result is the same.

I don't know if its coming from some python module or anything. Honnestly I have a hardtime understanding how the html rendering is working in the webclient.

I'm wondering if I should report a bug or not.
 If someone knows more about this, help would be really appreciated.

Revision history for this message
Ferdinand (office-chricar) said :
#3

idea:
try to remove old versions and rc files

Revision history for this message
Jonathan Liuti (liuti-john) said :
#4

@Ferdinand: I'm runing 6.0.1 from a new directory using fresh config files.
Do you think rc files could conflict still ? And if it's the case which files should be looked at in particular ?

Thx for providing feedback though I was kinda feeling alone in the desert :-)

Revision history for this message
Jonathan Liuti (liuti-john) said :
#5

I get this error in the webserver logs:

WARNING Can not write to the addons directory '/openerp/openerp-web-6.0.1/addons', will not be able to download web modules

I checked permissions on the folder, even tried to chmod 777 for testing purpose. Result is the same.

Revision history for this message
Ferdinand (office-chricar) said :
#6

for the rc files try
 ls -la ~/.openerp*
and <your directory>/openobject-client-web/config/

also try
sudo python setup.py install --prefix=/usr (or where ever you want to install )
it will install
/usr/lib/python2.6/site-packages/openerp_web-6.0.1-py2.6.egg
but not remove older files like
/usr/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg
hope that helps

Revision history for this message
Jonathan Liuti (liuti-john) said :
#7

Ok some more strange finding today ...

I retried on my earlier working box and surprise no tag rendering in the wiki anymore :(
Yes, it was working yesterday.

It's really feeling random.
Just to make sure, tag rendering should occur whenever i'm not in edit mode right ?

@ Ferdinand: I'm already using clean configs file (I use the --config option to specify my config).
And I'm not using the install script, I run both server and web-client from source.
From what i learned at the technical training it shouldn't affect the way openerp behaves. Correct me if I'm wrong.

I'm now starting to feel like i'm stuck in the mud :-)

Revision history for this message
Jonathan Liuti (liuti-john) said :
#8

New addition:

In the earlier working box, there is a "wiki" directory in the openerp-web/addons dir.
Its not the case in other not-working box.

So, even with the wiki dir in place its not working anymore.
I've set everything on debug mode and can't see a hint on what's the matter.

I will convert this question to a bug as its starting to look like it.

Revision history for this message
Jeroen Vet (jeroen-vet) said :
#9

Hi Jonathan,
I struggled with this too. It turns out that both addons directories need to writeable by the user that is running openerp-web.
So the openerp-server/addons as well as the openerp-web/addons.
Hope this solves the problem for you as well.

Revision history for this message
Best Jeroen Vet (jeroen-vet) said :
#10

Well, I also needed to change line 227 in openerp-web/obenobject/addons.py to
writeable = os.access(paths.addons(),os.W_OK)
to solve the problem.

Revision history for this message
Jordi Ballester (www.avangard-eis.com) (jordi-ballester-avangard-eis) said :
#11

Well, changed line 227 in openerp-web/obenobject/addons.py to
writeable = os.access(paths.addons(),os.W_OK)

I'm restarting openerp-web and I'm getting the following error when trying to accesso to http://localhost:8080:

Unrecoverable error in the server.
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py", line 541, in run
    self.respond(pi)
  File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py", line 624, in respond
    self.handle_error()
  File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py", line 746, in handle_error
    self.error_response()
  File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/addons/openerp/controllers/root.py", line 35, in _cp_on_error
    message = errorpage.render()
AttributeError: 'NoneType' object has no attribute 'render'

Revision history for this message
Jeroen Vet (jeroen-vet) said :
#12

Hi Jordi,
You probably found out by now that you just need to log out and log in again for it to work as the wiki directory in openerp-web/addons is created dynamically.
BTW the fix has been included now in stable and trunk so no need any more to make the change if you have the latest version see: https://bugs.launchpad.net/bugs/700966

Revision history for this message
Jordi Ballester (www.avangard-eis.com) (jordi-ballester-avangard-eis) said :
#13

Apparently I was changing permissions to the wrong folder:
Instead of /usr/lib/pymodules/python2.6/openerp-server/addons

I had to change permissions to /usr/share/pyshared/openerp-server/addons using
sudo chmod -R 777 /usr/lib/pymodules/python2.6/openerp-server/addons

When I reboot I can now login to OpenERP and the wiki syntax is correctly rendered.

Thank you very much Jeroen.

Jordi.

Revision history for this message
Jonathan Liuti (liuti-john) said :
#14

Thanks Jeroen Vet, that solved my question.

Revision history for this message
Jonathan Liuti (liuti-john) said :
#15

Jordi,

You don't have to chmod 777, giving ownership to both server and web-client to the user that launches them is enough and imo more secure.
Let's say you have an openerp user that is used to launch openerp-server and openerp-web.
You can do a chown openerp:openerp -R /whateverisyourfolder/openerp-server/bin /whateverisyourfolder/openerp-web/

At least it worked for me.

Best regards.

Revision history for this message
Jordi Ballester (jordi-ballester) said :
#16

Thanks Jonathan, that is certainly useful!

I had lots of trouble to understand which folders should I be giving permissions to. What is the difference between the folders:

/usr/lib/pymodules/python2.6/openerp-server/addons
and
/usr/share/pyshared/openerp-server/addons?

They both seem to hold the same information. Is it duplicated?

Only when I changed permissions to "/usr/share/pyshared/openerp-server/addons" it worked for me.

Revision history for this message
Jonathan Liuti (liuti-john) said :
#17

Jordi,

You have to check in your config file which folder is used.

I don't use the script to install my setup, i do it manually from source so I don't know exactly how you launch the server.

But if you don't specify the configuration with -c or --config, the default configuration that is loaded is located in your user home folder and is called ".openerp_serverrc"

Either way the config file has a line "addons_path = something_here" the something_here statement is the directory you should give permission to.

Hope it helps