Skip to content

Commit 4b67932

Browse files
committed
Merge PR #766 into 16.0
Signed-off-by pedrobaeza
2 parents 907f94d + 4539c4c commit 4b67932

29 files changed

+2373
-0
lines changed

delivery_multi_destination/README.rst

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
==================================================
2+
Multiple destinations for the same delivery method
3+
==================================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:2cb9cc1f227af0d903b43f5511bdd469acf455504f9aa767342cff2c1dd7fdf5
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-OCA%2Fdelivery--carrier-lightgray.png?logo=github
20+
:target: https://github.com/OCA/delivery-carrier/tree/16.0/delivery_multi_destination
21+
:alt: OCA/delivery-carrier
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/delivery-carrier-16-0/delivery-carrier-16-0-delivery_multi_destination
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows to set different price rules depending on the destination.
32+
33+
This module restores the concept of delivery grid, reusing the same model for
34+
nesting several "children" delivery methods, one per possible destination.
35+
It has been designed to reuse all possible extensions to the base delivery,
36+
without the need to create a glue module for having multiple destinations.
37+
38+
**Table of contents**
39+
40+
.. contents::
41+
:local:
42+
43+
Configuration
44+
=============
45+
46+
To configure delivery methods with multiple destinations:
47+
48+
#. Go to Inventory > Configuration > Delivery > Shipping Methods
49+
#. Create or edit an existing record.
50+
#. Select "Destination type" = "Multiple destinations".
51+
#. Introduce a line for each destination in the new tab "Destinations"
52+
#. Lines have priority, so you have to put first the lines with more restricted
53+
destinations.
54+
55+
Usage
56+
=====
57+
58+
#. When using the delivery method in a Sales order, delivery address will be
59+
used for computing the delivery price according introduced destinations.
60+
61+
Known issues / Roadmap
62+
======================
63+
64+
* Delivery prices for e-commerce (`website_sale_delivery` module) might need
65+
an extra module for handling everything properly.
66+
67+
Bug Tracker
68+
===========
69+
70+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
71+
In case of trouble, please check there if your issue has already been reported.
72+
If you spotted it first, help us to smash it by providing a detailed and welcomed
73+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_multi_destination%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
74+
75+
Do not contact contributors directly about support or help with technical issues.
76+
77+
Credits
78+
=======
79+
80+
Authors
81+
~~~~~~~
82+
83+
* Tecnativa
84+
85+
Contributors
86+
~~~~~~~~~~~~
87+
88+
* `Tecnativa <https://www.tecnativa.com>__`:
89+
90+
* Pedro M. Baeza
91+
* Luis M. Ontalba
92+
* Carlos Roca
93+
* Carolina Fernandez
94+
95+
* `Dinamiche Aziendali <https://www.dinamicheaziendali.it>__`:
96+
97+
* Gianmarco Conte
98+
99+
Maintainers
100+
~~~~~~~~~~~
101+
102+
This module is maintained by the OCA.
103+
104+
.. image:: https://odoo-community.org/logo.png
105+
:alt: Odoo Community Association
106+
:target: https://odoo-community.org
107+
108+
OCA, or the Odoo Community Association, is a nonprofit organization whose
109+
mission is to support the collaborative development of Odoo features and
110+
promote its widespread use.
111+
112+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/16.0/delivery_multi_destination>`_ project on GitHub.
113+
114+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2016-2019 Tecnativa - Pedro M. Baeza
2+
# Copyright 2017 Tecnativa - Luis M. Ontalba
3+
# Copyright 2021 Gianmarco Conte <gconte@dinamicheaziendali.it>
4+
# Copyright 2024 Tecnativa - Carolina Fernandez
5+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
6+
7+
{
8+
"name": "Multiple destinations for the same delivery method",
9+
"version": "16.0.1.0.0",
10+
"category": "Delivery",
11+
"website": "https://github.com/OCA/delivery-carrier",
12+
"author": "Tecnativa, Odoo Community Association (OCA)",
13+
"license": "AGPL-3",
14+
"installable": True,
15+
"depends": ["delivery"],
16+
"demo": ["demo/delivery_carrier_demo.xml"],
17+
"data": ["views/delivery_carrier_view.xml"],
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="product_product_delivery_carrier_multi" model="product.product">
4+
<field name="name">International Carrier Inc.</field>
5+
<field name="detailed_type">service</field>
6+
</record>
7+
<record id="delivery_carrier_multi" model="delivery.carrier">
8+
<field name="name">International Carrier Inc.</field>
9+
<field name="sequence">4</field>
10+
<field name="destination_type">multi</field>
11+
<field name="product_id" ref="product_product_delivery_carrier_multi" />
12+
</record>
13+
<record id="product_product_delivery_carrier_multi_child_1" model="product.product">
14+
<field name="name">International Carrier Inc., Belgium</field>
15+
<field name="detailed_type">service</field>
16+
</record>
17+
<record id="delivery_carrier_multi_child_1" model="delivery.carrier">
18+
<field name="name">Belgium</field>
19+
<field name="parent_id" ref="delivery_carrier_multi" />
20+
<field name="fixed_price">20</field>
21+
<field name="sequence">1</field>
22+
<field name="delivery_type">base_on_rule</field>
23+
<field name="country_ids" eval="[(4, ref('base.be'))]" />
24+
<field name="product_id" ref="product_product_delivery_carrier_multi_child_1" />
25+
</record>
26+
<record id="delivery_price_rule1" model="delivery.price.rule">
27+
<field name="carrier_id" ref="delivery_carrier_multi_child_1" />
28+
<field name="max_value" eval="5" />
29+
<field name="list_base_price" eval="20" />
30+
</record>
31+
<!-- delivery charge of product if weight more than 5kg-->
32+
<record id="delivery_price_rule2" model="delivery.price.rule">
33+
<field name="carrier_id" ref="delivery_carrier_multi_child_1" />
34+
<field name="operator">&gt;=</field>
35+
<field name="max_value" eval="5" />
36+
<field name="list_base_price" eval="50" />
37+
</record>
38+
<!-- free delivery charge if price more than 300-->
39+
<record id="delivery_price_rule3" model="delivery.price.rule">
40+
<field name="carrier_id" ref="delivery_carrier_multi_child_1" />
41+
<field name="operator">&gt;=</field>
42+
<field name="variable">price</field>
43+
<field name="max_value" eval="300" />
44+
<field name="list_base_price" eval="0" />
45+
</record>
46+
<record id="product_product_delivery_carrier_multi_child_2" model="product.product">
47+
<field name="name">International Carrier Inc., France</field>
48+
<field name="detailed_type">service</field>
49+
</record>
50+
<record id="delivery_carrier_multi_child_2" model="delivery.carrier">
51+
<field name="name">France</field>
52+
<field name="parent_id" ref="delivery_carrier_multi" />
53+
<field name="fixed_price">40</field>
54+
<field name="sequence">2</field>
55+
<field name="delivery_type">fixed</field>
56+
<field name="country_ids" eval="[(4, ref('base.fr'))]" />
57+
<field name="product_id" ref="product_product_delivery_carrier_multi_child_2" />
58+
</record>
59+
<record id="product_product_delivery_carrier_multi_child_3" model="product.product">
60+
<field name="name">International Carrier Inc., United Kingdom</field>
61+
<field name="detailed_type">service</field>
62+
</record>
63+
<record id="delivery_carrier_multi_child_3" model="delivery.carrier">
64+
<field name="name">United Kingdom</field>
65+
<field name="parent_id" ref="delivery_carrier_multi" />
66+
<field name="fixed_price">60</field>
67+
<field name="sequence">2</field>
68+
<field name="delivery_type">fixed</field>
69+
<field name="country_ids" eval="[(4, ref('base.uk'))]" />
70+
<field name="product_id" ref="product_product_delivery_carrier_multi_child_3" />
71+
</record>
72+
</odoo>
+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * delivery_multi_destination
4+
#
5+
# Translators:
6+
# Lukáš Spurný <lukasspurny8@gmail.com>, 2018
7+
msgid ""
8+
msgstr ""
9+
"Project-Id-Version: Odoo Server 10.0\n"
10+
"Report-Msgid-Bugs-To: \n"
11+
"POT-Creation-Date: 2018-02-28 01:44+0000\n"
12+
"PO-Revision-Date: 2018-02-28 01:44+0000\n"
13+
"Last-Translator: Lukáš Spurný <lukasspurny8@gmail.com>, 2018\n"
14+
"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/"
15+
"teams/23907/cs_CZ/)\n"
16+
"Language: cs_CZ\n"
17+
"MIME-Version: 1.0\n"
18+
"Content-Type: text/plain; charset=UTF-8\n"
19+
"Content-Transfer-Encoding: \n"
20+
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
21+
22+
#. module: delivery_multi_destination
23+
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1
24+
msgid "Belgium"
25+
msgstr "Belgie"
26+
27+
#. module: delivery_multi_destination
28+
#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type
29+
#, fuzzy
30+
msgid "Destination Type"
31+
msgstr "Typ cíle"
32+
33+
#. module: delivery_multi_destination
34+
#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids
35+
msgid "Destination grid"
36+
msgstr "Destinační mřížka"
37+
38+
#. module: delivery_multi_destination
39+
#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form
40+
msgid "Destinations"
41+
msgstr "Destinace"
42+
43+
#. module: delivery_multi_destination
44+
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2
45+
msgid "France"
46+
msgstr "Francie"
47+
48+
#. module: delivery_multi_destination
49+
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi
50+
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi
51+
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template
52+
msgid "International Carrier Inc."
53+
msgstr "Mezinárodní dopravce Inc."
54+
55+
#. module: delivery_multi_destination
56+
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1
57+
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template
58+
#, fuzzy
59+
msgid "International Carrier Inc., Belgium"
60+
msgstr "Mezinárodní dopravce Inc."
61+
62+
#. module: delivery_multi_destination
63+
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2
64+
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template
65+
#, fuzzy
66+
msgid "International Carrier Inc., France"
67+
msgstr "Mezinárodní dopravce Inc."
68+
69+
#. module: delivery_multi_destination
70+
#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3
71+
#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template
72+
#, fuzzy
73+
msgid "International Carrier Inc., United Kingdom"
74+
msgstr "Mezinárodní dopravce Inc."
75+
76+
#. module: delivery_multi_destination
77+
#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi
78+
msgid "Multiple destinations"
79+
msgstr "Více cílů"
80+
81+
#. module: delivery_multi_destination
82+
#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one
83+
msgid "One destination"
84+
msgstr "Jeden cíl"
85+
86+
#. module: delivery_multi_destination
87+
#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id
88+
msgid "Parent carrier"
89+
msgstr "Nadřazený dopravce"
90+
91+
#. module: delivery_multi_destination
92+
#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier
93+
msgid "Shipping Methods"
94+
msgstr ""
95+
96+
#. module: delivery_multi_destination
97+
#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0
98+
#, python-format
99+
msgid "There is no matching delivery rule."
100+
msgstr ""
101+
102+
#. module: delivery_multi_destination
103+
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3
104+
msgid "United Kingdom"
105+
msgstr "Spojené království"
106+
107+
#. module: delivery_multi_destination
108+
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi
109+
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1
110+
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2
111+
#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3
112+
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template
113+
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template
114+
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template
115+
#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template
116+
msgid "Units"
117+
msgstr ""

0 commit comments

Comments
 (0)