odoo-addon-delivery-multi-destination 16.0.1.0.0.4__py3-none-any.whl → 17.0.1.0.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of odoo-addon-delivery-multi-destination might be problematic. Click here for more details.
- odoo/addons/delivery_multi_destination/README.rst +35 -31
- odoo/addons/delivery_multi_destination/__manifest__.py +2 -2
- odoo/addons/delivery_multi_destination/i18n/cs_CZ.po +1 -16
- odoo/addons/delivery_multi_destination/i18n/de.po +1 -22
- odoo/addons/delivery_multi_destination/i18n/delivery_multi_destination.pot +1 -1
- odoo/addons/delivery_multi_destination/i18n/es.po +3 -15
- odoo/addons/delivery_multi_destination/i18n/fr.po +1 -16
- odoo/addons/delivery_multi_destination/i18n/it.po +3 -15
- odoo/addons/delivery_multi_destination/i18n/nl.po +1 -16
- odoo/addons/delivery_multi_destination/i18n/nl_NL.po +1 -16
- odoo/addons/delivery_multi_destination/i18n/pt_BR.po +5 -26
- odoo/addons/delivery_multi_destination/i18n/sl.po +3 -21
- odoo/addons/delivery_multi_destination/i18n/zh_CN.po +1 -25
- odoo/addons/delivery_multi_destination/models/delivery_carrier.py +10 -14
- odoo/addons/delivery_multi_destination/readme/CONFIGURE.md +8 -0
- odoo/addons/delivery_multi_destination/readme/CONTRIBUTORS.md +8 -0
- odoo/addons/delivery_multi_destination/readme/DESCRIPTION.md +8 -0
- odoo/addons/delivery_multi_destination/readme/ROADMAP.md +2 -0
- odoo/addons/delivery_multi_destination/readme/USAGE.md +3 -0
- odoo/addons/delivery_multi_destination/static/description/index.html +28 -21
- odoo/addons/delivery_multi_destination/tests/test_delivery_multi_destination.py +15 -7
- odoo/addons/delivery_multi_destination/views/delivery_carrier_view.xml +15 -28
- {odoo_addon_delivery_multi_destination-16.0.1.0.0.4.dist-info → odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info}/METADATA +40 -36
- odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info/RECORD +31 -0
- {odoo_addon_delivery_multi_destination-16.0.1.0.0.4.dist-info → odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info}/WHEEL +1 -1
- odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info/top_level.txt +1 -0
- odoo/addons/delivery_multi_destination/readme/CONFIGURE.rst +0 -8
- odoo/addons/delivery_multi_destination/readme/CONTRIBUTORS.rst +0 -10
- odoo/addons/delivery_multi_destination/readme/DESCRIPTION.rst +0 -6
- odoo/addons/delivery_multi_destination/readme/ROADMAP.rst +0 -2
- odoo/addons/delivery_multi_destination/readme/USAGE.rst +0 -2
- odoo_addon_delivery_multi_destination-16.0.1.0.0.4.dist-info/RECORD +0 -31
- odoo_addon_delivery_multi_destination-16.0.1.0.0.4.dist-info/top_level.txt +0 -1
|
@@ -43,25 +43,21 @@ msgstr "法国"
|
|
|
43
43
|
|
|
44
44
|
#. module: delivery_multi_destination
|
|
45
45
|
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi
|
|
46
|
-
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi
|
|
47
46
|
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template
|
|
48
47
|
msgid "International Carrier Inc."
|
|
49
48
|
msgstr "国际航空公司。"
|
|
50
49
|
|
|
51
50
|
#. module: delivery_multi_destination
|
|
52
|
-
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1
|
|
53
51
|
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template
|
|
54
52
|
msgid "International Carrier Inc., Belgium"
|
|
55
53
|
msgstr "比利时国际航空公司"
|
|
56
54
|
|
|
57
55
|
#. module: delivery_multi_destination
|
|
58
|
-
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2
|
|
59
56
|
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template
|
|
60
57
|
msgid "International Carrier Inc., France"
|
|
61
58
|
msgstr "法国国际航空公司"
|
|
62
59
|
|
|
63
60
|
#. module: delivery_multi_destination
|
|
64
|
-
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3
|
|
65
61
|
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template
|
|
66
62
|
msgid "International Carrier Inc., United Kingdom"
|
|
67
63
|
msgstr "英国国际航空公司"
|
|
@@ -87,6 +83,7 @@ msgid "Shipping Methods"
|
|
|
87
83
|
msgstr ""
|
|
88
84
|
|
|
89
85
|
#. module: delivery_multi_destination
|
|
86
|
+
#. odoo-python
|
|
90
87
|
#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0
|
|
91
88
|
#, python-format
|
|
92
89
|
msgid "There is no matching delivery rule."
|
|
@@ -96,24 +93,3 @@ msgstr ""
|
|
|
96
93
|
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3
|
|
97
94
|
msgid "United Kingdom"
|
|
98
95
|
msgstr "英国"
|
|
99
|
-
|
|
100
|
-
#. module: delivery_multi_destination
|
|
101
|
-
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi
|
|
102
|
-
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1
|
|
103
|
-
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2
|
|
104
|
-
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3
|
|
105
|
-
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template
|
|
106
|
-
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template
|
|
107
|
-
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template
|
|
108
|
-
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template
|
|
109
|
-
msgid "Units"
|
|
110
|
-
msgstr ""
|
|
111
|
-
|
|
112
|
-
#~ msgid "Delivery Methods"
|
|
113
|
-
#~ msgstr "交货方式"
|
|
114
|
-
|
|
115
|
-
#~ msgid "Unit(s)"
|
|
116
|
-
#~ msgstr "件"
|
|
117
|
-
|
|
118
|
-
#~ msgid "kg"
|
|
119
|
-
#~ msgstr "千克"
|
|
@@ -32,25 +32,21 @@ class DeliveryCarrier(models.Model):
|
|
|
32
32
|
if self.destination_type == "multi" and self.child_ids and not self.product_id:
|
|
33
33
|
self.product_id = fields.first(self.child_ids.product_id)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
@api.model
|
|
36
|
+
def search(self, domain, offset=0, limit=None, order=None):
|
|
36
37
|
"""Don't show by default children carriers."""
|
|
37
38
|
if not self.env.context.get("show_children_carriers"):
|
|
38
|
-
if
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return super(
|
|
42
|
-
args,
|
|
43
|
-
offset=offset,
|
|
44
|
-
limit=limit,
|
|
45
|
-
order=order,
|
|
46
|
-
count=count,
|
|
47
|
-
)
|
|
39
|
+
if domain is None:
|
|
40
|
+
domain = []
|
|
41
|
+
domain += [("parent_id", "=", False)]
|
|
42
|
+
return super().search(domain, offset=offset, limit=limit, order=order)
|
|
48
43
|
|
|
49
44
|
@api.model
|
|
50
45
|
def name_search(self, name="", args=None, operator="ilike", limit=100):
|
|
51
46
|
"""Don't show by default children carriers."""
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
args = args or []
|
|
48
|
+
args += [("parent_id", "=", False)]
|
|
49
|
+
return super().name_search(name, args, operator, limit)
|
|
54
50
|
|
|
55
51
|
def available_carriers(self, partner):
|
|
56
52
|
"""If the carrier is multi, we test the availability on children."""
|
|
@@ -92,7 +88,7 @@ class DeliveryCarrier(models.Model):
|
|
|
92
88
|
for p in pickings:
|
|
93
89
|
picking_res = False
|
|
94
90
|
for subcarrier in carrier.child_ids.filtered(
|
|
95
|
-
lambda x: not x.company_id or x.company_id == p.company_id
|
|
91
|
+
lambda x, p=p: not x.company_id or x.company_id == p.company_id
|
|
96
92
|
):
|
|
97
93
|
if subcarrier.delivery_type == "fixed":
|
|
98
94
|
if subcarrier._match_address(p.partner_id):
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
To configure delivery methods with multiple destinations:
|
|
2
|
+
|
|
3
|
+
1. Go to Inventory \> Configuration \> Delivery \> Shipping Methods
|
|
4
|
+
2. Create or edit an existing record.
|
|
5
|
+
3. Select "Destination type" = "Multiple destinations".
|
|
6
|
+
4. Introduce a line for each destination in the new tab "Destinations"
|
|
7
|
+
5. Lines have priority, so you have to put first the lines with more
|
|
8
|
+
restricted destinations.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
This module allows to set different price rules depending on the
|
|
2
|
+
destination.
|
|
3
|
+
|
|
4
|
+
This module restores the concept of delivery grid, reusing the same
|
|
5
|
+
model for nesting several "children" delivery methods, one per possible
|
|
6
|
+
destination. It has been designed to reuse all possible extensions to
|
|
7
|
+
the base delivery, without the need to create a glue module for having
|
|
8
|
+
multiple destinations.
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
:Author: David Goodger (goodger@python.org)
|
|
11
|
-
:Id: $Id: html4css1.css
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
12
|
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
13
|
|
|
14
14
|
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
15
16
|
|
|
16
17
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
17
18
|
customize this style sheet.
|
|
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
|
274
275
|
margin-left: 2em ;
|
|
275
276
|
margin-right: 2em }
|
|
276
277
|
|
|
277
|
-
pre.code .ln { color:
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
278
279
|
pre.code, code { background-color: #eeeeee }
|
|
279
280
|
pre.code .comment, code .comment { color: #5C6576 }
|
|
280
281
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
@@ -300,7 +301,7 @@ span.option {
|
|
|
300
301
|
span.pre {
|
|
301
302
|
white-space: pre }
|
|
302
303
|
|
|
303
|
-
span.problematic {
|
|
304
|
+
span.problematic, pre.problematic {
|
|
304
305
|
color: red }
|
|
305
306
|
|
|
306
307
|
span.section-subtitle {
|
|
@@ -366,14 +367,16 @@ ul.auto-toc {
|
|
|
366
367
|
!! This file is generated by oca-gen-addon-readme !!
|
|
367
368
|
!! changes will be overwritten. !!
|
|
368
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
369
|
-
!! source digest: sha256:
|
|
370
|
+
!! source digest: sha256:eeb0230cb5ceb05618ed436440f6a253205bf4dcf28dafc242fe7eb3468b70bd
|
|
370
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
371
|
-
<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/
|
|
372
|
-
<p>This module allows to set different price rules depending on the
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
372
|
+
<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/17.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-17-0/delivery-carrier-17-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&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
|
+
<p>This module allows to set different price rules depending on the
|
|
374
|
+
destination.</p>
|
|
375
|
+
<p>This module restores the concept of delivery grid, reusing the same
|
|
376
|
+
model for nesting several “children” delivery methods, one per possible
|
|
377
|
+
destination. It has been designed to reuse all possible extensions to
|
|
378
|
+
the base delivery, without the need to create a glue module for having
|
|
379
|
+
multiple destinations.</p>
|
|
377
380
|
<p><strong>Table of contents</strong></p>
|
|
378
381
|
<div class="contents local topic" id="contents">
|
|
379
382
|
<ul class="simple">
|
|
@@ -397,22 +400,23 @@ without the need to create a glue module for having multiple destinations.</p>
|
|
|
397
400
|
<li>Create or edit an existing record.</li>
|
|
398
401
|
<li>Select “Destination type” = “Multiple destinations”.</li>
|
|
399
402
|
<li>Introduce a line for each destination in the new tab “Destinations”</li>
|
|
400
|
-
<li>Lines have priority, so you have to put first the lines with more
|
|
401
|
-
destinations.</li>
|
|
403
|
+
<li>Lines have priority, so you have to put first the lines with more
|
|
404
|
+
restricted destinations.</li>
|
|
402
405
|
</ol>
|
|
403
406
|
</div>
|
|
404
407
|
<div class="section" id="usage">
|
|
405
408
|
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
|
406
409
|
<ol class="arabic simple">
|
|
407
|
-
<li>When using the delivery method in a Sales order, delivery address
|
|
408
|
-
used for computing the delivery price according introduced
|
|
410
|
+
<li>When using the delivery method in a Sales order, delivery address
|
|
411
|
+
will be used for computing the delivery price according introduced
|
|
412
|
+
destinations.</li>
|
|
409
413
|
</ol>
|
|
410
414
|
</div>
|
|
411
415
|
<div class="section" id="known-issues-roadmap">
|
|
412
416
|
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
|
|
413
417
|
<ul class="simple">
|
|
414
|
-
<li>Delivery prices for e-commerce (
|
|
415
|
-
an extra module for handling everything properly.</li>
|
|
418
|
+
<li>Delivery prices for e-commerce (website_sale_delivery module) might
|
|
419
|
+
need an extra module for handling everything properly.</li>
|
|
416
420
|
</ul>
|
|
417
421
|
</div>
|
|
418
422
|
<div class="section" id="bug-tracker">
|
|
@@ -420,7 +424,7 @@ an extra module for handling everything properly.</li>
|
|
|
420
424
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/delivery-carrier/issues">GitHub Issues</a>.
|
|
421
425
|
In case of trouble, please check there if your issue has already been reported.
|
|
422
426
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
423
|
-
<a class="reference external" href="https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_multi_destination%0Aversion:%
|
|
427
|
+
<a class="reference external" href="https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_multi_destination%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
424
428
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
425
429
|
</div>
|
|
426
430
|
<div class="section" id="credits">
|
|
@@ -434,14 +438,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
434
438
|
<div class="section" id="contributors">
|
|
435
439
|
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
|
|
436
440
|
<ul class="simple">
|
|
437
|
-
<li
|
|
441
|
+
<li>`Tecnativa <<a class="reference external" href="https://www.tecnativa.com">https://www.tecnativa.com</a>>__`:<ul>
|
|
438
442
|
<li>Pedro M. Baeza</li>
|
|
439
443
|
<li>Luis M. Ontalba</li>
|
|
440
444
|
<li>Carlos Roca</li>
|
|
441
445
|
<li>Carolina Fernandez</li>
|
|
446
|
+
<li>Víctor Martínez</li>
|
|
442
447
|
</ul>
|
|
443
448
|
</li>
|
|
444
|
-
<li
|
|
449
|
+
<li>`Dinamiche Aziendali <<a class="reference external" href="https://www.dinamicheaziendali.it">https://www.dinamicheaziendali.it</a>>__`:<ul>
|
|
445
450
|
<li>Gianmarco Conte</li>
|
|
446
451
|
</ul>
|
|
447
452
|
</li>
|
|
@@ -450,11 +455,13 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
450
455
|
<div class="section" id="maintainers">
|
|
451
456
|
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
|
|
452
457
|
<p>This module is maintained by the OCA.</p>
|
|
453
|
-
<a class="reference external image-reference" href="https://odoo-community.org"
|
|
458
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
459
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
460
|
+
</a>
|
|
454
461
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
455
462
|
mission is to support the collaborative development of Odoo features and
|
|
456
463
|
promote its widespread use.</p>
|
|
457
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/delivery-carrier/tree/
|
|
464
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/delivery-carrier/tree/17.0/delivery_multi_destination">OCA/delivery-carrier</a> project on GitHub.</p>
|
|
458
465
|
<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>
|
|
459
466
|
</div>
|
|
460
467
|
</div>
|
|
@@ -2,14 +2,19 @@
|
|
|
2
2
|
# Copyright 2019-2020 Tecnativa - Pedro M. Baeza
|
|
3
3
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
4
4
|
|
|
5
|
-
from odoo.tests import Form
|
|
5
|
+
from odoo.tests import Form
|
|
6
|
+
from odoo.tools import mute_logger
|
|
6
7
|
|
|
8
|
+
from odoo.addons.base.tests.common import BaseCommon
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
|
|
11
|
+
class TestDeliveryMultiDestination(BaseCommon):
|
|
9
12
|
@classmethod
|
|
10
13
|
def setUpClass(cls):
|
|
11
14
|
super().setUpClass()
|
|
12
|
-
cls.country_1 = cls.env["res.country"].create(
|
|
15
|
+
cls.country_1 = cls.env["res.country"].create(
|
|
16
|
+
{"name": "Test country 1", "code": "T1"}
|
|
17
|
+
)
|
|
13
18
|
cls.pricelist = cls.env["product.pricelist"].create(
|
|
14
19
|
{"name": "Test pricelist", "currency_id": cls.env.company.currency_id.id}
|
|
15
20
|
)
|
|
@@ -20,7 +25,9 @@ class TestDeliveryMultiDestination(common.TransactionCase):
|
|
|
20
25
|
"property_product_pricelist": cls.pricelist.id,
|
|
21
26
|
}
|
|
22
27
|
)
|
|
23
|
-
cls.country_2 = cls.env["res.country"].create(
|
|
28
|
+
cls.country_2 = cls.env["res.country"].create(
|
|
29
|
+
{"name": "Test country 2", "code": "T2"}
|
|
30
|
+
)
|
|
24
31
|
cls.state = cls.env["res.country.state"].create(
|
|
25
32
|
{"name": "Test state", "code": "TS", "country_id": cls.country_2.id}
|
|
26
33
|
)
|
|
@@ -76,7 +83,7 @@ class TestDeliveryMultiDestination(common.TransactionCase):
|
|
|
76
83
|
}
|
|
77
84
|
)
|
|
78
85
|
cls.product = cls.env["product.product"].create(
|
|
79
|
-
{"name": "Test product", "detailed_type": "
|
|
86
|
+
{"name": "Test product", "detailed_type": "consu", "list_price": 1}
|
|
80
87
|
)
|
|
81
88
|
cls.sale_order = cls._create_sale_order(cls)
|
|
82
89
|
|
|
@@ -118,6 +125,7 @@ class TestDeliveryMultiDestination(common.TransactionCase):
|
|
|
118
125
|
choose_delivery_carrier = wizard.save()
|
|
119
126
|
choose_delivery_carrier.button_confirm()
|
|
120
127
|
|
|
128
|
+
@mute_logger("odoo.models.unlink")
|
|
121
129
|
def test_delivery_multi_destination(self):
|
|
122
130
|
order = self.sale_order
|
|
123
131
|
order.carrier_id = self.carrier_single.id
|
|
@@ -163,8 +171,8 @@ class TestDeliveryMultiDestination(common.TransactionCase):
|
|
|
163
171
|
self.sale_order.action_confirm()
|
|
164
172
|
picking = self.sale_order.picking_ids
|
|
165
173
|
self.assertEqual(picking.carrier_id, self.carrier_multi)
|
|
166
|
-
picking.move_ids.
|
|
167
|
-
picking.
|
|
174
|
+
picking.move_ids.quantity = 1
|
|
175
|
+
picking.button_validate()
|
|
168
176
|
self.assertAlmostEqual(picking.carrier_price, 50)
|
|
169
177
|
|
|
170
178
|
def test_delivery_carrier_multi_form(self):
|
|
@@ -16,45 +16,34 @@
|
|
|
16
16
|
</group>
|
|
17
17
|
</div>
|
|
18
18
|
<group name="provider_details" position="attributes">
|
|
19
|
-
<attribute
|
|
20
|
-
name="attrs"
|
|
21
|
-
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
|
|
19
|
+
<attribute name="invisible">destination_type=='multi'</attribute>
|
|
22
20
|
</group>
|
|
23
|
-
<
|
|
24
|
-
<attribute
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
<field name="margin" position="attributes">
|
|
22
|
+
<attribute name="invisible">destination_type=='multi'</attribute>
|
|
23
|
+
</field>
|
|
24
|
+
<label for="free_over" position="attributes">
|
|
25
|
+
<attribute name="invisible">destination_type=='multi'</attribute>
|
|
27
26
|
</label>
|
|
28
|
-
<xpath expr="//
|
|
29
|
-
<attribute
|
|
30
|
-
name="attrs"
|
|
31
|
-
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
|
|
32
|
-
</xpath>
|
|
33
|
-
<xpath expr="//field[@name='free_over']/.." position="attributes">
|
|
34
|
-
<attribute
|
|
35
|
-
name="attrs"
|
|
36
|
-
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
|
|
27
|
+
<xpath expr="//div[@name='free_over_amount']" position="attributes">
|
|
28
|
+
<attribute name="invisible">destination_type=='multi'</attribute>
|
|
37
29
|
</xpath>
|
|
38
30
|
<field name="amount" position="attributes">
|
|
31
|
+
<attribute name="required">free_over</attribute>
|
|
39
32
|
<attribute
|
|
40
|
-
name="
|
|
41
|
-
>
|
|
33
|
+
name="invisible"
|
|
34
|
+
>not free_over or destination_type == 'multi'</attribute>
|
|
42
35
|
</field>
|
|
43
36
|
<page name="pricing" position="attributes">
|
|
44
|
-
<attribute
|
|
45
|
-
name="attrs"
|
|
46
|
-
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
|
|
37
|
+
<attribute name="invisible">destination_type=='multi'</attribute>
|
|
47
38
|
</page>
|
|
48
39
|
<page name="destination" position="attributes">
|
|
49
|
-
<attribute
|
|
50
|
-
name="attrs"
|
|
51
|
-
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
|
|
40
|
+
<attribute name="invisible">destination_type=='multi'</attribute>
|
|
52
41
|
</page>
|
|
53
42
|
<notebook position="inside">
|
|
54
43
|
<page
|
|
55
44
|
string="Destinations"
|
|
56
45
|
name="page_multi_destination"
|
|
57
|
-
|
|
46
|
+
invisible="destination_type!='multi'"
|
|
58
47
|
>
|
|
59
48
|
<field name="child_ids" context="{'show_children_fields': True}" />
|
|
60
49
|
</page>
|
|
@@ -66,9 +55,7 @@
|
|
|
66
55
|
<field name="inherit_id" ref="delivery.view_delivery_carrier_tree" />
|
|
67
56
|
<field name="arch" type="xml">
|
|
68
57
|
<field name="delivery_type" position="attributes">
|
|
69
|
-
<attribute
|
|
70
|
-
name="attrs"
|
|
71
|
-
>{'invisible': [('destination_type', '!=', 'one')]}</attribute>
|
|
58
|
+
<attribute name="invisible">destination_type!='one'</attribute>
|
|
72
59
|
</field>
|
|
73
60
|
<field name="delivery_type" position="after">
|
|
74
61
|
<field name="destination_type" />
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-delivery_multi_destination
|
|
3
|
-
Version:
|
|
3
|
+
Version: 17.0.1.0.0.3
|
|
4
|
+
Requires-Python: >=3.10
|
|
5
|
+
Requires-Dist: odoo>=17.0a,<17.1dev
|
|
4
6
|
Summary: Multiple destinations for the same delivery method
|
|
5
7
|
Home-page: https://github.com/OCA/delivery-carrier
|
|
8
|
+
License: AGPL-3
|
|
6
9
|
Author: Tecnativa, Odoo Community Association (OCA)
|
|
7
10
|
Author-email: support@odoo-community.org
|
|
8
|
-
License: AGPL-3
|
|
9
11
|
Classifier: Programming Language :: Python
|
|
10
12
|
Classifier: Framework :: Odoo
|
|
11
|
-
Classifier: Framework :: Odoo ::
|
|
13
|
+
Classifier: Framework :: Odoo :: 17.0
|
|
12
14
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
-
Requires-Python: >=3.10
|
|
14
|
-
Requires-Dist: odoo <16.1dev,>=16.0a
|
|
15
15
|
|
|
16
16
|
==================================================
|
|
17
17
|
Multiple destinations for the same delivery method
|
|
@@ -22,7 +22,7 @@ Multiple destinations for the same delivery method
|
|
|
22
22
|
!! This file is generated by oca-gen-addon-readme !!
|
|
23
23
|
!! changes will be overwritten. !!
|
|
24
24
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
25
|
-
!! source digest: sha256:
|
|
25
|
+
!! source digest: sha256:eeb0230cb5ceb05618ed436440f6a253205bf4dcf28dafc242fe7eb3468b70bd
|
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
27
|
|
|
28
28
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -32,23 +32,25 @@ Multiple destinations for the same delivery method
|
|
|
32
32
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
33
33
|
:alt: License: AGPL-3
|
|
34
34
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
|
|
35
|
-
:target: https://github.com/OCA/delivery-carrier/tree/
|
|
35
|
+
:target: https://github.com/OCA/delivery-carrier/tree/17.0/delivery_multi_destination
|
|
36
36
|
:alt: OCA/delivery-carrier
|
|
37
37
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
38
|
-
:target: https://translation.odoo-community.org/projects/delivery-carrier-
|
|
38
|
+
:target: https://translation.odoo-community.org/projects/delivery-carrier-17-0/delivery-carrier-17-0-delivery_multi_destination
|
|
39
39
|
:alt: Translate me on Weblate
|
|
40
40
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
41
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=
|
|
41
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=17.0
|
|
42
42
|
:alt: Try me on Runboat
|
|
43
43
|
|
|
44
44
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
45
45
|
|
|
46
|
-
This module allows to set different price rules depending on the
|
|
46
|
+
This module allows to set different price rules depending on the
|
|
47
|
+
destination.
|
|
47
48
|
|
|
48
|
-
This module restores the concept of delivery grid, reusing the same
|
|
49
|
-
nesting several "children" delivery methods, one per possible
|
|
50
|
-
It has been designed to reuse all possible extensions to
|
|
51
|
-
without the need to create a glue module for having
|
|
49
|
+
This module restores the concept of delivery grid, reusing the same
|
|
50
|
+
model for nesting several "children" delivery methods, one per possible
|
|
51
|
+
destination. It has been designed to reuse all possible extensions to
|
|
52
|
+
the base delivery, without the need to create a glue module for having
|
|
53
|
+
multiple destinations.
|
|
52
54
|
|
|
53
55
|
**Table of contents**
|
|
54
56
|
|
|
@@ -60,24 +62,25 @@ Configuration
|
|
|
60
62
|
|
|
61
63
|
To configure delivery methods with multiple destinations:
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
destinations.
|
|
65
|
+
1. Go to Inventory > Configuration > Delivery > Shipping Methods
|
|
66
|
+
2. Create or edit an existing record.
|
|
67
|
+
3. Select "Destination type" = "Multiple destinations".
|
|
68
|
+
4. Introduce a line for each destination in the new tab "Destinations"
|
|
69
|
+
5. Lines have priority, so you have to put first the lines with more
|
|
70
|
+
restricted destinations.
|
|
69
71
|
|
|
70
72
|
Usage
|
|
71
73
|
=====
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
used for computing the delivery price according introduced
|
|
75
|
+
1. When using the delivery method in a Sales order, delivery address
|
|
76
|
+
will be used for computing the delivery price according introduced
|
|
77
|
+
destinations.
|
|
75
78
|
|
|
76
79
|
Known issues / Roadmap
|
|
77
80
|
======================
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
an extra module for handling everything properly.
|
|
82
|
+
- Delivery prices for e-commerce (website_sale_delivery module) might
|
|
83
|
+
need an extra module for handling everything properly.
|
|
81
84
|
|
|
82
85
|
Bug Tracker
|
|
83
86
|
===========
|
|
@@ -85,7 +88,7 @@ Bug Tracker
|
|
|
85
88
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
|
|
86
89
|
In case of trouble, please check there if your issue has already been reported.
|
|
87
90
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
88
|
-
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_multi_destination%0Aversion:%
|
|
91
|
+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_multi_destination%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
89
92
|
|
|
90
93
|
Do not contact contributors directly about support or help with technical issues.
|
|
91
94
|
|
|
@@ -93,26 +96,27 @@ Credits
|
|
|
93
96
|
=======
|
|
94
97
|
|
|
95
98
|
Authors
|
|
96
|
-
|
|
99
|
+
-------
|
|
97
100
|
|
|
98
101
|
* Tecnativa
|
|
99
102
|
|
|
100
103
|
Contributors
|
|
101
|
-
|
|
104
|
+
------------
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
- \`Tecnativa <https://www.tecnativa.com>\_\_\`:
|
|
104
107
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
- Pedro M. Baeza
|
|
109
|
+
- Luis M. Ontalba
|
|
110
|
+
- Carlos Roca
|
|
111
|
+
- Carolina Fernandez
|
|
112
|
+
- Víctor Martínez
|
|
109
113
|
|
|
110
|
-
|
|
114
|
+
- \`Dinamiche Aziendali <https://www.dinamicheaziendali.it>\_\_\`:
|
|
111
115
|
|
|
112
|
-
|
|
116
|
+
- Gianmarco Conte
|
|
113
117
|
|
|
114
118
|
Maintainers
|
|
115
|
-
|
|
119
|
+
-----------
|
|
116
120
|
|
|
117
121
|
This module is maintained by the OCA.
|
|
118
122
|
|
|
@@ -124,6 +128,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
124
128
|
mission is to support the collaborative development of Odoo features and
|
|
125
129
|
promote its widespread use.
|
|
126
130
|
|
|
127
|
-
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/
|
|
131
|
+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/17.0/delivery_multi_destination>`_ project on GitHub.
|
|
128
132
|
|
|
129
133
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
odoo/addons/delivery_multi_destination/README.rst,sha256=zbkAYZsjQERqxIozd4FYHSNfiDWaL7YAd1U0clbUisk,4284
|
|
2
|
+
odoo/addons/delivery_multi_destination/__init__.py,sha256=eShEGRadAlxopoLqIQ4-N42FM7MWPSuBe0h_l1cXTPM,87
|
|
3
|
+
odoo/addons/delivery_multi_destination/__manifest__.py,sha256=7Gqi_QaB1N0n8ZAWbhjwsE6aQBZWfs9tr5LqbRkTK7I,700
|
|
4
|
+
odoo/addons/delivery_multi_destination/demo/delivery_carrier_demo.xml,sha256=8B4KyxiIkHNsfKVjP5GmInxWHacxOpv4UnhUSI1rg18,3753
|
|
5
|
+
odoo/addons/delivery_multi_destination/i18n/cs_CZ.po,sha256=3VMaLX4HXb1Sin4vKeeC23RJ9xLp7qD26FDw7i5Yd0I,3810
|
|
6
|
+
odoo/addons/delivery_multi_destination/i18n/de.po,sha256=aVjg4EY88KB3DtR9P9s3oKkskXInRE3wbJVDO3FwInA,3597
|
|
7
|
+
odoo/addons/delivery_multi_destination/i18n/delivery_multi_destination.pot,sha256=lL8Q2WgsZjsOX6sqvzXbOeMKlvMINWQnTFULj-QjjaU,3201
|
|
8
|
+
odoo/addons/delivery_multi_destination/i18n/es.po,sha256=Tkme0CTNGFVmc30-0O9wzBgU7pKaMx9XTyqLdYFwVcI,3934
|
|
9
|
+
odoo/addons/delivery_multi_destination/i18n/fr.po,sha256=YQpDnCXX0TOMivqF9B87bCfGswbpHJ_zzwaDiMzFhNw,3501
|
|
10
|
+
odoo/addons/delivery_multi_destination/i18n/it.po,sha256=JPsBV_Rz2dywSrTPkkJWHO2-tsQTPLotJspoPlPlcCs,3892
|
|
11
|
+
odoo/addons/delivery_multi_destination/i18n/nl.po,sha256=h6W42JPelHppalDgbYRkg8GV2LaVEBPrHN4apIOoBsc,3501
|
|
12
|
+
odoo/addons/delivery_multi_destination/i18n/nl_NL.po,sha256=ahwSe5CVGvTQ4vAkPMXuItmy8ksNiIhO9IN65mKUQgU,3510
|
|
13
|
+
odoo/addons/delivery_multi_destination/i18n/pt_BR.po,sha256=_DKgRCMTNjs8fxCWI8tIIqW60vegG1Ap1zdOeKwrh40,3964
|
|
14
|
+
odoo/addons/delivery_multi_destination/i18n/sl.po,sha256=rEoCMjGSRmR29BYhAl2Vq7p7rDsfmXP2t9THZ4HfDGg,3573
|
|
15
|
+
odoo/addons/delivery_multi_destination/i18n/zh_CN.po,sha256=a7fl1iWfKJ1dClNsJt7HfbQqk71Db2zCDvqy4Fo3DBw,3542
|
|
16
|
+
odoo/addons/delivery_multi_destination/models/__init__.py,sha256=-K4wh1XVA03SZzTTycr_kcgawLtJanP54sq4kwHL5eA,97
|
|
17
|
+
odoo/addons/delivery_multi_destination/models/delivery_carrier.py,sha256=TeRnkfuBpwv7oFz5rfLh6oO2RbMeUgA0mr0U6HzGWHE,5039
|
|
18
|
+
odoo/addons/delivery_multi_destination/readme/CONFIGURE.md,sha256=KdG3B0ELnJK-igujQG_ZuUcj2OT52tpuCTIbrHEOE14,395
|
|
19
|
+
odoo/addons/delivery_multi_destination/readme/CONTRIBUTORS.md,sha256=PKGiALM1DjXzhI-KypkDWka87i0nQ1R0ofUv1qWgIlI,244
|
|
20
|
+
odoo/addons/delivery_multi_destination/readme/DESCRIPTION.md,sha256=Xjkb6T0t6deHKlMHpT3dEIoN5X-QxG9X-8G2WgVmmbs,383
|
|
21
|
+
odoo/addons/delivery_multi_destination/readme/ROADMAP.md,sha256=PF6a__2tCIHeeCezhU5wCS-9Jn3CS3NXLJuj3XjyN6g,127
|
|
22
|
+
odoo/addons/delivery_multi_destination/readme/USAGE.md,sha256=93LQi5SW8LslGtmABGbBo5jJInDB3B1SsYdWI8Hbkq0,159
|
|
23
|
+
odoo/addons/delivery_multi_destination/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
24
|
+
odoo/addons/delivery_multi_destination/static/description/index.html,sha256=vc5M5qHQyy0aPtxislx2MbZv7c05V2zVSLENMjUH9qg,14424
|
|
25
|
+
odoo/addons/delivery_multi_destination/tests/__init__.py,sha256=84QCPauC2-TkXZsq1euuy3oNLYJpiocgsAVkUqpUsLI,112
|
|
26
|
+
odoo/addons/delivery_multi_destination/tests/test_delivery_multi_destination.py,sha256=PKtpcuBOQcWhi-qoQ2fMvHiucHW1y67oJh0jDK4xHyY,7604
|
|
27
|
+
odoo/addons/delivery_multi_destination/views/delivery_carrier_view.xml,sha256=XyzKVxZKj0kty_qvW7PpXk85xV6IXpNGKkpO6_aIKC8,3774
|
|
28
|
+
odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info/METADATA,sha256=nf71zK2FFDmAu0GgxCDAY7ELdVS6TuM6w58SMt8LmTw,4840
|
|
29
|
+
odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
|
30
|
+
odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
31
|
+
odoo_addon_delivery_multi_destination-17.0.1.0.0.3.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
To configure delivery methods with multiple destinations:
|
|
2
|
-
|
|
3
|
-
#. Go to Inventory > Configuration > Delivery > Shipping Methods
|
|
4
|
-
#. Create or edit an existing record.
|
|
5
|
-
#. Select "Destination type" = "Multiple destinations".
|
|
6
|
-
#. Introduce a line for each destination in the new tab "Destinations"
|
|
7
|
-
#. Lines have priority, so you have to put first the lines with more restricted
|
|
8
|
-
destinations.
|