Skip to content

Commit

Permalink
[ADD] foodhub_picking_operations
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-champonnois committed Dec 12, 2024
1 parent 175dcd8 commit 8e5d42c
Show file tree
Hide file tree
Showing 11 changed files with 541 additions and 0 deletions.
58 changes: 58 additions & 0 deletions foodhub_picking_operations/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
==========================
Foodhub Picking Operations
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7d681b62ded7841560c15427c9d8b30b35a514b6c31f2c2b36c47419e1e1120c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-coopiteasy%2Fcie--custom-lightgray.png?logo=github
:target: https://github.com/coopiteasy/cie-custom/tree/16.0/foodhub_picking_operations
:alt: coopiteasy/cie-custom

|badge1| |badge2| |badge3|

Sort picking operations by internal category and internal reference.

Context : Increase the efficiency of picking by sorting products by location and priority. We cannot use "locations" because some products are of type Consumable and should stay this way : these are products that are received and sent on the same date, we don't want to manage stock on these products.
So instead we sort by internal categories and by reference.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/cie-custom/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/coopiteasy/cie-custom/issues/new?body=module:%20foodhub_picking_operations%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
~~~~~~~

* Coop IT Easy SC

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

This module is part of the `coopiteasy/cie-custom <https://github.com/coopiteasy/cie-custom/tree/16.0/foodhub_picking_operations>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions foodhub_picking_operations/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions foodhub_picking_operations/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Foodhub Picking Operations",
"version": "16.0.1.0.0",
"summary": """
Foodhub customizations : sort picking operations by category and reference""",
"author": "Coop IT Easy SC",
"website": "https://coopiteasy.be",
"license": "AGPL-3",
"category": "Stock",
"depends": [
"stock",
],
"data": ["reports/report_picking_operations.xml"],
}
2 changes: 2 additions & 0 deletions foodhub_picking_operations/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import stock_move
from . import stock_move_line
13 changes: 13 additions & 0 deletions foodhub_picking_operations/models/stock_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2020 Coop IT Easy SCRL fs
# Robin Keunen <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class StockMove(models.Model):
_inherit = "stock.move"
_order = "product_category,product_default_code"

product_category = fields.Many2one(related="product_id.categ_id", store=True)
product_default_code = fields.Char(related="product_id.default_code", store=True)
12 changes: 12 additions & 0 deletions foodhub_picking_operations/models/stock_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2020 Coop IT Easy SCRL fs
# Robin Keunen <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class StockMove(models.Model):
_inherit = "stock.move.line"
_order = "product_category_name,product_default_code"

product_default_code = fields.Char(related="product_id.default_code", store=True)
4 changes: 4 additions & 0 deletions foodhub_picking_operations/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Sort picking operations by internal category and internal reference.

Context : Increase the efficiency of picking by sorting products by location and priority. We cannot use "locations" because some products are of type Consumable and should stay this way : these are products that are received and sent on the same date, we don't want to manage stock on these products.
So instead we sort by internal categories and by reference.
20 changes: 20 additions & 0 deletions foodhub_picking_operations/reports/report_picking_operations.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_picking" inherit_id="stock.report_picking">
<xpath expr="//th[@name='th_product']" position="before">
<th>
<strong>Category</strong>
</th>
</xpath>

<xpath
expr="//span[@t-field='ml.product_id.display_name']/.."
position="before"
>
<td>
<span t-field="ml.product_category_name" />
</td>
</xpath>

</template>
</odoo>
Loading

0 comments on commit 8e5d42c

Please sign in to comment.