Skip to content

Commit

Permalink
[ADD] sale_order_auto_carrier
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-champonnois committed Dec 19, 2024
1 parent 7e2ad59 commit c3920a4
Show file tree
Hide file tree
Showing 10 changed files with 525 additions and 0 deletions.
64 changes: 64 additions & 0 deletions sale_order_auto_carrier/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
=========================
Partner Automatic Carrier
=========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e6277d1efbd13b1fc76e2f38456be6d7616c807b91f162e748cb20ed5657d80d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-coopiteasy%2Faddons-lightgray.png?logo=github
:target: https://github.com/coopiteasy/addons/tree/16.0/sale_order_auto_carrier
:alt: coopiteasy/addons

|badge1| |badge2| |badge3|

This modules computes delivery cost on sale order confirmation. Unlike sale_order_carrier_auto_assign, it is not only based on the carrier defined on the partner. Instead it runs the automated carrier assignment defined in website_sale_delivery. This allows to add carrier based on carrier's configuration. In case several delivery methods fit the sale order, the first one in sequence order is used.

This module is useful to add delivery costs on sale order that are automatically created by contracts. In order for this to work with contract-generated sale orders, contract should be configured as "Sale Autoconfirm".

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/addons/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/coopiteasy/addons/issues/new?body=module:%20sale_order_auto_carrier%0Aversion:%2016.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
~~~~~~~

* Coop IT Easy SC

Contributors
~~~~~~~~~~~~

* `Coop IT Easy SC <https://coopiteasy.be>`_:

* Victor Champonnois

Maintainers
~~~~~~~~~~~

This module is part of the `coopiteasy/addons <https://github.com/coopiteasy/addons/tree/16.0/sale_order_auto_carrier>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions sale_order_auto_carrier/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions sale_order_auto_carrier/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Coop IT Easy SC
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Partner Automatic Carrier",
"summary": "Compute automatically the carrier associated with a partner's adress",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Coop IT Easy SC",
"website": "https://github.com/coopiteasy/addons",
"depends": [
"website_sale_delivery",
],
"demo": [],
}
1 change: 1 addition & 0 deletions sale_order_auto_carrier/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
12 changes: 12 additions & 0 deletions sale_order_auto_carrier/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2021 Coop IT Easy SC
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class SalePartner(models.Model):
_inherit = "sale.order"

def action_confirm(self):
self._check_carrier_quotation()
return super().action_confirm()
3 changes: 3 additions & 0 deletions sale_order_auto_carrier/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Coop IT Easy SC <https://coopiteasy.be>`_:

* Victor Champonnois
3 changes: 3 additions & 0 deletions sale_order_auto_carrier/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This modules computes delivery cost on sale order confirmation. Unlike sale_order_carrier_auto_assign, it is not only based on the carrier defined on the partner. Instead it runs the automated carrier assignment defined in website_sale_delivery. This allows to add carrier based on carrier's configuration. In case several delivery methods fit the sale order, the first one in sequence order is used.

This module is useful to add delivery costs on sale order that are automatically created by contracts. In order for this to work with contract-generated sale orders, contract should be configured as "Sale Autoconfirm".
Loading

0 comments on commit c3920a4

Please sign in to comment.