Skip to content

Commit ff6539c

Browse files
committed
Merge PR #790 into 14.0
Signed-off-by pedrobaeza
2 parents d2bc786 + ade5a71 commit ff6539c

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

delivery_auto_refresh/README.rst

+15-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Auto-refresh delivery
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:8ed5955069f96f7c20f8e23d6cdf2f62fdee44bd91c0a770224188c5f76b470a
10+
!! source digest: sha256:d6cbf52c591fd4da625c253188b715c9739b6e674c01119965fdf560c775e870
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -122,6 +122,20 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
122122
mission is to support the collaborative development of Odoo features and
123123
promote its widespread use.
124124

125+
.. |maintainer-aleuffre| image:: https://github.com/aleuffre.png?size=40px
126+
:target: https://github.com/aleuffre
127+
:alt: aleuffre
128+
.. |maintainer-renda-dev| image:: https://github.com/renda-dev.png?size=40px
129+
:target: https://github.com/renda-dev
130+
:alt: renda-dev
131+
.. |maintainer-PicchiSeba| image:: https://github.com/PicchiSeba.png?size=40px
132+
:target: https://github.com/PicchiSeba
133+
:alt: PicchiSeba
134+
135+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
136+
137+
|maintainer-aleuffre| |maintainer-renda-dev| |maintainer-PicchiSeba|
138+
125139
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/14.0/delivery_auto_refresh>`_ project on GitHub.
126140

127141
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

delivery_auto_refresh/__manifest__.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"category": "Delivery",
99
"website": "https://github.com/OCA/delivery-carrier",
1010
"author": "Tecnativa, Odoo Community Association (OCA)",
11+
"maintainers": ["aleuffre", "renda-dev", "PicchiSeba"],
1112
"license": "AGPL-3",
1213
"application": False,
1314
"installable": True,

delivery_auto_refresh/models/sale_order.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ def _auto_refresh_delivery(self):
6161
if self._get_param_auto_add_delivery_line() and self.carrier_id:
6262
if self.state in {"draft", "sent"}:
6363
price_unit = self.carrier_id.rate_shipment(self)["price"]
64-
self.with_context(skip_validation_check=True)._create_delivery_line(
65-
self.carrier_id, price_unit
66-
)
64+
if not self.is_all_service:
65+
self.with_context(skip_validation_check=True)._create_delivery_line(
66+
self.carrier_id, price_unit
67+
)
6768
self.with_context(
6869
auto_refresh_delivery=True, skip_validation_check=True
6970
).write({"recompute_delivery_price": False})

delivery_auto_refresh/static/description/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ <h1 class="title">Auto-refresh delivery</h1>
366366
!! This file is generated by oca-gen-addon-readme !!
367367
!! changes will be overwritten. !!
368368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369-
!! source digest: sha256:8ed5955069f96f7c20f8e23d6cdf2f62fdee44bd91c0a770224188c5f76b470a
369+
!! source digest: sha256:d6cbf52c591fd4da625c253188b715c9739b6e674c01119965fdf560c775e870
370370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371371
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/delivery-carrier/tree/14.0/delivery_auto_refresh"><img alt="OCA/delivery-carrier" src="https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/delivery-carrier-14-0/delivery-carrier-14-0-delivery_auto_refresh"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372372
<p>This module automates the delivery price handling for the following cases:</p>
@@ -466,6 +466,8 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
466466
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
467467
mission is to support the collaborative development of Odoo features and
468468
promote its widespread use.</p>
469+
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
470+
<p><a class="reference external image-reference" href="https://github.com/aleuffre"><img alt="aleuffre" src="https://github.com/aleuffre.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/renda-dev"><img alt="renda-dev" src="https://github.com/renda-dev.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/PicchiSeba"><img alt="PicchiSeba" src="https://github.com/PicchiSeba.png?size=40px" /></a></p>
469471
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/delivery-carrier/tree/14.0/delivery_auto_refresh">OCA/delivery-carrier</a> project on GitHub.</p>
470472
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
471473
</div>

delivery_auto_refresh/tests/test_delivery_auto_refresh.py

+1
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ def test_auto_refresh_so_and_unlink_line(self):
273273
self.assertFalse(delivery_line.exists())
274274

275275
def test_auto_add_delivery_line_add_service(self):
276+
self.env["ir.config_parameter"].sudo().set_param(self.param_name1, 1)
276277
service = self.env["product.product"].create(
277278
{"name": "Service Test", "type": "service"}
278279
)

0 commit comments

Comments
 (0)