Skip to content

Commit 29bd5b9

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

File tree

15 files changed

+669
-0
lines changed

15 files changed

+669
-0
lines changed

stock_picking_carrier/README.rst

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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 auto-complete the value during picking when
32+
you select the recipient and the shipping method has been configured.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Usage
40+
=====
41+
42+
Configure shipping method in the contact
43+
----------------------------------------
44+
45+
1. Go to Contacts or any other menu to access contacts.
46+
2. Select the contact you want to configure the shipping method.
47+
3. Go to the tab "Sales & Purchases" and select the shipping method.
48+
49+
|SHIPPING_METHOD_CONTACT|
50+
51+
Configure shipping method on the delivery note
52+
----------------------------------------------
53+
54+
1. Go to Inventory > Operations > Receipts
55+
56+
2. Create a new picking
57+
58+
3. Select the Receive From and the Shipping Method field will
59+
automatically be filled in on the Additional Information tab.
60+
61+
|SHIPPING_METHOD_PICKING|
62+
63+
.. |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
64+
.. |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
65+
66+
Bug Tracker
67+
===========
68+
69+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/issues>`_.
70+
In case of trouble, please check there if your issue has already been reported.
71+
If you spotted it first, help us to smash it by providing a detailed and welcomed
72+
`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**>`_.
73+
74+
Do not contact contributors directly about support or help with technical issues.
75+
76+
Credits
77+
=======
78+
79+
Authors
80+
-------
81+
82+
* Binhex
83+
84+
Contributors
85+
------------
86+
87+
[Binhex] (https://www.binhex.cloud):
88+
89+
- Edilio Escalona Almira [email protected]
90+
91+
Maintainers
92+
-----------
93+
94+
This module is maintained by the OCA.
95+
96+
.. image:: https://odoo-community.org/logo.png
97+
:alt: Odoo Community Association
98+
:target: https://odoo-community.org
99+
100+
OCA, or the Odoo Community Association, is a nonprofit organization whose
101+
mission is to support the collaborative development of Odoo features and
102+
promote its widespread use.
103+
104+
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.
105+
106+
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 auto-complete
2+
the value during picking when you select the recipient
3+
and the shipping method has been configured.
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)