Skip to content

Commit 66ca066

Browse files
[ADD] delivery_pre_shipping: New module to send a delivery to the carrier before the picking is validated
1 parent b84250b commit 66ca066

File tree

12 files changed

+656
-0
lines changed

12 files changed

+656
-0
lines changed

delivery_pre_shipping/README.rst

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
=====================
2+
Delivery pre shipping
3+
=====================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:cc367735f9a970e27b16260e3631eb0b445a5ba74987af63f8f137936a955297
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%2Fdelivery--carrier-lightgray.png?logo=github
20+
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_pre_shipping
21+
:alt: OCA/delivery-carrier
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_pre_shipping
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/delivery-carrier&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module enables the option to send a delivery to the carrier before
32+
the picking is validated.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Use Cases / Context
40+
===================
41+
42+
In some cases or industries, it is necessary to obtain a tracking
43+
reference before validating the picking.
44+
45+
For example, when a company sells products through an external
46+
marketplace that requires a tracking number for the delivery process
47+
even though the company has not yet shipped the products, as they might
48+
still be out of stock and require resupply from a vendor.
49+
50+
The picking may be validated the next day or several days later, but a
51+
tracking number is still needed to report it to the marketplace.
52+
53+
NOTE: An alternative using the Odoo standard is to configure the
54+
warehouse with a two-step delivery process and, in the first picking
55+
type, mark the ``Generate Shipping Labels`` field so that, when
56+
validating the first picking, it is sent to the carrier and, in the
57+
second picking, the tracking reference is propagated from the first
58+
picking. However, when stock is not available, this feature does not
59+
work, which is the reason for this module.
60+
61+
Usage
62+
=====
63+
64+
- Go to any delivery order with a delivery method set.
65+
- When the picking is in the ``Assigned`` state, a button
66+
``Send to shipper manually`` will be displayed, click the button.
67+
- The picking is then sent to the carrier, and the ``tracking_ref``
68+
field will be filled in.
69+
- When the picking is validated, it is not sent to the carrier again
70+
because the ``tracking_ref`` field is already set.
71+
72+
Bug Tracker
73+
===========
74+
75+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
76+
In case of trouble, please check there if your issue has already been reported.
77+
If you spotted it first, help us to smash it by providing a detailed and welcomed
78+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_pre_shipping%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
79+
80+
Do not contact contributors directly about support or help with technical issues.
81+
82+
Credits
83+
=======
84+
85+
Authors
86+
-------
87+
88+
* Tecnativa
89+
90+
Contributors
91+
------------
92+
93+
- `Tecnativa <https://www.tecnativa.com>`__:
94+
95+
- Pedro M. Baeza
96+
- Sergio Teruel
97+
- Carlos Lopez
98+
99+
Maintainers
100+
-----------
101+
102+
This module is maintained by the OCA.
103+
104+
.. image:: https://odoo-community.org/logo.png
105+
:alt: Odoo Community Association
106+
:target: https://odoo-community.org
107+
108+
OCA, or the Odoo Community Association, is a nonprofit organization whose
109+
mission is to support the collaborative development of Odoo features and
110+
promote its widespread use.
111+
112+
.. |maintainer-carlos-lopez-tecnativa| image:: https://github.com/carlos-lopez-tecnativa.png?size=40px
113+
:target: https://github.com/carlos-lopez-tecnativa
114+
:alt: carlos-lopez-tecnativa
115+
116+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
117+
118+
|maintainer-carlos-lopez-tecnativa|
119+
120+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_pre_shipping>`_ project on GitHub.
121+
122+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

delivery_pre_shipping/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Delivery pre shipping",
3+
"version": "18.0.1.0.0",
4+
"category": "Delivery",
5+
"website": "https://github.com/OCA/delivery-carrier",
6+
"author": "Tecnativa,Odoo Community Association (OCA)",
7+
"license": "AGPL-3",
8+
"depends": ["stock_delivery"],
9+
"data": ["views/stock_picking_views.xml"],
10+
"installable": True,
11+
"maintainers": ["carlos-lopez-tecnativa"],
12+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import stock_picking
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from odoo import models
2+
3+
4+
class StockPicking(models.Model):
5+
_inherit = "stock.picking"
6+
7+
def action_send_to_shipper_manually(self):
8+
self.ensure_one()
9+
# Do any additional manual send logic here if needed
10+
self.send_to_shipper()
11+
return True
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
In some cases or industries, it is necessary to obtain a tracking reference before validating the picking.
2+
3+
For example, when a company sells products through an external marketplace that requires a tracking number for the delivery process even though the company has not yet shipped the products, as they might still be out of stock and require resupply from a vendor.
4+
5+
The picking may be validated the next day or several days later, but a tracking number is still needed to report it to the marketplace.
6+
7+
NOTE: An alternative using the Odoo standard is to configure the warehouse with a two-step delivery process and, in the first picking type, mark the `Generate Shipping Labels` field so that, when validating the first picking, it is sent to the carrier and, in the second picking, the tracking reference is propagated from the first picking. However, when stock is not available, this feature does not work, which is the reason for this module.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- [Tecnativa](https://www.tecnativa.com):
2+
- Pedro M. Baeza
3+
- Sergio Teruel
4+
- Carlos Lopez
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module enables the option to send a delivery to the carrier before the picking is validated.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Go to any delivery order with a delivery method set.
2+
- When the picking is in the `Assigned` state, a button `Send to shipper manually` will be displayed, click the button.
3+
- The picking is then sent to the carrier, and the `tracking_ref` field will be filled in.
4+
- When the picking is validated, it is not sent to the carrier again because the `tracking_ref` field is already set.

0 commit comments

Comments
 (0)