Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6f559a9

Browse files
committedJan 31, 2024·
[16.0][MIG] delivery_multi_destination: Continue Migration
1 parent ab04037 commit 6f559a9

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed
 

‎delivery_multi_destination/README.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Multiple destinations for the same delivery method
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:2bae037f6463833430c93739fa098bd379b7e9307ae8b3a4f8b8e02aeb33e2e4
10+
!! source digest: sha256:2cb9cc1f227af0d903b43f5511bdd469acf455504f9aa767342cff2c1dd7fdf5
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -90,6 +90,7 @@ Contributors
9090
* Pedro M. Baeza
9191
* Luis M. Ontalba
9292
* Carlos Roca
93+
* Carolina Fernandez
9394

9495
* `Dinamiche Aziendali <https://www.dinamicheaziendali.it>__`:
9596

‎delivery_multi_destination/__manifest__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Copyright 2016-2019 Tecnativa - Pedro M. Baeza
22
# Copyright 2017 Tecnativa - Luis M. Ontalba
33
# Copyright 2021 Gianmarco Conte <gconte@dinamicheaziendali.it>
4+
# Copyright 2024 Tecnativa - Carolina Fernandez
45
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
56

67
{
78
"name": "Multiple destinations for the same delivery method",
8-
"version": "16.0.1.0.2",
9+
"version": "16.0.1.0.0",
910
"category": "Delivery",
1011
"website": "https://github.com/OCA/delivery-carrier",
1112
"author": "Tecnativa, Odoo Community Association (OCA)",

‎delivery_multi_destination/models/delivery_carrier.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2016-2020 Tecnativa - Pedro M. Baeza
22
# Copyright 2017 Tecnativa - Luis M. Ontalba
33
# Copyright 2021 Gianmarco Conte <gconte@dinamicheaziendali.it>
4+
# Copyright 2024 Tecnativa - Carolina Fernandez
45
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
56

67
from odoo import _, api, fields, models
@@ -69,23 +70,22 @@ def rate_shipment(self, order):
6970
"""We have to override this method for getting the proper price
7071
according destination on sales orders.
7172
"""
72-
if self.destination_type == "one":
73-
return super().rate_shipment(order)
74-
else:
73+
if self.destination_type != "one":
7574
carrier = self.with_context(show_children_carriers=True)
7675
for subcarrier in carrier.child_ids:
7776
if subcarrier._match_address(order.partner_shipping_id):
7877
return super(
7978
DeliveryCarrier,
8079
subcarrier,
8180
).rate_shipment(order)
81+
return super().rate_shipment(order)
8282

8383
def send_shipping(self, pickings):
8484
"""We have to override this method for redirecting the result to the
8585
proper "child" carrier.
8686
"""
8787
if self.destination_type == "one" or not self:
88-
return super().send_shipping(pickings)
88+
res = super().send_shipping(pickings)
8989
else:
9090
carrier = self.with_context(show_children_carriers=True)
9191
res = []
@@ -121,4 +121,4 @@ def send_shipping(self, pickings):
121121
if not picking_res:
122122
raise ValidationError(_("There is no matching delivery rule."))
123123
res += picking_res
124-
return res
124+
return res

‎delivery_multi_destination/readme/CONTRIBUTORS.rst

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Pedro M. Baeza
44
* Luis M. Ontalba
55
* Carlos Roca
6+
* Carolina Fernandez
67

78
* `Dinamiche Aziendali <https://www.dinamicheaziendali.it>__`:
89

‎delivery_multi_destination/static/description/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
@@ -367,7 +366,7 @@ <h1 class="title">Multiple destinations for the same delivery method</h1>
367366
!! This file is generated by oca-gen-addon-readme !!
368367
!! changes will be overwritten. !!
369368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:2bae037f6463833430c93739fa098bd379b7e9307ae8b3a4f8b8e02aeb33e2e4
369+
!! source digest: sha256:2cb9cc1f227af0d903b43f5511bdd469acf455504f9aa767342cff2c1dd7fdf5
371370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372371
<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/16.0/delivery_multi_destination"><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-16-0/delivery-carrier-16-0-delivery_multi_destination"><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=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373372
<p>This module allows to set different price rules depending on the destination.</p>
@@ -439,6 +438,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
439438
<li>Pedro M. Baeza</li>
440439
<li>Luis M. Ontalba</li>
441440
<li>Carlos Roca</li>
441+
<li>Carolina Fernandez</li>
442442
</ul>
443443
</li>
444444
<li><cite>Dinamiche Aziendali &lt;https://www.dinamicheaziendali.it&gt;__</cite>:<ul>

0 commit comments

Comments
 (0)
Please sign in to comment.