Skip to content

Commit

Permalink
[IMP] pos_picking_load: pre-commit stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HeliconiaSolutions committed Dec 27, 2024
1 parent 21aa50e commit 96ba61b
Show file tree
Hide file tree
Showing 24 changed files with 467 additions and 383 deletions.
32 changes: 16 additions & 16 deletions pos_picking_load/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Point Of Sale - Picking Load
: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/12.0/pos_picking_load
: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-12-0/pos-12-0-pos_picking_load
: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=12.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -59,7 +59,7 @@ To configure this module, you need to:
#. 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/12.0/pos_picking_load/static/description/stock_picking_type_form.png
.. 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
Expand All @@ -70,7 +70,7 @@ Note: This box is NOT enabled by default except in demo data for the type
#. Check the box 'Load Pickings'
#. Set the max quantity of pickings you want to load

.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_picking_load/static/description/pos_config_form.png
.. 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
Expand Down Expand Up @@ -103,25 +103,25 @@ 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/12.0/pos_picking_load/static/description/load_picking_01_load_button.png
.. 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/12.0/pos_picking_load/static/description/load_picking_02_picking_list.png
.. 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/12.0/pos_picking_load/static/description/load_picking_03_confirm.png
.. 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/12.0/pos_picking_load/static/description/load_picking_04_pos_order.png
.. 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
Expand All @@ -131,12 +131,12 @@ loaded in the Point of Sale.

**Related Sale Order:**

.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_picking_load/static/description/load_picking_sale_order.png
.. 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/12.0/pos_picking_load/static/description/load_picking_stock_picking.png
.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_picking_load/static/description/load_picking_stock_picking.png
:width: 800 px


Expand All @@ -155,17 +155,17 @@ Some warning messages can appear:

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

.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_picking_load/static/description/load_picking_warning_product.png
.. 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/12.0/pos_picking_load/static/description/load_picking_warning_partner.png
.. 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/12.0/pos_picking_load/static/description/load_picking_warning_picking_still_loaded.png
.. 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
Expand All @@ -186,7 +186,7 @@ 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:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`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.

Expand Down Expand Up @@ -225,6 +225,6 @@ 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/12.0/pos_picking_load>`_ project on GitHub.
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.
54 changes: 27 additions & 27 deletions pos_picking_load/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@
# @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': '12.0.1.0.3',
'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',
"name": "Point Of Sale - Picking Load",
"summary": "Load and confirm stock pickings via Point Of Sale",
"version": "12.0.1.0.3",
"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',
'views/pos_picking_load.xml',
"data": [
"views/view_pos_config.xml",
"views/view_sale_order.xml",
"views/view_stock_picking.xml",
"views/view_stock_picking_type.xml",
"views/pos_picking_load.xml",
],
'demo': [
'demo/res_groups.xml',
'demo/res_partner.xml',
'demo/product_template.xml',
'demo/sale_order.xml',
'demo/stock_picking_type.xml',
"demo": [
"demo/res_groups.xml",
"demo/res_partner.xml",
"demo/product_template.xml",
"demo/sale_order.xml",
"demo/stock_picking_type.xml",
],
'qweb': [
'static/src/xml/pos_picking_load.xml',
"qweb": [
"static/src/xml/pos_picking_load.xml",
],
'installable': True,
"installable": True,
}
12 changes: 6 additions & 6 deletions pos_picking_load/demo/product_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
<!-- 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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<field name="available_in_pos" eval="True" />
</record>

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

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

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

<!-- Fix Odoo Demo data:
<!-- 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"/>
<field name="customer" eval="True" />
</record>

</odoo>
28 changes: 14 additions & 14 deletions pos_picking_load/demo/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@

<!-- Sale Order 1-->
<record id="sale_order_1" model="sale.order">
<field name="partner_id" ref="base.res_partner_2"/>
<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="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="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')]]"/>
<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="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="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="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="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')]]"/>
<function model="sale.order" name="action_confirm" eval="[[ref('sale_order_2')]]" />

</odoo>
9 changes: 5 additions & 4 deletions pos_picking_load/models/pos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import models, fields
from odoo import fields, models


class PosConfig(models.Model):
_inherit = 'pos.config'
_inherit = "pos.config"

iface_load_picking = fields.Boolean(string='Load Pickings', default=True)
iface_load_picking = fields.Boolean(string="Load Pickings", default=True)

iface_load_picking_max_qty = fields.Integer(
string='Max Picking Quantity To Load', default=10, required=True)
string="Max Picking Quantity To Load", default=10, required=True
)
Loading

0 comments on commit 96ba61b

Please sign in to comment.