Skip to content
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
136 changes: 136 additions & 0 deletions stock_picking_carrier/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
=====================
Stock Picking Carrier
=====================

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

.. |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%2Fstock--logistics--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-workflow/tree/17.0/stock_picking_carrier
:alt: OCA/stock-logistics-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-stock_picking_carrier
: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/stock-logistics-workflow&target_branch=17.0
:alt: Try me on Runboat

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

This module allows you to complete the Carrier field during picking, if
the partner has previously associated a shipping method.

**Table of contents**

.. contents::
:local:

Configuration
=============

Configure auto assign carrier:
------------------------------

1. Go to Inventory > Configuration > Settings > Section Shipping

2. Find "Carrier auto assign" and enable it

|ENABLE_AUTO_ASSIGN_CARRIER|

.. |ENABLE_AUTO_ASSIGN_CARRIER| image:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/17.0/stock_picking_carrier/static/img/readme/enable_auto_assign_carrier.png

Usage
=====

Configure shipping method in the contact
----------------------------------------

1. Go to Contacts or any other menu to access contacts.
2. Select the contact you want to configure the shipping method.
3. Go to the tab "Sales & Purchases" and select the shipping method.

|SHIPPING_METHOD_CONTACT|

Set shipping method on the picking
----------------------------------

1. Go to Inventory > Operations > Receipts

2. Create a new picking

3. Select the Receive From and the Shipping Method field will
automatically be filled in on the Additional Information tab.

|SHIPPING_METHOD_PICKING|

Set shipping method when creating a sales order
-----------------------------------------------

1. Go to Sales > Orders > Quotations

2. Create a new sale order

3. Add the partner, lines, and other necessary data, then confirm the
sales order.

4. A picking will be created with the Carrier configured in the partner
selected in the sales order.

|SALE_SHIPPING_METHOD_PICKING|

.. |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
.. |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
.. |SALE_SHIPPING_METHOD_PICKING| image:: https://raw.githubusercontent.com/OCA/stock-logistics-workflow/17.0/stock_picking_carrier/static/img/readme/configure_sale_shipping_method_picking.png

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/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/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**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Binhex

Contributors
------------

[Binhex] (https://www.binhex.cloud):

- Edilio Escalona Almira [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.

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.

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

from . import wizard
from . import models
16 changes: 16 additions & 0 deletions stock_picking_carrier/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Stock Picking Carrier",
"version": "17.0.1.0.0",
"author": "Binhex, Odoo Community Association (OCA)",
"category": "Inventory/Delivery",
"website": "https://github.com/OCA/stock-logistics-workflow",
"depends": ["stock_delivery"],
"data": [
"wizard/res_config_settings_views.xml",
],
"installable": True,
"license": "AGPL-3",
}
38 changes: 38 additions & 0 deletions stock_picking_carrier/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_carrier
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-27 15:09+0000\n"
"PO-Revision-Date: 2025-10-27 15:09+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: stock_picking_carrier
#: model_terms:ir.ui.view,arch_db:stock_picking_carrier.res_config_settings_view_form
msgid ""
"Automatically assign the delivery carrier when creating a picking or when "
"selecting a partner in a created one."
msgstr "Asignar automáticamente el transportista de entrega al crear un picking o al seleccionar un partner en uno creado."

#. module: stock_picking_carrier
#: model:ir.model.fields,field_description:stock_picking_carrier.field_res_config_settings__carrier_auto_assign_picking
msgid "Carrier auto assign"
msgstr "Asignación automática de transportista"

#. module: stock_picking_carrier
#: model:ir.model,name:stock_picking_carrier.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes de configuración"

#. module: stock_picking_carrier
#: model:ir.model,name:stock_picking_carrier.model_stock_picking
msgid "Transfer"
msgstr "Traslado"
4 changes: 4 additions & 0 deletions stock_picking_carrier/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import stock_picking
38 changes: 38 additions & 0 deletions stock_picking_carrier/models/stock_picking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, models


class StockPicking(models.Model):
_inherit = "stock.picking"

@api.model_create_multi
def create(self, vals):
ResPartner = self.env["res.partner"]
carrier_auto_assign = (
self.env["ir.config_parameter"]
.sudo()
.get_param("stock_picking_carrier.carrier_auto_assign_picking")
)
if carrier_auto_assign:
for val in vals:
if "partner_id" in val:
val["carrier_id"] = ResPartner.browse(
val["partner_id"]
).property_delivery_carrier_id.id
return super().create(vals)

@api.onchange("partner_id")
def _onchange_partner_id(self):
carrier_auto_assign = (
self.env["ir.config_parameter"]
.sudo()
.get_param("stock_picking_carrier.carrier_auto_assign_picking")
)
if carrier_auto_assign:
for picking in self:
if picking.partner_id:
picking.carrier_id = (
picking.partner_id.property_delivery_carrier_id.id
)
3 changes: 3 additions & 0 deletions stock_picking_carrier/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
7 changes: 7 additions & 0 deletions stock_picking_carrier/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Configure auto assign carrier:
---------------------

1. Go to Inventory > Configuration > Settings > Section Shipping
2. Find "Carrier auto assign" and enable it

![ENABLE_AUTO_ASSIGN_CARRIER](../static/img/readme/enable_auto_assign_carrier.png)
2 changes: 2 additions & 0 deletions stock_picking_carrier/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Binhex] (https://www.binhex.cloud):
- Edilio Escalona Almira <[email protected]>
1 change: 1 addition & 0 deletions stock_picking_carrier/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows you to complete the Carrier field during picking, if the partner has previously associated a shipping method.
32 changes: 32 additions & 0 deletions stock_picking_carrier/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Configure shipping method in the contact
-------------------------

1. Go to Contacts or any other menu to access contacts.
2. Select the contact you want to configure the shipping method.
3. Go to the tab "Sales & Purchases" and select the shipping method.

![SHIPPING_METHOD_CONTACT](../static/img/readme/configure_shipping_method_contact.png)


Set shipping method on the picking
-------------------------

1. Go to Inventory > Operations > Receipts
2. Create a new picking
3. Select the Receive From and the Shipping Method field
will automatically be filled in on the Additional Information tab.

![SHIPPING_METHOD_PICKING](../static/img/readme/configure_shipping_method_picking.png)


Set shipping method when creating a sales order
-------------------------

1. Go to Sales > Orders > Quotations
2. Create a new sale order
3. Add the partner, lines, and other necessary data, then confirm the sales order.
4. A picking will be created with the Carrier configured in the partner selected in the sales order.

![SALE_SHIPPING_METHOD_PICKING](../static/img/readme/configure_sale_shipping_method_picking.png)


Binary file added stock_picking_carrier/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading