From 8c86be0c607c79f30ed5bc08f08e1918441d09e2 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 19 May 2014 13:59:17 +0200 Subject: [PATCH] [FIX] indentation and formatting of various rst snippets --- addons/hw_proxy/doc/index.rst | 30 ++++---------------- addons/website_blog/doc/blog_blog.rst | 14 +++++---- addons/website_blog/doc/changelog.rst | 41 +++++++++++++-------------- openerp/http.py | 19 ++++++------- 4 files changed, 43 insertions(+), 61 deletions(-) diff --git a/addons/hw_proxy/doc/index.rst b/addons/hw_proxy/doc/index.rst index c1faf25961c..c60f207122f 100644 --- a/addons/hw_proxy/doc/index.rst +++ b/addons/hw_proxy/doc/index.rst @@ -5,10 +5,6 @@ PosBox Documentation Posbox Setup Guide ================== -.. image:: _images/posbox_setup.png - :width: 100% - :align: center - Prerequisites ------------- @@ -34,7 +30,7 @@ Step By Step Setup Guide :width: 100% :align: center -Power the PosBox. +Power the PosBox ~~~~~~~~~~~~~~~~ Plug the PosBox to the 2A Power Adapter, a bright red status led should @@ -116,10 +112,6 @@ refer to your Router documentation. PosBoxless Setup Guide ====================== -.. image:: _images/posboxless_setup.png - :width: 100% - :align: center - If you are running your Point of Sale on a debian-based linux distribution, you do not need the PosBox as you can run its software locally. However the installation process is not foolproof. You'll need @@ -141,9 +133,7 @@ Step By Step Setup Guide Extra dependencies ~~~~~~~~~~~~~~~~~~ -The driver modules requires the installation of new python modules: - -:: +The driver modules requires the installation of new python modules:: $ sudo pip install pyserial $ sudo pip install --pre pyusb @@ -159,24 +149,18 @@ Access Rights The drivers need raw access to the printer and barcode scanner devices. Doing so requires a bit system administration. First we are going to -create a group that has haccess to usb devices: - -:: +create a group that has haccess to usb devices:: $ sudo groupadd usbusers -Then we add the user who will run the OpenERP server to ``usbusers`` - -:: +Then we add the user who will run the OpenERP server to ``usbusers``:: $ sudo useradd -G usbusers USERNAME Then we need to create a udev rule that will automatically allow members of ``usbusers`` to access raw usb devices. To do so create a file called ``99-usbusers.rule`` in the ``/etc/udev/rules.d/`` directory with the -following content: - -:: +following content:: SUBSYSTEM=="usb", GROUP="usbusers", MODE="0660" SUBSYSTEMS=="usb", GROUP="usbusers", MODE="0660" @@ -187,9 +171,7 @@ Start the local OpenERP Installl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We must launch the OpenERP server on the port ``8069`` with the correct -database settings: - -:: +database settings:: $ ./server/openerp-server --addons-path=addons,web/addons --db-filter='^posbox$' \ --xmlrpc-port=8069 -d posbox diff --git a/addons/website_blog/doc/blog_blog.rst b/addons/website_blog/doc/blog_blog.rst index 8c5f80ab8e4..f4c3758e229 100644 --- a/addons/website_blog/doc/blog_blog.rst +++ b/addons/website_blog/doc/blog_blog.rst @@ -3,18 +3,22 @@ _blog_blog: blog.blog ========= In ``blog.blog``, added field ``subtitle`` which Indicates the subtitle of blogs. - - ``subtitle``: fields.char('Blog Subtitle') + +- ``subtitle``: fields.char('Blog Subtitle') mail.message ============ In ``mail.message``, added field ``discussion`` which Indicates the unique identification of paragraph on blog post. - - ``discussion``: fields.char('Discussion Unique Name') + +- ``discussion``: fields.char('Discussion Unique Name') blog.post ========= + Fields ++++++ - - ``sub_title`` : contains the subtitle of every blog post. - - ``visits`` : Indicates the number of visits on evry blog post. - - ``ranking`` : Indicates the ranking on every blog post. + +- ``sub_title`` : contains the subtitle of every blog post. +- ``visits`` : Indicates the number of visits on evry blog post. +- ``ranking`` : Indicates the ranking on every blog post. diff --git a/addons/website_blog/doc/changelog.rst b/addons/website_blog/doc/changelog.rst index 42f2fd7e170..2eac118536a 100644 --- a/addons/website_blog/doc/changelog.rst +++ b/addons/website_blog/doc/changelog.rst @@ -4,32 +4,29 @@ Changelog ========= `trunk (saas-3)` ----------------- - - - created ``website_blog`` menu, build on defunct document_page module. - - added new feature ``Inline Discussion`` , that will allow a user to comment - on every paragraph on blog post - - added new feature ``Select to Tweet``, that will alllow a user tweet a selected - text from blog to post , directly on twitter. - +++++++++++++++++ +- created ``website_blog`` menu, build on defunct document_page module. +- added new feature ``Inline Discussion`` , that will allow a user to comment + on every paragraph on blog post +- added new feature ``Select to Tweet``, that will alllow a user tweet a + selected text from blog to post , directly on twitter. WebsiteBlog(controller) ======================= + Methods +++++++ - - ``blog`` : remove routing related to date. - - ``blog_post`` : updated with , suggestion of next post to the user based on - cookie and number of views. - - ``discussion`` : added method , contains a detail of discussion on every paragraph, - if count is true it only return len of ids else return full detail. - def discussion(self, post_id=0, discussion=None, count=False, **post) - - ``post_discussion`` : added methodt, that allow to post discussion on any paragraph. - def post_discussion(self, blog_post_id=0, **post) - - ``change_bg`` : added method allow a user to change background image on blog - post from front-end. - def change_bg(self, post_id=0, image=None, **post) - - ``get_user`` : added method , that will return True if user is public else False. - def get_user(self, **post): - return [False if request.session.uid else True] + +- ``blog`` : remove routing related to date. +- ``blog_post`` : updated with , suggestion of next post to the user based on + cookie and number of views. +- ``discussion`` : added method , contains a detail of discussion on every + paragraph, if count is true it only return len of ids else return full + detail. +- ``post_discussion`` : added methodt, that allow to post discussion on any + paragraph. +- ``change_bg`` : added method allow a user to change background image on blog + post from front-end. +- ``get_user`` : added method , that will return True if user is public else False. diff --git a/openerp/http.py b/openerp/http.py index dcd20002a35..0627c769555 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -318,16 +318,15 @@ def route(route=None, **kw): :param type: The type of request, can be ``'http'`` or ``'json'``. :param auth: The type of authentication method, can on of the following: - * ``user``: The user must be authenticated and the current request - will perform using the rights of the user. - * ``admin``: The user may not be authenticated and the current request - will perform using the admin user. - * ``none``: The method is always active, even if there is no - database. Mainly used by the framework and authentication - modules. There request code will not have any facilities to access - the database nor have any configuration indicating the current - database nor the current user. - + * ``user``: The user must be authenticated and the current request + will perform using the rights of the user. + * ``admin``: The user may not be authenticated and the current request + will perform using the admin user. + * ``none``: The method is always active, even if there is no + database. Mainly used by the framework and authentication + modules. There request code will not have any facilities to access + the database nor have any configuration indicating the current + database nor the current user. :param methods: A sequence of http methods this route applies to. If not specified, all methods are allowed. :param cors: The Access-Control-Allow-Origin cors directive value.