[MERGE] trunk

bzr revid: sle@openerp.com-20140225091121-3cuuiofh2zt923p0
This commit is contained in:
Simon Lejeune 2014-02-25 10:11:21 +01:00
commit 531ab41957
10 changed files with 250 additions and 194 deletions

View File

@ -5,6 +5,10 @@ PosBox Documentation
Posbox Setup Guide
==================
.. image:: _images/posbox_setup.png
:width: 100%
:align: center
Prerequisites
-------------
@ -20,64 +24,64 @@ You will need :
- A local network set up with DHCP ( this is the default setting )
- A RJ45 Ethrnet Cable
- An Epson USB TM-T20 Printer or another compatible printer.
- A Honewell Voyager USB Barcode Scanner or another compatible scanner.
- A Honeywell Eclipse USB Barcode Scanner or another compatible scanner.
- An Epson compatible cash drawer.
Setup
-----
Step By Step Setup Guide
------------------------
.. image:: _images/posbox_doc_schema.png
:width: 100%
:align: center
1) Power the PosBox.
~~~~~~~~~~~~~~~~~~~~
Power the PosBox.
~~~~~~~~~~~~~~~~
Plug the PosBox to the 2A Power Adapter, a bright red status led should
light up.
2) Connect it to the Local Network
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Connect it to the Local Network
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Connect the PosBox to the Local Network with the RJ45 Cable. Make sure
You connect the PosBox to the same Network as your POS device. Once
connected a bright yellow status led should light up, and a green status
led should flash.
3) Connect the USB Printer
~~~~~~~~~~~~~~~~~~~~~~~~~~
Connect the USB Printer
~~~~~~~~~~~~~~~~~~~~~~~
Put a paper roll in the printer, power it up, then connect it to one of
the PosBox's USB port
4) Connect the cash drawer
~~~~~~~~~~~~~~~~~~~~~~~~~~
Connect the cash drawer
~~~~~~~~~~~~~~~~~~~~~~~
The cash drawer should be connected to the printer with the RJ25 cable
5) Connect the USB Barcode Scanner
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Connect the USB Barcode Scanner
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Connect the usb barcode scanner to one of the PosBox's USB port. The
Barcode Scanner should immediately light up and emit a loud beep.
6) Configure the USB Barcode Scanner
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Configure the USB Barcode Scanner
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The barcode scanner should be configured in QWERTY and emit a new line /
return symbol after each scan. This is most likely the default
configuration of your barcode scanner.
7) Make sure the PosBox is ready
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Make sure the PosBox is ready
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Once powered, The PosBox needs less than a minute to boot. Once the
PosBox is ready, it should print a status receipt with its IP Adress.
Also, the last status led, just after the red power status led, should
be permanently lit green.
8) Set up the Point of Sale
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setup the Point of Sale
~~~~~~~~~~~~~~~~~~~~~~~~
Make sure to activate the 'Print via Proxy', 'Remote Scanning' or
'Cashdrawer' options in the Point of Sale configuration. If you are
@ -87,8 +91,12 @@ was printed on the status receipt.
If you are running multiple Point of Sales on the same PosBox, make sure
that only one of them has Remote Scanning activated.
9) Launch the Point of Sale.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you manually specify the PosBox's IP address, you must configure your
network to make sure the PosBox's IP address doesn't change. Please
refer to your Router documentation.
Launch the Point of Sale.
~~~~~~~~~~~~~~~~~~~~~~~~~
If you didn't spcecify the PosBox's IP address in the config, the POS
will need some time to perform a network scan to find the PosBox. This
@ -97,9 +105,21 @@ is only done once.
The Point of Sale is now connected to the PosBox and your Hardware
should be ready to use.
Multi-Pos Configuration
-----------------------
The advised way to setup a multi Point-of-Sale shop is to have one PosBox
per Point-of-Sale. In this case it is mandatory to manually specify the
IP address of each PosBox in each Point of Sale. You must also configure
your network to make sure the PosBox's IP address doesn't change. Please
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
@ -111,15 +131,15 @@ Prerequisites
-------------
- A debian based linux distribution (Debian, Ubuntu, Mint, etc.)
- A running trunk version of the OpenERP server
- A running OpenERP server (version trunk or saas-3 or 8.0 or later)
- You must uninstall any esc-pos printer driver as it will conflict
with OpenERP's built-in driver.
Setup
-----
Step By Step Setup Guide
------------------------
1) Extra dependencies
~~~~~~~~~~~~~~~~~~~~~
Extra dependencies
~~~~~~~~~~~~~~~~~~
The driver modules requires the installation of new python modules:
@ -128,14 +148,14 @@ The driver modules requires the installation of new python modules:
$ sudo pip install pyserial
$ sudo pip install --pre pyusb
2) Database Setup
~~~~~~~~~~~~~~~~~
Database Setup
~~~~~~~~~~~~~~
You must create a database called ``posbox`` with the modules
``hw_proxy``, ``hw_escpos``, and ``hw_scanner`` installed.
3) Access Rights
~~~~~~~~~~~~~~~~
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
@ -163,8 +183,8 @@ following content:
Then you need to reboot your machine.
4) Start the local OpenERP Installl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start the local OpenERP Installl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We must launch the OpenERP server on the port ``8069`` with the correct
database settings:
@ -174,8 +194,8 @@ database settings:
$ ./server/openerp-server --addons-path=addons,web/addons --db-filter='^posbox$' \
--xmlrpc-port=8069 -d posbox
5) Check that everything works
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check that everything works
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Plug all your hardware to your machine's USB ports, and go to
``http://localhost/hw_proxy/status`` refresh the page a few times and
@ -184,20 +204,19 @@ errors are: The paths on the distribution differ from the paths expected
by the drivers, another process has grabbed exclusive access to the
devices, the udev rules do not apply or a superceeded by others.
5) Automatically Start OpenERP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Automatically Start OpenERP
~~~~~~~~~~~~~~~~~~~~~~~~~~~
You must now make sure that this OpenERP install is automatically
started after boot. There are various ways to do so, and how to do it
depends on your particular setup. We use *systemd* on the PosBox, but
*upstart* or *sysvinit* are other options.
6) Set up the Point of Sale
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setup the Point of Sale
~~~~~~~~~~~~~~~~~~~~~~~~
Make sure that one of the posbox Make sure the IP Adress field in the
POS Config is either ``127.0.0.1`` or ``localhost`` or simply leave it
empty.
The IP Adress field in the POS Config must be either ``127.0.0.1``
or ``localhost``. You can also leave it empty.
PosBox Technical Documentation
==============================
@ -231,7 +250,7 @@ Compatible Peripherals
- Barcode Scannners:
- Metapace S61
- Honeywell Voyager 95x0 Series.
- Honeywell Eclipse or Voyager 95x0 Series.
- Most other barcode scanners should work out of the box. Some
barcode scanners need more power than the PosBox can provide and
must be plugged in a self-powered USB HUB. This is the case for
@ -265,6 +284,9 @@ found in instead ``/var/logs/syslog``
We removed all graphical software from the default install to reduce to
image size but nothing prevents you from reinstalling them.
Accessing the PosBox
--------------------
Local Access
~~~~~~~~~~~~
@ -284,8 +306,8 @@ Remote Access
If you have the PosBox's IP address and a SSH client you can access the
PosBox's system remotely. The login / password are ``pi``/``admin``
Unsupported Printers
~~~~~~~~~~~~~~~~~~~~
Getting Unsupported Printers to Work
------------------------------------
The PosBox should be able to print to any ESC-POS printer, not just the
Epson TM-T20. If You have such a printer, you can activate it with the
@ -305,7 +327,7 @@ following steps:
supported devices.
Updating The PosBox Software
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------
The best way to update the PosBox software is to download a new version
of the image and flash the SD-Card with it. This operation is described
@ -315,10 +337,10 @@ raspberry pi image to the latest one found at
``http://nightly.openerp.com/trunk/posbox/``
Troubleshoot
------------
============
The POS cannot connect to the PosBox.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------------
- The easiest way to make sure the PosBox is properly set-up is to turn
it on with the printer plugged in as it will print a receipt
@ -346,7 +368,7 @@ The POS cannot connect to the PosBox.
the PosBox's ip address in the POS config.
The Barcode Scanner is not working
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------------
- The PosBox needs a 2A power supply to work with some barcode
scanners. If you are not using the provided power supply, make sure
@ -357,15 +379,17 @@ The Barcode Scanner is not working
- Some poorly built barcode scanners do not advertise themselves as
barcode scanners but as a usb keyboard instead, and will not be
recognized by the PosBox.
- The barcode scanner must be configured in US QWERTY and emit a linefeed
after each codebar.
The Barcode Scanner is not working reliably
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------------------
- Make sure that no more than one device with 'Scan via Proxy' enabled
are connected to the PosBox at the same time.
Printing the receipt takes too much time.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------
- A small delay before the first print is expected, as the PosBox will
do some preprocessing to speed up the next printings. If you suffer
@ -373,14 +397,14 @@ Printing the receipt takes too much time.
between the POS and the PosBox.
Some characters are not correctly printed on the receipt.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------
- The PosBox does not support all languages and characters. It
currently supports latin and cyrillic based scripts, with basic
japanese support.
The Printer is Offline
~~~~~~~~~~~~~~~~~~~~~~
----------------------
- The PosBox only supports EPSON TM-T20 printers. Make sure the printer
is connected, powered, has enough paper and has its lid closed, and
@ -388,8 +412,41 @@ The Printer is Offline
support.
The Cashdrawer does not open.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------
- The cashdrawer should be connected to the printer and should be
activated in the POS Configuration
Credits
=======
The PosBox project was developped by Frédéric van der Essen with the
kind help of Gary Malherbe, Fabien Meghazi, Nicolas Wisniewsky,
Dimitri Del Marmol and Antony Lesuisse.
This development would not have been possible without the Indiegogo
campaign and those who contributed to it. Special thanks goes to the
partners who backed the campaign with founding partner bundles:
- Camptocamp
- BHC
- openBig
- Eeezee-IT
- Solarsis LDA
- ACSONE
- Vauxoo
- Ekomurz
- Datalp
- Dao Systems
- Eggs Solutions
- OpusVL
And also the partners who've backed the development with the Founding
PosBox Bundle:
- Willow IT
- E\. Akhalwaya & Sons
- Multibase
- Mindesa
- bpso.biz
- Shine IT.

Binary file not shown.

View File

@ -69,10 +69,10 @@
popover: { fixed: true },
},
{
snippet: 'three-columns',
snippet: 'features',
placement: 'bottom',
title: _t("Drag & Drop This Block"),
content: _t("Drag the <em>'Three Columns'</em> block and drop it below the banner."),
content: _t("Drag the <em>'Features'</em> block and drop it below the banner."),
popover: { fixed: true },
},
{

View File

@ -23,7 +23,7 @@
</li>
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_banner.png"/>
<span class="oe_snippet_thumbnail_title">Banner</span>
<span class="oe_snippet_thumbnail_title">Banner</span>
</div>
<div id="myCarousel" class="oe_snippet_body carousel slide mb32" style="height: 320px;">
<!-- Indicators -->
@ -147,16 +147,16 @@
A great way to catch your reader's attention is to tell a story.
Everything you consider writing can be told as a story.
</p><p>
<b>Great stories have personality</b>. Consider telling
a great story that provides personality. Writing a story
with personality for potential clients will asist with
<b>Great stories have personality</b>. Consider telling
a great story that provides personality. Writing a story
with personality for potential clients will asist with
making a relationship connection. This shows up in small
quirks like word choices or phrases. Write from your point
quirks like word choices or phrases. Write from your point
of view, not from someone else's experience.
</p><p>
<b>Great stories are for everyone even when only written for
just one person</b>. If you try to write with a wide general
audience in mind, your story will ring false and be bland.
audience in mind, your story will ring false and be bland.
No one will be interested. Write for one person. If its genuine for the one, its genuine for the rest.
</p>
</div>
@ -183,11 +183,41 @@
</section>
</div>
<div data-snippet-id="features" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_features.png"/>
<span class="oe_snippet_thumbnail_title">Features</span>
</div>
<section class="oe_snippet_body mb16">
<div class="container">
<div class="row mt16 mb16">
<div class="col-md-4 text-center">
<span class="fa fa-suitcase fa-5x"></span>
<h3 class="mt8 mb0">First Feature</h3>
<div class="text-muted">Tell what's the value for the</div>
<div class="text-muted">customer for this feature.</div>
</div>
<div class="col-md-4 text-center">
<span class="fa fa-lock fa-5x"></span>
<h3 class="mt8 mb0">Second Feature</h3>
<div class="text-muted">Write what the customer would like to know,</div>
<div class="text-muted">not what you want to show.</div>
</div>
<div class="col-md-4 text-center">
<span class="fa fa-heart fa-5x"></span>
<h3 class="mt8 mb0">Third Feature</h3>
<div class="text-muted">A small explanation of this great</div>
<div class="text-muted">feature, in clear words.</div>
</div>
</div>
</div>
</section>
</div>
<div data-snippet-id="big-picture" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_big_picture.png"/>
<span class="oe_snippet_thumbnail_title">Big Picture</span>
<span class="oe_snippet_thumbnail_title">Big Picture</span>
</div>
<section class="oe_snippet_body oe_dark mt16 mb16">
<div class="container">
@ -216,11 +246,10 @@
</section>
</div>
<div data-snippet-id="three-columns" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_three_columns.png"/>
<span class="oe_snippet_thumbnail_title">Three Columns</span>
<span class="oe_snippet_thumbnail_title">Three Columns</span>
</div>
<section class="oe_snippet_body mt16 mb16">
<div class="container">
@ -258,66 +287,6 @@
</section>
</div>
<div data-snippet-id="slider" data-selector-children=".oe_structure, [data-oe-type=html]">
<li class="oe_snippet_options divider"></li>
<li class="oe_snippet_options">
<a href="#" class="button js_add">Add Slide</a>
</li>
<li class="oe_snippet_options">
<a href="#" class="button js_remove">Remove Slide</a>
</li>
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_quotes_slider.png"/>
<span class="oe_snippet_thumbnail_title">Quotes Slider</span>
</div>
<div id="myQuoteCarousel" class="oe_snippet_body carousel quotecarousel slide mb0">
<!-- Indicators -->
<ol class="carousel-indicators mb0">
<li data-target="#myQuoteCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myQuoteCarousel" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="item text_only active">
<div class="container">
<div class="content">
<div class="row">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
</div>
</div>
</div>
</div>
<div class="item text_only">
<div class="container">
<div class="content">
<div class="row">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
OpenERP provides essential platform for our project management.
Things are better organized and more visible with it.
</p>
<small>John Doe, CEO</small>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="snippet_content" class="tab-pane fade">
@ -335,7 +304,7 @@
<div data-snippet-id="quote" data-selector-siblings="p, h1, h2, h3, blockquote" data-selector-children=".content">
<div class="oe_snippet_thumbnail">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_quote.png"/>
<span class="oe_snippet_thumbnail_title">Quote</span>
</div>
@ -369,7 +338,7 @@
<div data-snippet-id="hr" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_separator.png"/>
<span class="oe_snippet_thumbnail_title">Separator</span>
<span class="oe_snippet_thumbnail_title">Separator</span>
</div>
<hr class="oe_snippet_body"/>
</div>
@ -414,7 +383,7 @@
<div data-snippet-id="image-gallery" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_image_gallery.png"/>
<span class="oe_snippet_thumbnail_title">Image Gallery</span>
<span class="oe_snippet_thumbnail_title">Image Gallery</span>
</div>
<section class="oe_snippet_body">
<div class="container">
@ -467,7 +436,7 @@
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading text-center">
<h2 style="margin: 0">Beginner</h2>
<p style="margin: 0" class="text-muted">
@ -479,7 +448,7 @@
<div>per month</div>
</div>
<ul class="list-group">
<li class="list-group-item active">Battery: 8 hours</li>
<li class="list-group-item">Screen: 2.5 inch</li>
@ -496,7 +465,7 @@
</div>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading text-center">
<h2 style="margin: 0">Professional</h2>
<p style="margin: 0">
@ -508,7 +477,7 @@
<div>per month</div>
</div>
<ul class="list-group">
<li class="list-group-item active">Battery: 12 hours</li>
<li class="list-group-item">Screen: 2.8 inch</li>
@ -525,7 +494,7 @@
</div>
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading text-center">
<h2 style="margin: 0">Expert</h2>
<p style="margin: 0" class="text-muted">
@ -537,7 +506,7 @@
<div>per month</div>
</div>
<ul class="list-group">
<li class="list-group-item active">Battery: 20 hours</li>
<li class="list-group-item">Screen: 2.8 inch</li>
@ -579,7 +548,7 @@
<div data-snippet-id="faq" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_faq.png"/>
<span class="oe_snippet_thumbnail_title">FAQ</span>
<span class="oe_snippet_thumbnail_title">FAQ</span>
</div>
<section class="oe_snippet_body">
<div class="container">
@ -626,7 +595,7 @@
<div data-snippet-id="references" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_references.png"/>
<span class="oe_snippet_thumbnail_title">References</span>
<span class="oe_snippet_thumbnail_title">References</span>
</div>
<section class="oe_snippet_body mb32 mt16">
<div class="container">
@ -677,37 +646,64 @@
</section>
</div>
<div data-snippet-id="features" data-selector-children=".oe_structure, [data-oe-type=html]">
<div data-snippet-id="slider" data-selector-children=".oe_structure, [data-oe-type=html]">
<li class="oe_snippet_options divider"></li>
<li class="oe_snippet_options">
<a href="#" class="button js_add">Add Slide</a>
</li>
<li class="oe_snippet_options">
<a href="#" class="button js_remove">Remove Slide</a>
</li>
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_features.png"/>
<span class="oe_snippet_thumbnail_title">Features</span>
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_quotes_slider.png"/>
<span class="oe_snippet_thumbnail_title">Quotes Slider</span>
</div>
<section class="oe_snippet_body mb16">
<div class="container">
<div class="row mt16 mb16">
<div class="col-md-3 text-center">
<span class="fa fa-suitcase fa-5x"></span>
<h3 class="mt8 mb0">First Feature</h3>
<div class="text-muted">Tell what's the value for the customer for this feature.</div>
</div>
<div class="col-md-3 text-center">
<span class="fa fa-lock fa-5x"></span>
<h3 class="mt8 mb0">Second Feature</h3>
<div class="text-muted">Write what the customer would like to know, not what you want to show.</div>
</div>
<div class="col-md-3 text-center">
<span class="fa fa-heart fa-5x"></span>
<h3 class="mt8 mb0">Third Feature</h3>
<div class="text-muted">A small explanation of this great feature, in clear words.</div>
</div>
<div class="col-md-3 text-center">
<span class="fa fa-credit-card fa-5x"></span>
<h3 class="mt8 mb0">Fourth Feature</h3>
<div class="text-muted">A small explanation of this great feature on two lines.</div>
<div id="myQuoteCarousel" class="oe_snippet_body carousel quotecarousel slide mb0">
<!-- Indicators -->
<ol class="carousel-indicators mb0">
<li data-target="#myQuoteCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myQuoteCarousel" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="item text_only active">
<div class="container">
<div class="content">
<div class="row">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
</div>
</div>
</div>
</div>
<div class="item text_only">
<div class="container">
<div class="content">
<div class="row">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
OpenERP provides essential platform for our project management.
Things are better organized and more visible with it.
</p>
<small>John Doe, CEO</small>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
<div data-snippet-id="features-list" data-selector-children=".oe_structure, [data-oe-type=html]">
@ -773,7 +769,7 @@
<div data-snippet-id="parallax" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_parallax.png"/>
<span class="oe_snippet_thumbnail_title">Parallax</span>
<span class="oe_snippet_thumbnail_title">Parallax</span>
</div>
<li class="oe_snippet_options dropdown-submenu">
<a tabindex="-1" href="#">Scroll Speed</a>
@ -796,7 +792,7 @@
<div data-snippet-id="parallax_quote" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_quotes_slider.png"/>
<span class="oe_snippet_thumbnail_title">Parallax Slider</span>
<span class="oe_snippet_thumbnail_title">Parallax Slider</span>
</div>
<section class="oe_snippet_body parallax" data-snippet-id="parallax"
style="height: 320px; background-image: url('/website/static/src/img/parallax/quote.png')"
@ -862,7 +858,7 @@
<div data-snippet-id='colmd' data-selector-vertical-children='.row'>
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_column.png"/>
<span class="oe_snippet_thumbnail_title">Add Column</span>
<span class="oe_snippet_thumbnail_title">Add Column</span>
</div>
<div class="oe_snippet_body col-md-4">
<img class="img img-rounded img-responsive" src="/website/static/src/img/china_thumb.jpg"/>

View File

@ -12,7 +12,7 @@ class sale_order_line(osv.osv):
return super(sale_order_line, self)._recalculate_product_values(cr, uid, ids, product_id, context=context)
order_line = self.browse(cr, SUPERUSER_ID, ids[0], context=context)
assert order_line.order_id.website_session_id == request.httprequest.session['website_session_id']
assert order_line.order_id.website_session_id == request.session['website_session_id']
product = product_id and self.pool.get('product.product').browse(cr, uid, product_id, context=context) or order_line.product_id
res = super(sale_order_line, self)._recalculate_product_values(cr, uid, ids, product.id, context=context)

View File

@ -22,7 +22,6 @@
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models import website
import werkzeug
import datetime
import time
@ -43,8 +42,8 @@ class sale_quote(http.Controller):
if token != order.access_token:
return request.website.render('website.404')
# Log only once a day
if request.httprequest.session.get('view_quote',False)!=now:
request.httprequest.session['view_quote'] = now
if request.session.get('view_quote',False)!=now:
request.session['view_quote'] = now
body=_('Quotation viewed by customer')
self.__message_post(body, order_id, type='comment')
days = 0

View File

@ -639,7 +639,7 @@ class Ecommerce(http.Controller):
'reference': order.name,
'sale_order_id': order.id,
}, context=context)
request.httprequest.session['website_sale_transaction_id'] = tx_id
request.session['website_sale_transaction_id'] = tx_id
elif tx and tx.state == 'draft': # button cliked but no more info -> rewrite on tx or create a new one ?
tx.write({
'acquirer_id': acquirer_id,
@ -654,7 +654,7 @@ class Ecommerce(http.Controller):
cr, uid, context = request.cr, request.uid, request.context
order = request.registry['sale.order'].browse(cr, SUPERUSER_ID, sale_order_id, context=context)
assert order.website_session_id == request.httprequest.session['website_session_id']
assert order.website_session_id == request.session['website_session_id']
if not order:
return {
@ -717,7 +717,7 @@ class Ecommerce(http.Controller):
order = self.get_order()
else:
order = request.registry['sale.order'].browse(cr, SUPERUSER_ID, sale_order_id, context=context)
assert order.website_session_id == request.httprequest.session['website_session_id']
assert order.website_session_id == request.session['website_session_id']
if not tx or not order:
return request.redirect('/shop/')
@ -751,7 +751,7 @@ class Ecommerce(http.Controller):
cr, uid, context = request.cr, request.uid, request.context
order = request.registry['sale.order'].browse(cr, SUPERUSER_ID, sale_order_id, context=context)
assert order.website_session_id == request.httprequest.session['website_session_id']
assert order.website_session_id == request.session['website_session_id']
request.registry['website']._ecommerce_change_pricelist(cr, uid, None, context=context or {})

View File

@ -38,7 +38,7 @@ class SaleOrderLine(osv.Model):
if ids and not product_id:
order_line = self.browse(cr, SUPERUSER_ID, ids[0], context=context)
assert order_line.order_id.website_session_id == request.httprequest.session['website_session_id']
assert order_line.order_id.website_session_id == request.session['website_session_id']
product_id = product_id or order_line.product_id.id
return self.product_id_change(

View File

@ -22,12 +22,12 @@ class Website(orm.Model):
# ***********************************************************
def ecommerce_get_pricelist_id(self, cr, uid, ids, context=None):
if not request.httprequest.session.get('ecommerce_pricelist'):
if not request.session.get('ecommerce_pricelist'):
self._ecommerce_change_pricelist(cr, uid, None, context=context)
return request.httprequest.session.get('ecommerce_pricelist')
return request.session.get('ecommerce_pricelist')
def _ecommerce_change_pricelist(self, cr, uid, code=None, context=None):
request.httprequest.session.setdefault('ecommerce_pricelist', False)
request.session.setdefault('ecommerce_pricelist', False)
pricelist_id = False
if code:
@ -40,7 +40,7 @@ class Website(orm.Model):
partner_id = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context).partner_id.id
pricelist_id = self.pool.get('sale.order').onchange_partner_id(cr, SUPERUSER_ID, [], partner_id, context=context)['value']['pricelist_id']
request.httprequest.session['ecommerce_pricelist'] = pricelist_id
request.session['ecommerce_pricelist'] = pricelist_id
order = self.ecommerce_get_current_order(cr, uid, context=context)
if order:
@ -134,11 +134,11 @@ class Website(orm.Model):
SaleOrder = self.pool.get('sale.order')
fields = [k for k, v in SaleOrder._columns.items()]
values = SaleOrder.default_get(cr, SUPERUSER_ID, fields, context=context)
if request.httprequest.session.get('ecommerce_pricelist'):
values['pricelist_id'] = request.httprequest.session['ecommerce_pricelist']
if request.session.get('ecommerce_pricelist'):
values['pricelist_id'] = request.session['ecommerce_pricelist']
values['partner_id'] = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context).partner_id.id
values.update(SaleOrder.onchange_partner_id(cr, SUPERUSER_ID, [], values['partner_id'], context=context)['value'])
values['website_session_id'] = request.httprequest.session['website_session_id']
values['website_session_id'] = request.session['website_session_id']
return values
def _ecommerce_create_quotation(self, cr, uid, context=None):
@ -154,30 +154,30 @@ class Website(orm.Model):
SaleOrder = self.pool.get('sale.order')
# add website_session_id key for access rules
if not request.httprequest.session.get('website_session_id'):
request.httprequest.session['website_session_id'] = str(uuid.uuid4())
if not request.session.get('website_session_id'):
request.session['website_session_id'] = str(uuid.uuid4())
order_id = self._ecommerce_create_quotation(cr, uid, context=context)
request.httprequest.session['ecommerce_order_id'] = order_id
request.session['ecommerce_order_id'] = order_id
context = dict(context or {}, pricelist=self.ecommerce_get_pricelist_id(cr, uid, None, context=context))
return SaleOrder.browse(cr, SUPERUSER_ID, order_id, context=context)
def ecommerce_get_current_order(self, cr, uid, context=None):
SaleOrder = self.pool.get('sale.order')
context = dict(context or {}, pricelist=self.ecommerce_get_pricelist_id(cr, uid, None, context=context))
order_id = request.httprequest.session.get('ecommerce_order_id')
order_id = request.session.get('ecommerce_order_id')
if not order_id:
request.httprequest.session['ecommerce_order_id'] = False
request.session['ecommerce_order_id'] = False
return False
if not order_id in SaleOrder.exists(cr, uid, [order_id], context=context):
request.httprequest.session['ecommerce_order_id'] = False
request.session['ecommerce_order_id'] = False
return False
try:
order = SaleOrder.browse(cr, SUPERUSER_ID, order_id, context=context)
assert order.website_session_id == request.httprequest.session['website_session_id']
assert order.website_session_id == request.session['website_session_id']
return order
except:
request.httprequest.session['ecommerce_order_id'] = False
request.session['ecommerce_order_id'] = False
return False
# ************************************************************
@ -193,15 +193,15 @@ class Website(orm.Model):
return False
def ecommerce_get_current_transaction(self, cr, uid, context=None):
if request.httprequest.session.get('website_sale_transaction_id'):
tx = self._get_transaction(cr, uid, tx_id=request.httprequest.session['website_sale_transaction_id'], context=context)
if request.session.get('website_sale_transaction_id'):
tx = self._get_transaction(cr, uid, tx_id=request.session['website_sale_transaction_id'], context=context)
if not tx:
request.httprequest.session['website_sale_transaction_id'] = False
request.session['website_sale_transaction_id'] = False
return tx
return False
def ecommerce_reset(self, cr, uid, context=None):
request.httprequest.session.update({
request.session.update({
'ecommerce_order_id': False,
'ecommerce_pricelist': False,
'website_sale_transaction_id': False,

View File

@ -11,10 +11,14 @@ inject = [
class TestUi(openerp.tests.HttpCase):
def test_01_admin_shop_tour(self):
self.phantom_js("/", "openerp.website.Tour.run_test('shop')", "openerp.website.Tour.Shop", login="admin")
#self.phantom_js("/", "openerp.website.Tour.run_test('shop')", "openerp.website.Tour.Shop", login="admin")
# AssertionError: Error: Time overlaps to arrive to step 5: 'New product created'
print 'FIXME TODO ERROR FAILED test_01_admin_shop_tour has been deactivated due to systematic errors'
def test_02_admin_checkout(self):
self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour", login="admin")
# self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour", login="admin")
# AssertionError: TypeError: 'undefined' is not an object (evaluating 'website.Tour.tours[id].run')
print 'FIXME TODO ERROR FAILED test_02_admin_checkout has been deactivated due to systematic errors'
@unittest2.expectedFailure
def test_03_demo_checkout(self):