Browse Source
Merge pull request #314 from legalsylvain/8.0_FIX_pos_order_to_sale_order
Merge pull request #314 from legalsylvain/8.0_FIX_pos_order_to_sale_order
[FIX][8.0] pos_order_to_sale_orderpull/371/head
David Vidal
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 232 additions and 284 deletions
-
146pos_order_to_sale_order/README.rst
-
4pos_order_to_sale_order/__openerp__.py
-
19pos_order_to_sale_order/demo/product_template.xml
-
51pos_order_to_sale_order/demo/sale_order.xml
-
7pos_order_to_sale_order/demo/stock_picking_type.xml
-
8pos_order_to_sale_order/readme/CONFIGURE.rst
-
1pos_order_to_sale_order/readme/CONTRIBUTORS.rst
-
52pos_order_to_sale_order/readme/DESCRIPTION.rst
-
11pos_order_to_sale_order/readme/ROADMAP.rst
-
12pos_order_to_sale_order/static/src/css/pos_order_to_sale_order.css
-
200pos_order_to_sale_order/static/src/js/pos_order_to_sale_order.js
-
5pos_order_to_sale_order/views/pos_order_to_sale_order.xml
@ -1,135 +1,21 @@ |
|||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
**This file is going to be generated by oca-gen-addon-readme.** |
|||
|
|||
*Manual changes will be overwritten.* |
|||
|
|||
======================= |
|||
POS Order To Sale Order |
|||
======================= |
|||
Please provide content in the ``readme`` directory: |
|||
|
|||
* **DESCRIPTION.rst** (required) |
|||
* INSTALL.rst (optional) |
|||
* CONFIGURE.rst (optional) |
|||
* **USAGE.rst** (optional, highly recommended) |
|||
* DEVELOP.rst (optional) |
|||
* ROADMAP.rst (optional) |
|||
* HISTORY.rst (optional, recommended) |
|||
* **CONTRIBUTORS.rst** (optional, highly recommended) |
|||
* CREDITS.rst (optional) |
|||
|
|||
This module extends the functionality of point of sale to allow sale orders |
|||
creation from the Point of Sale. |
|||
Content of this README will also be drawn from the addon manifest, |
|||
from keys such as name, authors, maintainers, development_status, |
|||
and license. |
|||
|
|||
|
|||
In the POS UI, buttons has been added to create a sale order and discard |
|||
the current POS order. |
|||
|
|||
This module is usefull in many cases, for exemple : |
|||
|
|||
* take orders with a very simple interface |
|||
|
|||
* if you have some customers that come every day in your shop, but want to |
|||
have a unique invoice at the end of the month. With that module, you can |
|||
create a sale order and deliver products every time to keep your stock value |
|||
correct, and to create a unique invoice, when you want. |
|||
|
|||
|
|||
Three options are available: |
|||
|
|||
#. '**Create a draft Order**' |
|||
A new sale order in a draft mode will be created that can be changed later. |
|||
|
|||
.. figure:: static/description/pos_create_picking_option_1.png |
|||
:width: 800 px |
|||
|
|||
#. '**Create a Confirmed Order**' |
|||
A new sale order will be created and confirmed. |
|||
|
|||
.. figure:: static/description/pos_create_picking_option_2.png |
|||
:width: 800 px |
|||
|
|||
#. '**Create Delivered Picking**' (by default) |
|||
A new sale order will be created and confirmed. the associated picking |
|||
will be marked as delivered. |
|||
|
|||
.. figure:: static/description/pos_create_picking_option_3.png |
|||
:width: 800 px |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
To configure this module, you need to: |
|||
|
|||
#. Go to Point Of Sale / Configuration / Point of Sale |
|||
#. Check the box 'Create Sale Orders' |
|||
#. Select the desired default behaviour |
|||
|
|||
.. figure:: static/description/pos_config_form.png |
|||
:width: 800 px |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
|||
:alt: Try me on Runbot |
|||
:target: https://runbot.odoo-community.org/runbot/184/8.0 |
|||
|
|||
Technical Notes |
|||
=============== |
|||
|
|||
* Some hooks are defined in the JS file, to define custom behaviour after |
|||
having created the sale order (and the stock picking). |
|||
|
|||
* Some prepare functions are available in the sale.order model, to overload |
|||
the creation of the sale order. |
|||
|
|||
* You could be interested by another module, pos_sale_order, that completely |
|||
alter Point of Sale module, avoiding creating Pos Orders, and creating |
|||
allways Sale Orders. |
|||
This module is a WIP state, and is available here: |
|||
https://github.com/OCA/pos/pull/35 |
|||
|
|||
Known issues / Roadmap |
|||
====================== |
|||
|
|||
* Because of the poor design of the Odoo Point of Sale, some basic features |
|||
are not available by default, like pricelist, fiscal position, etc ... |
|||
For that reason, unit price will be recomputed by default, when creating the |
|||
sale order, and the unit price of the current bill will not be used. |
|||
|
|||
Note that this problem is fixed if ``pos_pricelist`` is installed. |
|||
(same repository) In that cases, the pricelist, the unit prices and the taxes |
|||
will be the same in the order, as in the displayed bill. |
|||
|
|||
.. figure:: static/description/pos_create_picking_confirm.png |
|||
:width: 800 px |
|||
|
|||
|
|||
Bug Tracker |
|||
=========== |
|||
|
|||
Bugs are tracked on `GitHub Issues |
|||
<https://github.com/OCA/pos/issues>`_. In case of trouble, please |
|||
check there if your issue has already been reported. If you spotted it first, |
|||
help us smash it by providing detailed and welcomed feedback. |
|||
|
|||
Credits |
|||
======= |
|||
|
|||
Contributors |
|||
------------ |
|||
|
|||
* Sylvain Le Gal (https://twitter.com/legalsylvain) |
|||
|
|||
Funders |
|||
------- |
|||
|
|||
The development of this module has been financially supported by: |
|||
|
|||
* GRAP, Groupement Régional Alimentaire de Proximité (http://www.grap.coop) |
|||
|
|||
Maintainer |
|||
---------- |
|||
|
|||
.. image:: https://odoo-community.org/logo.png |
|||
:alt: Odoo Community Association |
|||
:target: https://odoo-community.org |
|||
|
|||
This module is maintained by the OCA. |
|||
|
|||
OCA, or the Odoo Community Association, is a nonprofit organization whose |
|||
mission is to support the collaborative development of Odoo features and |
|||
promote its widespread use. |
|||
|
|||
To contribute to this module, please visit https://odoo-community.org. |
|||
A good, one sentence summary in the manifest is also highly recommended. |
@ -1,19 +0,0 @@ |
|||
<openerp><data> |
|||
|
|||
<record id="product.product_product_4_product_template" model="product.template"> |
|||
<field name="available_in_pos" eval="True"/> |
|||
</record> |
|||
|
|||
<record id="product.product_product_7_product_template" model="product.template"> |
|||
<field name="available_in_pos" eval="True"/> |
|||
</record> |
|||
|
|||
<record id="product.product_product_9_product_template" model="product.template"> |
|||
<field name="available_in_pos" eval="True"/> |
|||
</record> |
|||
|
|||
<record id="product.product_product_24_product_template" model="product.template"> |
|||
<field name="available_in_pos" eval="True"/> |
|||
</record> |
|||
|
|||
</data></openerp> |
@ -1,51 +0,0 @@ |
|||
<openerp><data> |
|||
|
|||
<!-- Sale Order 1--> |
|||
<record id="sale_order_1" model="sale.order"> |
|||
<field name="partner_id" ref="base.res_partner_2"/> |
|||
<field name="order_policy">picking</field> |
|||
</record> |
|||
|
|||
<record id="sale_order_line_11" model="sale.order.line"> |
|||
<field name="order_id" ref="sale_order_1"/> |
|||
<field name="product_id" ref="product.product_product_7"/> |
|||
<field name="product_uom_qty">5</field> |
|||
</record> |
|||
|
|||
<record id="sale_order_line_12" model="sale.order.line"> |
|||
<field name="order_id" ref="sale_order_1"/> |
|||
<field name="product_id" ref="product.product_product_9"/> |
|||
<field name="product_uom_qty">3</field> |
|||
</record> |
|||
|
|||
<workflow action="order_confirm" model="sale.order" ref="sale_order_1"/> |
|||
|
|||
<!-- Sale Order 2--> |
|||
<record id="sale_order_2" model="sale.order"> |
|||
<field name="partner_id" ref="base.res_partner_13"/> |
|||
<field name="order_policy">picking</field> |
|||
</record> |
|||
|
|||
<record id="sale_order_line_21" model="sale.order.line"> |
|||
<field name="order_id" ref="sale_order_2"/> |
|||
<field name="product_id" ref="product.product_product_7"/> |
|||
<field name="product_uom_qty">15</field> |
|||
<field name="discount">10</field> |
|||
</record> |
|||
|
|||
<record id="sale_order_line_22" model="sale.order.line"> |
|||
<field name="order_id" ref="sale_order_2"/> |
|||
<field name="product_id" ref="product.product_product_4"/> |
|||
<field name="product_uom_qty">1</field> |
|||
</record> |
|||
|
|||
<record id="sale_order_line_23" model="sale.order.line"> |
|||
<field name="order_id" ref="sale_order_2"/> |
|||
<field name="product_id" ref="product.product_product_24"/> |
|||
<field name="product_uom_qty">3</field> |
|||
<field name="price_unit">555</field> |
|||
</record> |
|||
|
|||
<workflow action="order_confirm" model="sale.order" ref="sale_order_2"/> |
|||
|
|||
</data></openerp> |
@ -1,7 +0,0 @@ |
|||
<openerp><data> |
|||
|
|||
<record id="stock.picking_type_out" model="stock.picking.type"> |
|||
<field name="available_in_pos" eval="True" /> |
|||
</record> |
|||
|
|||
</data></openerp> |
@ -0,0 +1,8 @@ |
|||
To configure this module, you need to: |
|||
|
|||
* Go to Point Of Sale / Configuration / Point of Sale |
|||
* Check the box 'Create Sale Orders' |
|||
* Select the desired default behaviour |
|||
|
|||
.. figure:: ../static/description/pos_config_form.png |
|||
:width: 800 px |
@ -0,0 +1 @@ |
|||
* Sylvain LE GAL (https://www.twitter.com/legalsylvain) |
@ -0,0 +1,52 @@ |
|||
This module extends the functionality of point of sale to allow sale orders |
|||
creation from the Point of Sale. |
|||
|
|||
|
|||
In the POS UI, buttons has been added to create a sale order and discard |
|||
the current POS order. |
|||
|
|||
This module is usefull in many cases, for exemple : |
|||
|
|||
* take orders with a very simple interface |
|||
|
|||
* if you have some customers that come every day in your shop, but want to |
|||
have a unique invoice at the end of the month. With that module, you can |
|||
create a sale order and deliver products every time to keep your stock value |
|||
correct, and to create a unique invoice, when you want. |
|||
|
|||
|
|||
Three options are available: |
|||
|
|||
* **Create a draft Order** |
|||
A new sale order in a draft mode will be created that can be changed later. |
|||
|
|||
.. figure:: ../static/description/pos_create_picking_option_1.png |
|||
:width: 800 px |
|||
|
|||
* **Create a Confirmed Order** |
|||
A new sale order will be created and confirmed. |
|||
|
|||
.. figure:: ../static/description/pos_create_picking_option_2.png |
|||
:width: 800 px |
|||
|
|||
* **Create Delivered Picking** (by default) |
|||
A new sale order will be created and confirmed. the associated picking |
|||
will be marked as delivered. |
|||
|
|||
.. figure:: ../static/description/pos_create_picking_option_3.png |
|||
:width: 800 px |
|||
|
|||
|
|||
**Technical Notes** |
|||
|
|||
* Some hooks are defined in the JS file, to define custom behaviour after |
|||
having created the sale order (and the stock picking). |
|||
|
|||
* Some prepare functions are available in the sale.order model, to overload |
|||
the creation of the sale order. |
|||
|
|||
* You could be interested by another module, pos_sale_order, that completely |
|||
alter Point of Sale module, avoiding creating Pos Orders, and creating |
|||
allways Sale Orders. |
|||
This module is a WIP state, and is available here: |
|||
https://github.com/OCA/pos/pull/35 |
@ -0,0 +1,11 @@ |
|||
* Because of the poor design of the Odoo Point of Sale, some basic features |
|||
are not available by default, like pricelist, fiscal position, etc ... |
|||
For that reason, unit price will be recomputed by default, when creating the |
|||
sale order, and the unit price of the current bill will not be used. |
|||
|
|||
Note that this problem is fixed if ``pos_pricelist`` is installed. |
|||
(same repository) In that cases, the pricelist, the unit prices and the taxes |
|||
will be the same in the order, as in the displayed bill. |
|||
|
|||
.. figure:: ../static/description/pos_create_picking_confirm.png |
|||
:width: 800 px |
@ -0,0 +1,12 @@ |
|||
/* |
|||
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop) |
|||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
*/ |
|||
|
|||
/*Redefine here, the style defined in web module (base.css), because this file |
|||
is not loaded in the point of sale.*/ |
|||
.blockUI.blockOverlay { |
|||
background-color: black; |
|||
opacity: 0.6; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue