Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] pos_picking_load: Migration to 16.0 #1266

Open
wants to merge 37 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
96bdcb4
[ADD] new module pos_picking_load (#183)
legalsylvain Jul 12, 2017
b9b3f88
OCA Transbot updated translations from Transifex
oca-transbot Jul 15, 2017
a63d7fa
[ADD] Make pos session available when selecting pickings
StefanRijnhart Jul 20, 2017
f7012ef
OCA Transbot updated translations from Transifex
oca-transbot Jul 22, 2017
388904d
[IMP] Link new picking to original sale order
StefanRijnhart Jul 20, 2017
c448bc0
[IMP] API consistency
StefanRijnhart Jul 20, 2017
8af319b
OCA Transbot updated translations from Transifex
oca-transbot Sep 2, 2017
3d88472
OCA Transbot updated translations from Transifex
oca-transbot Oct 28, 2017
2dcd8ef
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
d63ea50
[UPD] Update pos_picking_load.pot
oca-travis Jun 22, 2018
ea94502
[FIX] picking lines quantity are correcty loaded
legalsylvain Apr 9, 2018
1c4ed3a
[UPD] Update pos_picking_load.pot
oca-travis Aug 1, 2018
4384255
[MIG][10.0] pos_picking_load.
legalsylvain Jan 6, 2019
055eada
[MIG][12.0] pos_picking_load (from 10.0)
legalsylvain Jul 5, 2019
a77389b
[UPD] Update pos_picking_load.pot
oca-travis Aug 31, 2020
ec91d9c
[UPD] README.rst
OCA-git-bot Aug 31, 2020
5c8ecc7
[ADD] icon.png
OCA-git-bot Aug 31, 2020
cf4a332
pos_picking_load 12.0.1.0.1
OCA-git-bot Aug 31, 2020
2000cbe
pos_picking_load: returning widgets
Du-ma Sep 9, 2020
a4b21bb
pos_picking_load 12.0.1.0.2
OCA-git-bot Sep 9, 2020
1bef580
Update translation files
oca-transbot Oct 6, 2020
73fa0b2
Translated using Weblate (German)
marylla Oct 21, 2020
32673d8
Translated using Weblate (Spanish)
danimv5 Oct 26, 2020
fb07b41
Update translation files
oca-transbot Nov 22, 2020
b26a807
Translated using Weblate (Italian)
francesco-ooops Oct 7, 2021
cb64bfb
Translated using Weblate (Catalan)
Noel000 Apr 13, 2022
f3aae16
[IMP] pre-commit run -a
ivantodorovich Jul 12, 2022
20a0218
pos_picking_load 12.0.1.0.3
OCA-git-bot Aug 5, 2022
6597b3a
Translated using Weblate (Italian)
mymage Mar 17, 2023
4d2c783
Translated using Weblate (Italian)
francesco-ooops Apr 7, 2023
cb191b7
Translated using Weblate (Italian)
francesco-ooops Jul 17, 2023
775cf04
[UPD] README.rst
OCA-git-bot Sep 3, 2023
6ccab00
Translated using Weblate (Italian)
mymage Nov 22, 2023
92ade6a
Translated using Weblate (Italian)
mymage Jan 25, 2024
21aa50e
Translated using Weblate (Italian)
mymage Aug 22, 2024
96ba61b
[IMP] pos_picking_load: pre-commit stuff
HeliconiaSolutions Nov 27, 2024
5859239
[MIG] pos_picking_load: Migration to 16.0
HeliconiaSolutions Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 231 additions & 0 deletions pos_picking_load/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
============================
Point Of Sale - Picking Load
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f611363ccf5abedf323385e889a842a9338fc5a6f55cec96ea24959a9a87bcb2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/16.0/pos_picking_load
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_picking_load
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the functionality of point of sale to allow you to
load your pickings in the Point of Sale, in order to add / remove products
and so create a PoS Order and mark it as paid.

**Detailled Use Case**

This module is usefull for the following use case

* You have many Sale Orders that have generated pickings. Typically if you have
connected your Odoo instance to an online store like Shop Invader,
Prestashop, Magento, or if you use light Odoo shop (``website_sale``
module).
* Once the order validated, you prepare your pickings
* The customer come in your shop to recover his order
* the customer add (or remove) some products
* the customer pay his order, based on the real delivered products list

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to:

#. Go to Warehouse / Configuration / Types of Operation
#. Select the picking type(s) you want to see in the point of sale
#. Check the box 'Available in Point of Sale'

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/stock_picking_type_form.png
:width: 800 px

Note: This box is NOT enabled by default except in demo data for the type
'Delivery Orders' of the demo company 'YourCompany'.

#. Go to Point of Sale / Configuration / Point of Sales
#. Select the Point(s) of Sales witch those you want to enable the feature
#. Check the box 'Load Pickings'
#. Set the max quantity of pickings you want to load

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/pos_config_form.png
:width: 800 px

Note: This box is enabled by default

**Technical Notes**

* By default, the Point of Sale will display only the pickings if the state is
in 'Waiting Availability', 'Partially Available' or 'Ready to Transfer'.

You can change this filter by overloading the ``_prepare_filter_for_pos``
function of the model ``stock.picking``.

* By default, the search of pickings will be done on the fields ``name``,
``origin`` and ``partner_id`` of the picking.

You can change this feature by overloading the
``_prepare_filter_query_for_pos`` function of the model ``stock.picking``.

* By default, when the PoS order is confirmed, the original picking is
cancelled and the sale order is set to the state 'Done'.

You can change this behaviour by overloading
``_handle_orders_with_original_picking`` function of the model ``pos.order``.

Usage
=====

To use this module, you need to:

* Launch the point of sale
* On a new order (without lines), click on the 'Load Picking' button.

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_01_load_button.png
:width: 800 px

* Point of sale will load available pickings. (About displayed pickings, see
'Technical Notes' section).

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_02_picking_list.png
:width: 800 px

* Click on a picking will check if the picking is loadable and if yes, will
display a 'Select' button. (See 'Possible Warnings' Section)

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_03_confirm.png
:width: 800 px

* Confirm the selection, by clicking on 'Select' button. It will display
the content of the moves (as PoS Order Lines)

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_04_pos_order.png
:width: 800 px

The price and the discount will be the sale price and the discount set in
the according Sale Order Line, if it was found. Otherwise, discount will be
set to 0, and unit price will be the unit price of the product when it has been
loaded in the Point of Sale.

**Related Sale Order:**

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_sale_order.png
:width: 800 px

**Related Picking:**

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_stock_picking.png
:width: 800 px


* Finally, you can add / remove products or change quantity and collect the
payment.

When, the order is marked as paid, the original picking will be cancelled,
because Point Of Sale generates a new picking related to the real delivered
products and the original Sale Order will pass to the state 'Done'. (Delivery
exception is ignored).
(See 'Technical Notes' section).

**Possible Warnings**

Some warning messages can appear:

* if some products are not available in the Point of Sale

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_warning_product.png
:width: 800 px

* if the partner is not available in the Point of Sale

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_warning_partner.png
:width: 800 px

* if the picking has been still loaded in another PoS order

.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_warning_picking_still_loaded.png
:width: 800 px

Known issues / Roadmap
======================

* This module will try to get original unit price from the sale order and not
use the Current unit price of the product.
(The price at which you pledged to sell the product).
Some VAT troubles will occure if a product is set with VAT marked as
'VAT included' and if in the sale order line, there are some VAT marked as
'VAT excluded' for exemple.

**The VAT settings should be consistent.**

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_picking_load%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* GRAP

Contributors
~~~~~~~~~~~~

* Sylvain LE GAL (https://twitter.com/legalsylvain)
* Stefan Rijnhart <stefan@opener.am>
* `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-legalsylvain|

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_picking_load>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions pos_picking_load/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (C) 2017 - 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).

from . import models
42 changes: 42 additions & 0 deletions pos_picking_load/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (C) 2017 - 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).
{
"name": "Point Of Sale - Picking Load",
"summary": "Load and confirm stock pickings via Point Of Sale",
"version": "16.0.1.0.0",
"category": "Point Of Sale",
"author": "GRAP,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
"license": "AGPL-3",
"maintainers": ["legalsylvain"],
"development_status": "Beta",
"depends": [
"sale_stock",
"point_of_sale",
],
"data": [
"views/view_pos_config.xml",
"views/view_sale_order.xml",
"views/view_stock_picking.xml",
"views/view_stock_picking_type.xml",
],
"assets": {
"point_of_sale.assets": [
"/pos_picking_load/static/src/css/pos_picking_load.css",
"/pos_picking_load/static/src/js/LoadPickingButtonWidget.js",
"/pos_picking_load/static/src/xml/LoadPickingButtonWidget.xml",
"/pos_picking_load/static/src/xml/screen/LoadPickingScreenWidget.xml",
"/pos_picking_load/static/src/xml/screen/PickingLoadControlPanel.xml",
"/pos_picking_load/static/src/xml/screen/PickingLoadList.xml",
"/pos_picking_load/static/src/xml/screen/PickingLoadRow.xml",
"/pos_picking_load/static/src/js/Screen/LoadPickingScreenWidget.js",
"/pos_picking_load/static/src/js/Screen/PickingLoadControlPanel.js",
"/pos_picking_load/static/src/js/Screen/PickingLoadFetcher.js",
"/pos_picking_load/static/src/js/Screen/PickingLoadList.js",
"/pos_picking_load/static/src/js/Screen/PickingLoadRow.js",
"/pos_picking_load/static/src/js/db.js",
]
},
"installable": True,
}
31 changes: 31 additions & 0 deletions pos_picking_load/demo/product_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<odoo>

<!-- for demo pickings created by this module -->

<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>

<!-- For demo pickings created before the installation of this module -->

<record id="product.product_product_27_product_template" model="product.template">
<field name="available_in_pos" eval="True" />
</record>

<record id="product.product_product_6_product_template" model="product.template">
<field name="available_in_pos" eval="True" />
</record>

</odoo>
7 changes: 7 additions & 0 deletions pos_picking_load/demo/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<odoo>

<record id="sale.group_discount_per_so_line" model="res.groups">
<field name="users" eval="[(4, ref('base.user_admin'))]" />
</record>

</odoo>
10 changes: 10 additions & 0 deletions pos_picking_load/demo/res_partner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<odoo>

<!-- Fix Odoo Demo data:
Picking WH/OUT/0008 is associated to a customer 'Wood Corner'
that is not flagged as a customer -->
<record id="base.res_partner_1" model="res.partner">
<field name="customer" eval="True" />
</record>

</odoo>
53 changes: 53 additions & 0 deletions pos_picking_load/demo/sale_order.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<odoo>

<!-- 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>
<field name="price_unit">100</field>
<field name="discount">20</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>

<function model="sale.order" name="action_confirm" eval="[[ref('sale_order_1')]]" />

<!-- Sale Order 2-->
<record id="sale_order_2" model="sale.order">
<field name="partner_id" ref="base.res_partner_18" />
<!-- <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>

<function model="sale.order" name="action_confirm" eval="[[ref('sale_order_2')]]" />

</odoo>
7 changes: 7 additions & 0 deletions pos_picking_load/demo/stock_picking_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<odoo>

<record id="stock.picking_type_out" model="stock.picking.type">
<field name="available_in_pos" eval="True" />
</record>

</odoo>
Loading
Loading