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

[15.0][ADD] fieldservice_delivery_quantities: New module fieldservice_delivery_quantities #1309

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
98 changes: 98 additions & 0 deletions fieldservice_delivery_quantities/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
===================================
Field Service - Delivery Quantities
===================================

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

.. |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%2Ffield--service-lightgray.png?logo=github
:target: https://github.com/OCA/field-service/tree/15.0/fieldservice_delivery_quantities
:alt: OCA/field-service
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_delivery_quantities
: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/field-service&target_branch=15.0
:alt: Try me on Runboat

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

This module provides an easy way to review the quantities scheduled for delivery on a given day. By default, it groups stock moves by the `Day` and `Product` fields and displays today's stock moves. Additional filters are available, including `Tomorrow's Deliveries`, `Next 7 Days' Deliveries`, and `Next 14 Days' Deliveries`.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Create a sales order with a field service product and confirm it.
- Create a sales order.
- Choose a customer with an FSM location, for example, `Test Location`.
- Add a product with the `Field Service Tracking` option set to `Create one FSM order per sale order`.
- Confirm the sales order to generate the corresponding stock picking and FSM order.

2. Check quantities to be delivered.
- Navigate to `Field Service` > `Operations` > `Delivery Quantities`.
- Stock moves are grouped, by default, by the `Day` and `Product` fields, and filtered to show today's stock moves. This allows the user to see, at a quick glance, the quantities to be delivered on a given day. Further filters are available, such as `Tomorrow's Deliveries`, `Next 7 Days' Deliveries`, and `Next 14 Days' Deliveries`.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/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/field-service/issues/new?body=module:%20fieldservice_delivery_quantities%0Aversion:%2015.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
~~~~~~~

* APSL-Nagarro

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

* `APSL-Nagarro <https://www.apsl.tech>`_:
* Patryk Pyczko <[email protected]>

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-ppyczko| image:: https://github.com/ppyczko.png?size=40px
:target: https://github.com/ppyczko
:alt: ppyczko

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

|maintainer-ppyczko|

This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/15.0/fieldservice_delivery_quantities>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions fieldservice_delivery_quantities/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
17 changes: 17 additions & 0 deletions fieldservice_delivery_quantities/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2025 Patryk Pyczko (APSL-Nagarro)<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Field Service - Delivery Quantities",
"version": "15.0.1.0.0",
"summary": "This module provides an easy way to review the quantities to be ",
"delivered on a given day." "category": "Field Service",
"website": "https://github.com/OCA/field-service",
"author": "APSL-Nagarro, Odoo Community Association (OCA)",
"maintainers": ["ppyczko"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["fieldservice_sale_stock", "fieldservice_route"],
"data": ["security/ir_rule.xml", "views/stock_move_views.xml", "views/menu.xml"],
}
63 changes: 63 additions & 0 deletions fieldservice_delivery_quantities/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_delivery_quantities
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-30 09:06+0000\n"
"PO-Revision-Date: 2025-01-30 09:06+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Day"
msgstr "Dia"

#. module: fieldservice_delivery_quantities
#: model:ir.model.fields,field_description:fieldservice_delivery_quantities.field_stock_move__fsm_dayroute_id
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Day Route"
msgstr "Ruta del Dia"

#. module: fieldservice_delivery_quantities
#: model:ir.actions.act_window,name:fieldservice_delivery_quantities.action_stock_move_dayroute
#: model:ir.ui.menu,name:fieldservice_delivery_quantities.menu_stock_move_dayroute
msgid "Delivery Quantities"
msgstr "Quantitats a Lliurar"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Next 14 Days' Deliveries"
msgstr "Lliuraments dels Propers 14 Dies"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Next 7 Days' Deliveries"
msgstr "Lliuraments dels Propers 7 Dies"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.actions.act_window,help:fieldservice_delivery_quantities.action_stock_move_dayroute
msgid "No deliveries found."
msgstr "No s'han trobat lliuraments."

#. module: fieldservice_delivery_quantities
#: model:ir.model,name:fieldservice_delivery_quantities.model_stock_move
msgid "Stock Move"
msgstr "Moviment d'estoc"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Today's Deliveries"
msgstr "Lliuraments d'Avui"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Tomorrow's Deliveries"
msgstr "Lliuraments de Demà"
63 changes: 63 additions & 0 deletions fieldservice_delivery_quantities/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_delivery_quantities
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-30 09:06+0000\n"
"PO-Revision-Date: 2025-01-30 09:06+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Day"
msgstr "Día"

#. module: fieldservice_delivery_quantities
#: model:ir.model.fields,field_description:fieldservice_delivery_quantities.field_stock_move__fsm_dayroute_id
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Day Route"
msgstr "Ruta del Día"

#. module: fieldservice_delivery_quantities
#: model:ir.actions.act_window,name:fieldservice_delivery_quantities.action_stock_move_dayroute
#: model:ir.ui.menu,name:fieldservice_delivery_quantities.menu_stock_move_dayroute
msgid "Delivery Quantities"
msgstr "Cantidades a Entregar"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Next 14 Days' Deliveries"
msgstr "Entregas de los Próximos 14 Días"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Next 7 Days' Deliveries"
msgstr "Entregas de los Próximos 7 Días"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.actions.act_window,help:fieldservice_delivery_quantities.action_stock_move_dayroute
msgid "No deliveries found."
msgstr "No se encontraron entregas."

#. module: fieldservice_delivery_quantities
#: model:ir.model,name:fieldservice_delivery_quantities.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de Existencias"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Today's Deliveries"
msgstr "Entregas de Hoy"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Tomorrow's Deliveries"
msgstr "Entregas de Mañana"
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_delivery_quantities
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-30 09:07+0000\n"
"PO-Revision-Date: 2025-01-30 09:07+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Day"
msgstr ""

#. module: fieldservice_delivery_quantities
#: model:ir.model.fields,field_description:fieldservice_delivery_quantities.field_stock_move__fsm_dayroute_id
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Day Route"
msgstr ""

#. module: fieldservice_delivery_quantities
#: model:ir.actions.act_window,name:fieldservice_delivery_quantities.action_stock_move_dayroute
#: model:ir.ui.menu,name:fieldservice_delivery_quantities.menu_stock_move_dayroute
msgid "Delivery Quantities"
msgstr ""

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Next 14 Days' Deliveries"
msgstr ""

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Next 7 Days' Deliveries"
msgstr ""

#. module: fieldservice_delivery_quantities
#: model_terms:ir.actions.act_window,help:fieldservice_delivery_quantities.action_stock_move_dayroute
msgid "No deliveries found."
msgstr ""

#. module: fieldservice_delivery_quantities
#: model:ir.model,name:fieldservice_delivery_quantities.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Today's Deliveries"
msgstr ""

#. module: fieldservice_delivery_quantities
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
msgid "Tomorrow's Deliveries"
msgstr ""
3 changes: 3 additions & 0 deletions fieldservice_delivery_quantities/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import stock_move
15 changes: 15 additions & 0 deletions fieldservice_delivery_quantities/models/stock_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2025 Patryk Pyczko (APSL-Nagarro)<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class StockMove(models.Model):
_inherit = "stock.move"

fsm_dayroute_id = fields.Many2one(
"fsm.route.dayroute",
related="fsm_order_id.dayroute_id",
string="Day Route",
store=True,
)
2 changes: 2 additions & 0 deletions fieldservice_delivery_quantities/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* `APSL-Nagarro <https://www.apsl.tech>`_:
* Patryk Pyczko <[email protected]>
1 change: 1 addition & 0 deletions fieldservice_delivery_quantities/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module provides an easy way to review the quantities scheduled for delivery on a given day. By default, it groups stock moves by the `Day` and `Product` fields and displays today's stock moves. Additional filters are available, including `Tomorrow's Deliveries`, `Next 7 Days' Deliveries`, and `Next 14 Days' Deliveries`.
9 changes: 9 additions & 0 deletions fieldservice_delivery_quantities/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
1. Create a sales order with a field service product and confirm it.
- Create a sales order.
- Choose a customer with an FSM location, for example, `Test Location`.
- Add a product with the `Field Service Tracking` option set to `Create one FSM order per sale order`.
- Confirm the sales order to generate the corresponding stock picking and FSM order.

2. Check quantities to be delivered.
- Navigate to `Field Service` > `Operations` > `Delivery Quantities`.
- Stock moves are grouped, by default, by the `Day` and `Product` fields, and filtered to show today's stock moves. This allows the user to see, at a quick glance, the quantities to be delivered on a given day. Further filters are available, such as `Tomorrow's Deliveries`, `Next 7 Days' Deliveries`, and `Next 14 Days' Deliveries`.
31 changes: 31 additions & 0 deletions fieldservice_delivery_quantities/security/ir_rule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<!-- Record Rule for FSM Users -->
<record id="stock_move_dayroute_fsm_user_rule" model="ir.rule">
<field name="name">Stock Move FSM User Access</field>
<field name="model_id" ref="stock.model_stock_move" />
<field
name="domain_force"
>[('fsm_order_id.dayroute_id.person_id.partner_id.id', '=',
user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_user_own'))]" />
</record>

<!-- Record Rule for FSM Managers -->
<record id="stock_move_dayroute_fsm_manager_rule" model="ir.rule">
<field name="name">Stock Move FSM Manager Access</field>
<field name="model_id" ref="stock.model_stock_move" />
<field name="domain_force">[('id', '!=', False)]</field>
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_manager'))]" />
</record>

<!-- Record Rule for FSM Dispatchers -->
<record id="stock_move_dayroute_fsm_dispatcher_rule" model="ir.rule">
<field name="name">Stock Move FSM Dispatcher Access</field>
<field name="model_id" ref="stock.model_stock_move" />
<field name="domain_force">[('id', '!=', False)]</field>
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_dispatcher'))]" />
</record>

</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading