Skip to content

Commit a299bd5

Browse files
[ADD] sale_order_auto_carrier
1 parent 7e2ad59 commit a299bd5

File tree

10 files changed

+525
-0
lines changed

10 files changed

+525
-0
lines changed

sale_order_auto_carrier/README.rst

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
=========================
2+
Partner Automatic 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:e6277d1efbd13b1fc76e2f38456be6d7616c807b91f162e748cb20ed5657d80d
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-coopiteasy%2Faddons-lightgray.png?logo=github
20+
:target: https://github.com/coopiteasy/addons/tree/16.0/sale_order_auto_carrier
21+
:alt: coopiteasy/addons
22+
23+
|badge1| |badge2| |badge3|
24+
25+
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.
26+
27+
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".
28+
29+
**Table of contents**
30+
31+
.. contents::
32+
:local:
33+
34+
Bug Tracker
35+
===========
36+
37+
Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/addons/issues>`_.
38+
In case of trouble, please check there if your issue has already been reported.
39+
If you spotted it first, help us to smash it by providing a detailed and welcomed
40+
`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**>`_.
41+
42+
Do not contact contributors directly about support or help with technical issues.
43+
44+
Credits
45+
=======
46+
47+
Authors
48+
~~~~~~~
49+
50+
* Coop IT Easy SC
51+
52+
Contributors
53+
~~~~~~~~~~~~
54+
55+
* `Coop IT Easy SC <https://coopiteasy.be>`_:
56+
57+
* Victor Champonnois
58+
59+
Maintainers
60+
~~~~~~~~~~~
61+
62+
This module is part of the `coopiteasy/addons <https://github.com/coopiteasy/addons/tree/16.0/sale_order_auto_carrier>`_ project on GitHub.
63+
64+
You are welcome to contribute.

sale_order_auto_carrier/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2021 Coop IT Easy SC
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Partner Automatic Carrier",
6+
"summary": "Compute automatically the carrier on a sale order",
7+
"version": "16.0.1.0.0",
8+
"license": "AGPL-3",
9+
"author": "Coop IT Easy SC",
10+
"website": "https://github.com/coopiteasy/addons",
11+
"depends": [
12+
"website_sale_delivery",
13+
],
14+
"demo": [],
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import sale_order
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2021 Coop IT Easy SC
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import models
5+
6+
7+
class SalePartner(models.Model):
8+
_inherit = "sale.order"
9+
10+
def action_confirm(self):
11+
self._check_carrier_quotation()
12+
return super().action_confirm()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* `Coop IT Easy SC <https://coopiteasy.be>`_:
2+
3+
* Victor Champonnois
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
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.
2+
3+
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".

0 commit comments

Comments
 (0)