Skip to content

Commit d3996ba

Browse files
committed
[15.0][ADD] fieldservice_delivery_quantities: New module fieldservice_delivery_quantities
1 parent d167fc5 commit d3996ba

File tree

18 files changed

+912
-0
lines changed

18 files changed

+912
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
===================================
2+
Field Service - Delivery Quantities
3+
===================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:60033754ac2be32ebb95bfdb63893711e80b16b6ced166859931bc6c8aad6c35
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github
20+
:target: https://github.com/OCA/field-service/tree/15.0/fieldservice_delivery_quantities
21+
:alt: OCA/field-service
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_delivery_quantities
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=15.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
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`.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Usage
39+
=====
40+
41+
1. Create a sales order with a field service product and confirm it.
42+
- Create a sales order.
43+
- Choose a customer with an FSM location, for example, `Test Location`.
44+
- Add a product with the `Field Service Tracking` option set to `Create one FSM order per sale order`.
45+
- Confirm the sales order to generate the corresponding stock picking and FSM order.
46+
47+
2. Check quantities to be delivered.
48+
- Navigate to `Field Service` > `Operations` > `Delivery Quantities`.
49+
- 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`.
50+
51+
Bug Tracker
52+
===========
53+
54+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/issues>`_.
55+
In case of trouble, please check there if your issue has already been reported.
56+
If you spotted it first, help us to smash it by providing a detailed and welcomed
57+
`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**>`_.
58+
59+
Do not contact contributors directly about support or help with technical issues.
60+
61+
Credits
62+
=======
63+
64+
Authors
65+
~~~~~~~
66+
67+
* APSL-Nagarro
68+
69+
Contributors
70+
~~~~~~~~~~~~
71+
72+
* `APSL-Nagarro <https://www.apsl.tech>`_:
73+
* Patryk Pyczko <ppyczko@apsl.net>
74+
75+
Maintainers
76+
~~~~~~~~~~~
77+
78+
This module is maintained by the OCA.
79+
80+
.. image:: https://odoo-community.org/logo.png
81+
:alt: Odoo Community Association
82+
:target: https://odoo-community.org
83+
84+
OCA, or the Odoo Community Association, is a nonprofit organization whose
85+
mission is to support the collaborative development of Odoo features and
86+
promote its widespread use.
87+
88+
.. |maintainer-ppyczko| image:: https://github.com/ppyczko.png?size=40px
89+
:target: https://github.com/ppyczko
90+
:alt: ppyczko
91+
92+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
93+
94+
|maintainer-ppyczko|
95+
96+
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/15.0/fieldservice_delivery_quantities>`_ project on GitHub.
97+
98+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2025 Patryk Pyczko (APSL-Nagarro)<ppyczko@apsl.net>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Field Service - Delivery Quantities",
6+
"version": "15.0.1.0.0",
7+
"summary": "This module provides an easy way to review the quantities to be ",
8+
"delivered on a given day." "category": "Field Service",
9+
"website": "https://github.com/OCA/field-service",
10+
"author": "APSL-Nagarro, Odoo Community Association (OCA)",
11+
"maintainers": ["ppyczko"],
12+
"license": "AGPL-3",
13+
"application": False,
14+
"installable": True,
15+
"depends": ["fieldservice_sale_stock", "fieldservice_route"],
16+
"data": ["security/ir_rule.xml", "views/stock_move_views.xml", "views/menu.xml"],
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * fieldservice_delivery_quantities
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2025-01-30 09:06+0000\n"
10+
"PO-Revision-Date: 2025-01-30 09:06+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: fieldservice_delivery_quantities
19+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
20+
msgid "Day"
21+
msgstr "Dia"
22+
23+
#. module: fieldservice_delivery_quantities
24+
#: model:ir.model.fields,field_description:fieldservice_delivery_quantities.field_stock_move__fsm_dayroute_id
25+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
26+
msgid "Day Route"
27+
msgstr "Ruta del Dia"
28+
29+
#. module: fieldservice_delivery_quantities
30+
#: model:ir.actions.act_window,name:fieldservice_delivery_quantities.action_stock_move_dayroute
31+
#: model:ir.ui.menu,name:fieldservice_delivery_quantities.menu_stock_move_dayroute
32+
msgid "Delivery Quantities"
33+
msgstr "Quantitats a Lliurar"
34+
35+
#. module: fieldservice_delivery_quantities
36+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
37+
msgid "Next 14 Days' Deliveries"
38+
msgstr "Lliuraments dels Propers 14 Dies"
39+
40+
#. module: fieldservice_delivery_quantities
41+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
42+
msgid "Next 7 Days' Deliveries"
43+
msgstr "Lliuraments dels Propers 7 Dies"
44+
45+
#. module: fieldservice_delivery_quantities
46+
#: model_terms:ir.actions.act_window,help:fieldservice_delivery_quantities.action_stock_move_dayroute
47+
msgid "No deliveries found."
48+
msgstr "No s'han trobat lliuraments."
49+
50+
#. module: fieldservice_delivery_quantities
51+
#: model:ir.model,name:fieldservice_delivery_quantities.model_stock_move
52+
msgid "Stock Move"
53+
msgstr "Moviment d'estoc"
54+
55+
#. module: fieldservice_delivery_quantities
56+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
57+
msgid "Today's Deliveries"
58+
msgstr "Lliuraments d'Avui"
59+
60+
#. module: fieldservice_delivery_quantities
61+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
62+
msgid "Tomorrow's Deliveries"
63+
msgstr "Lliuraments de Demà"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * fieldservice_delivery_quantities
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2025-01-30 09:06+0000\n"
10+
"PO-Revision-Date: 2025-01-30 09:06+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: fieldservice_delivery_quantities
19+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
20+
msgid "Day"
21+
msgstr "Día"
22+
23+
#. module: fieldservice_delivery_quantities
24+
#: model:ir.model.fields,field_description:fieldservice_delivery_quantities.field_stock_move__fsm_dayroute_id
25+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
26+
msgid "Day Route"
27+
msgstr "Ruta del Día"
28+
29+
#. module: fieldservice_delivery_quantities
30+
#: model:ir.actions.act_window,name:fieldservice_delivery_quantities.action_stock_move_dayroute
31+
#: model:ir.ui.menu,name:fieldservice_delivery_quantities.menu_stock_move_dayroute
32+
msgid "Delivery Quantities"
33+
msgstr "Cantidades a Entregar"
34+
35+
#. module: fieldservice_delivery_quantities
36+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
37+
msgid "Next 14 Days' Deliveries"
38+
msgstr "Entregas de los Próximos 14 Días"
39+
40+
#. module: fieldservice_delivery_quantities
41+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
42+
msgid "Next 7 Days' Deliveries"
43+
msgstr "Entregas de los Próximos 7 Días"
44+
45+
#. module: fieldservice_delivery_quantities
46+
#: model_terms:ir.actions.act_window,help:fieldservice_delivery_quantities.action_stock_move_dayroute
47+
msgid "No deliveries found."
48+
msgstr "No se encontraron entregas."
49+
50+
#. module: fieldservice_delivery_quantities
51+
#: model:ir.model,name:fieldservice_delivery_quantities.model_stock_move
52+
msgid "Stock Move"
53+
msgstr "Movimiento de Existencias"
54+
55+
#. module: fieldservice_delivery_quantities
56+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
57+
msgid "Today's Deliveries"
58+
msgstr "Entregas de Hoy"
59+
60+
#. module: fieldservice_delivery_quantities
61+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
62+
msgid "Tomorrow's Deliveries"
63+
msgstr "Entregas de Mañana"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * fieldservice_delivery_quantities
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2025-01-30 09:07+0000\n"
10+
"PO-Revision-Date: 2025-01-30 09:07+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: fieldservice_delivery_quantities
19+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
20+
msgid "Day"
21+
msgstr ""
22+
23+
#. module: fieldservice_delivery_quantities
24+
#: model:ir.model.fields,field_description:fieldservice_delivery_quantities.field_stock_move__fsm_dayroute_id
25+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
26+
msgid "Day Route"
27+
msgstr ""
28+
29+
#. module: fieldservice_delivery_quantities
30+
#: model:ir.actions.act_window,name:fieldservice_delivery_quantities.action_stock_move_dayroute
31+
#: model:ir.ui.menu,name:fieldservice_delivery_quantities.menu_stock_move_dayroute
32+
msgid "Delivery Quantities"
33+
msgstr ""
34+
35+
#. module: fieldservice_delivery_quantities
36+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
37+
msgid "Next 14 Days' Deliveries"
38+
msgstr ""
39+
40+
#. module: fieldservice_delivery_quantities
41+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
42+
msgid "Next 7 Days' Deliveries"
43+
msgstr ""
44+
45+
#. module: fieldservice_delivery_quantities
46+
#: model_terms:ir.actions.act_window,help:fieldservice_delivery_quantities.action_stock_move_dayroute
47+
msgid "No deliveries found."
48+
msgstr ""
49+
50+
#. module: fieldservice_delivery_quantities
51+
#: model:ir.model,name:fieldservice_delivery_quantities.model_stock_move
52+
msgid "Stock Move"
53+
msgstr ""
54+
55+
#. module: fieldservice_delivery_quantities
56+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
57+
msgid "Today's Deliveries"
58+
msgstr ""
59+
60+
#. module: fieldservice_delivery_quantities
61+
#: model_terms:ir.ui.view,arch_db:fieldservice_delivery_quantities.view_move_search_dayroute
62+
msgid "Tomorrow's Deliveries"
63+
msgstr ""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import stock_move
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2025 Patryk Pyczko (APSL-Nagarro)<ppyczko@apsl.net>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class StockMove(models.Model):
8+
_inherit = "stock.move"
9+
10+
fsm_dayroute_id = fields.Many2one(
11+
"fsm.route.dayroute",
12+
related="fsm_order_id.dayroute_id",
13+
string="Day Route",
14+
store=True,
15+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* `APSL-Nagarro <https://www.apsl.tech>`_:
2+
* Patryk Pyczko <ppyczko@apsl.net>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
1. Create a sales order with a field service product and confirm it.
2+
- Create a sales order.
3+
- Choose a customer with an FSM location, for example, `Test Location`.
4+
- Add a product with the `Field Service Tracking` option set to `Create one FSM order per sale order`.
5+
- Confirm the sales order to generate the corresponding stock picking and FSM order.
6+
7+
2. Check quantities to be delivered.
8+
- Navigate to `Field Service` > `Operations` > `Delivery Quantities`.
9+
- 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`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
4+
<!-- Record Rule for FSM Users -->
5+
<record id="stock_move_dayroute_fsm_user_rule" model="ir.rule">
6+
<field name="name">Stock Move FSM User Access</field>
7+
<field name="model_id" ref="stock.model_stock_move" />
8+
<field
9+
name="domain_force"
10+
>[('fsm_order_id.dayroute_id.person_id.partner_id.id', '=',
11+
user.partner_id.id)]</field>
12+
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_user_own'))]" />
13+
</record>
14+
15+
<!-- Record Rule for FSM Managers -->
16+
<record id="stock_move_dayroute_fsm_manager_rule" model="ir.rule">
17+
<field name="name">Stock Move FSM Manager Access</field>
18+
<field name="model_id" ref="stock.model_stock_move" />
19+
<field name="domain_force">[('id', '!=', False)]</field>
20+
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_manager'))]" />
21+
</record>
22+
23+
<!-- Record Rule for FSM Dispatchers -->
24+
<record id="stock_move_dayroute_fsm_dispatcher_rule" model="ir.rule">
25+
<field name="name">Stock Move FSM Dispatcher Access</field>
26+
<field name="model_id" ref="stock.model_stock_move" />
27+
<field name="domain_force">[('id', '!=', False)]</field>
28+
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_dispatcher'))]" />
29+
</record>
30+
31+
</odoo>
Loading

0 commit comments

Comments
 (0)