Skip to content

Commit d40d5cf

Browse files
committed
[17.0][ADD] stock_picking_carrier: Add shipping method automatically based on receive from.
1 parent d9f39a9 commit d40d5cf

File tree

15 files changed

+671
-0
lines changed

15 files changed

+671
-0
lines changed

stock_picking_carrier/README.rst

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
=====================
2+
Stock Picking Carrier
3+
=====================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:90b8ff4b2dfdba96bc810968c0ce61efa54c512d6abea98421992e2442873c49
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%2Fstock--logistics--workflow-lightgray.png?logo=github
20+
:target: https://github.com/OCA/stock-logistics-workflow/tree/17.0/stock_picking_carrier
21+
:alt: OCA/stock-logistics-workflow
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-stock_picking_carrier
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/stock-logistics-workflow&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows you to create a delivery note and select the
32+
recipient who has configured the shipping method, completing it on the
33+
delivery note.
34+
35+
**Table of contents**
36+
37+
.. contents::
38+
:local:
39+
40+
Usage
41+
=====
42+
43+
Configure shipping method in the contact
44+
----------------------------------------
45+
46+
1. Go to Contacts or any other menu to access contacts.
47+
2. Select the contact you want to configure the shipping method.
48+
3. Go to the tab "Sales & Purchases" and select the shipping method.
49+
50+
|SHIPPING_METHOD_CONTACT|
51+
52+
Configure shipping method on the delivery note
53+
----------------------------------------------
54+
55+
1. Go to Inventory > Operations > Receipts
56+
57+
2. Create a new picking
58+
59+
3. Select the Receive From and the Shipping Method field will
60+
automatically be filled in on the Additional Information tab.
61+
62+
|SHIPPING_METHOD_PICKING|
63+
64+
.. |SHIPPING_METHOD_CONTACT| image:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/17.0/stock_picking_carrier/static/img/readme/configure_shipping_method_contact.png
65+
.. |SHIPPING_METHOD_PICKING| image:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/17.0/stock_picking_carrier/static/img/readme/configure_shipping_method_picking.png
66+
67+
Bug Tracker
68+
===========
69+
70+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/issues>`_.
71+
In case of trouble, please check there if your issue has already been reported.
72+
If you spotted it first, help us to smash it by providing a detailed and welcomed
73+
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_carrier%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
74+
75+
Do not contact contributors directly about support or help with technical issues.
76+
77+
Credits
78+
=======
79+
80+
Authors
81+
-------
82+
83+
* Binhex
84+
85+
Contributors
86+
------------
87+
88+
[Binhex] (https://www.binhex.cloud):
89+
90+
- Edilio Escalona Almira [email protected]
91+
92+
Maintainers
93+
-----------
94+
95+
This module is maintained by the OCA.
96+
97+
.. image:: https://odoo-community.org/logo.png
98+
:alt: Odoo Community Association
99+
:target: https://odoo-community.org
100+
101+
OCA, or the Odoo Community Association, is a nonprofit organization whose
102+
mission is to support the collaborative development of Odoo features and
103+
promote its widespread use.
104+
105+
This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/17.0/stock_picking_carrier>`_ project on GitHub.
106+
107+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

stock_picking_carrier/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2025 Binhex <https://www.binhex.cloud>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from . import models
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2025 Binhex <https://www.binhex.cloud>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Stock Picking Carrier",
6+
"version": "17.0.1.0.0",
7+
"author": "Binhex, Odoo Community Association (OCA)",
8+
"category": "Inventory/Delivery",
9+
"website": "https://github.com/OCA/stock-logistics-workflow",
10+
"depends": ["stock_delivery"],
11+
"data": [],
12+
"installable": True,
13+
"license": "AGPL-3",
14+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2025 Binhex <https://www.binhex.cloud>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from . import stock_picking
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2025 Binhex <https://www.binhex.cloud>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import api, models
5+
6+
7+
class StockPicking(models.Model):
8+
_inherit = "stock.picking"
9+
10+
@api.onchange("partner_id")
11+
def _onchange_partner_id(self):
12+
for picking in self:
13+
if picking.partner_id:
14+
picking.carrier_id = picking.partner_id.property_delivery_carrier_id.id
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Binhex] (https://www.binhex.cloud):
2+
- Edilio Escalona Almira <[email protected]>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This module allows you to create a delivery note
2+
and select the recipient who has configured the shipping method,
3+
completing it on the delivery note.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Configure shipping method in the contact
2+
-------------------------
3+
4+
1. Go to Contacts or any other menu to access contacts.
5+
2. Select the contact you want to configure the shipping method.
6+
3. Go to the tab "Sales & Purchases" and select the shipping method.
7+
8+
![SHIPPING_METHOD_CONTACT](../static/img/readme/configure_shipping_method_contact.png)
9+
10+
Configure shipping method on the delivery note
11+
-------------------------
12+
13+
1. Go to Inventory > Operations > Receipts
14+
2. Create a new picking
15+
3. Select the Receive From and the Shipping Method field
16+
will automatically be filled in on the Additional Information tab.
17+
18+
![SHIPPING_METHOD_PICKING](../static/img/readme/configure_shipping_method_picking.png)
9.23 KB
Loading

0 commit comments

Comments
 (0)