diff --git a/delivery_multi_destination/README.rst b/delivery_multi_destination/README.rst new file mode 100644 index 0000000000..2ec8f966c0 --- /dev/null +++ b/delivery_multi_destination/README.rst @@ -0,0 +1,117 @@ +================================================== +Multiple destinations for the same delivery method +================================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:01da966e0e1ee6b31aaa5d0da6e4a614eec3e5fa0637dde2aeaf2096d1428b01 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github + :target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_multi_destination + :alt: OCA/delivery-carrier +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_multi_destination + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to set different price rules depending on the +destination. + +This module restores the concept of delivery grid, reusing the same +model for nesting several "children" delivery methods, one per possible +destination. It has been designed to reuse all possible extensions to +the base delivery, without the need to create a glue module for having +multiple destinations. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure delivery methods with multiple destinations: + +1. Go to Inventory > Configuration > Delivery > Shipping Methods +2. Create or edit an existing record. +3. Select "Destination type" = "Multiple destinations". +4. Introduce a line for each destination in the new tab "Destinations" +5. Lines have priority, so you have to put first the lines with more + restricted destinations. + +Usage +===== + +1. When using the delivery method in a Sales order, delivery address + will be used for computing the delivery price according introduced + destinations. + +Known issues / Roadmap +====================== + +- Delivery prices for e-commerce (website_sale_delivery module) might + need an extra module for handling everything properly. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa + +Contributors +------------ + +- \`Tecnativa \_\_\`: + + - Pedro M. Baeza + - Luis M. Ontalba + - Carlos Roca + - Carolina Fernandez + +- \`Dinamiche Aziendali \_\_\`: + + - Gianmarco Conte + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/delivery-carrier `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/delivery_multi_destination/__init__.py b/delivery_multi_destination/__init__.py new file mode 100644 index 0000000000..31660d6a96 --- /dev/null +++ b/delivery_multi_destination/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/delivery_multi_destination/__manifest__.py b/delivery_multi_destination/__manifest__.py new file mode 100644 index 0000000000..e72c440b17 --- /dev/null +++ b/delivery_multi_destination/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2016-2019 Tecnativa - Pedro M. Baeza +# Copyright 2017 Tecnativa - Luis M. Ontalba +# Copyright 2021 Gianmarco Conte +# Copyright 2024 Tecnativa - Carolina Fernandez +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Multiple destinations for the same delivery method", + "version": "18.0.1.0.0", + "category": "Delivery", + "website": "https://github.com/OCA/delivery-carrier", + "author": "Tecnativa, Odoo Community Association (OCA)", + "license": "AGPL-3", + "installable": True, + "depends": ["delivery", "stock_delivery"], + "demo": ["demo/delivery_carrier_demo.xml"], + "data": ["views/delivery_carrier_view.xml"], +} diff --git a/delivery_multi_destination/demo/delivery_carrier_demo.xml b/delivery_multi_destination/demo/delivery_carrier_demo.xml new file mode 100644 index 0000000000..10567f5538 --- /dev/null +++ b/delivery_multi_destination/demo/delivery_carrier_demo.xml @@ -0,0 +1,72 @@ + + + + International Carrier Inc. + service + + + International Carrier Inc. + 4 + multi + + + + International Carrier Inc., Belgium + service + + + Belgium + + 20 + 1 + base_on_rule + + + + + + + + + + + + >= + + + + + + + >= + price + + + + + International Carrier Inc., France + service + + + France + + 40 + 2 + fixed + + + + + International Carrier Inc., United Kingdom + service + + + United Kingdom + + 60 + 2 + fixed + + + + diff --git a/delivery_multi_destination/i18n/cs_CZ.po b/delivery_multi_destination/i18n/cs_CZ.po new file mode 100644 index 0000000000..258db2abba --- /dev/null +++ b/delivery_multi_destination/i18n/cs_CZ.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# Lukáš Spurný , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-28 01:44+0000\n" +"PO-Revision-Date: 2018-02-28 01:44+0000\n" +"Last-Translator: Lukáš Spurný , 2018\n" +"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/" +"teams/23907/cs_CZ/)\n" +"Language: cs_CZ\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "Belgie" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +#, fuzzy +msgid "Destination Type" +msgstr "Typ cíle" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "Destinační mřížka" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "Destinace" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "Francie" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "Mezinárodní dopravce Inc." + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#, fuzzy +msgid "International Carrier Inc., Belgium" +msgstr "Mezinárodní dopravce Inc." + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#, fuzzy +msgid "International Carrier Inc., France" +msgstr "Mezinárodní dopravce Inc." + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#, fuzzy +msgid "International Carrier Inc., United Kingdom" +msgstr "Mezinárodní dopravce Inc." + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "Více cílů" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "Jeden cíl" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "Nadřazený dopravce" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "Spojené království" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "" diff --git a/delivery_multi_destination/i18n/de.po b/delivery_multi_destination/i18n/de.po new file mode 100644 index 0000000000..c459aa6a36 --- /dev/null +++ b/delivery_multi_destination/i18n/de.po @@ -0,0 +1,119 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-15 18:21+0000\n" +"PO-Revision-Date: 2019-10-11 10:36+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.8\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "Belgien" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "Zieltyp" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "Ziele" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "Frankreich" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "Mehrere Ziele" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "Ein Ziel" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "Vereinigtes Königreich" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "" + +#~ msgid "Delivery Methods" +#~ msgstr "Liefermethoden" + +#~ msgid "kg" +#~ msgstr "kg" diff --git a/delivery_multi_destination/i18n/delivery_multi_destination.pot b/delivery_multi_destination/i18n/delivery_multi_destination.pot new file mode 100644 index 0000000000..71b37238e4 --- /dev/null +++ b/delivery_multi_destination/i18n/delivery_multi_destination.pot @@ -0,0 +1,92 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "" + +#. module: delivery_multi_destination +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#. odoo-python +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "" diff --git a/delivery_multi_destination/i18n/es.po b/delivery_multi_destination/i18n/es.po new file mode 100644 index 0000000000..628ce1cab2 --- /dev/null +++ b/delivery_multi_destination/i18n/es.po @@ -0,0 +1,114 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# OCA Transbot , 2017 +# enjolras , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-13 03:45+0000\n" +"PO-Revision-Date: 2023-10-09 07:43+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "Bélgica" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "Tipo de destino" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "Cuadrícula de destino" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "Destinos" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "Francia" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "Transportes Internacionales Inc." + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "Transportes Internacionales Inc., Bélgica" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "Transportes Internacionales Inc., Francia" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "Transporte Internacional Inc., Reino Unido" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "Destinos múltiples" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "Un destino" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "Transportista matriz" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "Métodos de Envío" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "No hay una regla de entrega coincidente." + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "Reino Unido" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "Unidades" diff --git a/delivery_multi_destination/i18n/fr.po b/delivery_multi_destination/i18n/fr.po new file mode 100644 index 0000000000..0042eefc1b --- /dev/null +++ b/delivery_multi_destination/i18n/fr.po @@ -0,0 +1,112 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-15 18:21+0000\n" +"PO-Revision-Date: 2017-12-15 18:21+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "" diff --git a/delivery_multi_destination/i18n/it.po b/delivery_multi_destination/i18n/it.po new file mode 100644 index 0000000000..b65d673f49 --- /dev/null +++ b/delivery_multi_destination/i18n/it.po @@ -0,0 +1,113 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-15 18:21+0000\n" +"PO-Revision-Date: 2024-08-21 16:06+0000\n" +"Last-Translator: mymage \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6.2\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "Belgio" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "Tipo destinazione" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "Griglia destinazione" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "Destinazioni" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "Francia" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "Corriere internazionale Inc." + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "Corriere internazionale Inc., Belgio" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "Corriere internazionale Inc., Francia" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "Corriere internazionale Inc., Regno Unito" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "Destinazioni multiple" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "Una destinazione" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "Corriere partner" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "Metodi di spedizione" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "Non c'è una regola di consegna corrispondente." + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "Regno Unito" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "Unità" diff --git a/delivery_multi_destination/i18n/nl.po b/delivery_multi_destination/i18n/nl.po new file mode 100644 index 0000000000..6327f56075 --- /dev/null +++ b/delivery_multi_destination/i18n/nl.po @@ -0,0 +1,112 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-15 18:21+0000\n" +"PO-Revision-Date: 2017-12-15 18:21+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "" diff --git a/delivery_multi_destination/i18n/nl_NL.po b/delivery_multi_destination/i18n/nl_NL.po new file mode 100644 index 0000000000..d94dfd998b --- /dev/null +++ b/delivery_multi_destination/i18n/nl_NL.po @@ -0,0 +1,113 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-15 18:21+0000\n" +"PO-Revision-Date: 2017-12-15 18:21+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "" diff --git a/delivery_multi_destination/i18n/pt_BR.po b/delivery_multi_destination/i18n/pt_BR.po new file mode 100644 index 0000000000..4094f0a347 --- /dev/null +++ b/delivery_multi_destination/i18n/pt_BR.po @@ -0,0 +1,124 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-15 18:21+0000\n" +"PO-Revision-Date: 2024-05-21 03:17+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/" +"23907/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "Bélgica" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "Tipo de destinatário" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "Rede de destinatário" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "Destinatários" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "França" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "Transportes Internacionais, S.A." + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "International Carrier Inc., Bélgica" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "International Carrier Inc., França" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "International Carrier Inc., Reino Unido" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "Múltiplos destinatários" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "Um destino" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "Transportadora Matriz" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "Métodos de Envio" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "Não há regra de entrega correspondente." + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "Reino Unido" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "Unidades" + +#~ msgid "Delivery Methods" +#~ msgstr "Métodos de entrega" + +#~ msgid "Unit(s)" +#~ msgstr "Unidade(s)" + +#~ msgid "kg" +#~ msgstr "kg" diff --git a/delivery_multi_destination/i18n/sl.po b/delivery_multi_destination/i18n/sl.po new file mode 100644 index 0000000000..0e7ac048ca --- /dev/null +++ b/delivery_multi_destination/i18n/sl.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-15 18:21+0000\n" +"PO-Revision-Date: 2020-08-11 10:59+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 3.10\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "" + +#~ msgid "Delivery Methods" +#~ msgstr "Načini dostave" diff --git a/delivery_multi_destination/i18n/zh_CN.po b/delivery_multi_destination/i18n/zh_CN.po new file mode 100644 index 0000000000..6e0ee2e2ec --- /dev/null +++ b/delivery_multi_destination/i18n/zh_CN.po @@ -0,0 +1,119 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_multi_destination +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-09-07 11:23+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1 +msgid "Belgium" +msgstr "比利时" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__destination_type +msgid "Destination Type" +msgstr "目的地类型" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__child_ids +msgid "Destination grid" +msgstr "目标网格" + +#. module: delivery_multi_destination +#: model_terms:ir.ui.view,arch_db:delivery_multi_destination.view_delivery_carrier_form +msgid "Destinations" +msgstr "目的地" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2 +msgid "France" +msgstr "法国" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "International Carrier Inc." +msgstr "国际航空公司。" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +msgid "International Carrier Inc., Belgium" +msgstr "比利时国际航空公司" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +msgid "International Carrier Inc., France" +msgstr "法国国际航空公司" + +#. module: delivery_multi_destination +#: model:product.product,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +msgid "International Carrier Inc., United Kingdom" +msgstr "英国国际航空公司" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__multi +msgid "Multiple destinations" +msgstr "多个目的地" + +#. module: delivery_multi_destination +#: model:ir.model.fields.selection,name:delivery_multi_destination.selection__delivery_carrier__destination_type__one +msgid "One destination" +msgstr "一个目的地" + +#. module: delivery_multi_destination +#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier__parent_id +msgid "Parent carrier" +msgstr "父承运商" + +#. module: delivery_multi_destination +#: model:ir.model,name:delivery_multi_destination.model_delivery_carrier +msgid "Shipping Methods" +msgstr "" + +#. module: delivery_multi_destination +#: code:addons/delivery_multi_destination/models/delivery_carrier.py:0 +#, python-format +msgid "There is no matching delivery rule." +msgstr "" + +#. module: delivery_multi_destination +#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3 +msgid "United Kingdom" +msgstr "英国" + +#. module: delivery_multi_destination +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2 +#: model:product.product,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3 +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_1_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_2_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_child_3_product_template +#: model:product.template,uom_name:delivery_multi_destination.product_product_delivery_carrier_multi_product_template +msgid "Units" +msgstr "" + +#~ msgid "Delivery Methods" +#~ msgstr "交货方式" + +#~ msgid "Unit(s)" +#~ msgstr "件" + +#~ msgid "kg" +#~ msgstr "千克" diff --git a/delivery_multi_destination/models/__init__.py b/delivery_multi_destination/models/__init__.py new file mode 100644 index 0000000000..f3bc012b95 --- /dev/null +++ b/delivery_multi_destination/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import delivery_carrier diff --git a/delivery_multi_destination/models/delivery_carrier.py b/delivery_multi_destination/models/delivery_carrier.py new file mode 100644 index 0000000000..3354081abb --- /dev/null +++ b/delivery_multi_destination/models/delivery_carrier.py @@ -0,0 +1,124 @@ +# Copyright 2016-2020 Tecnativa - Pedro M. Baeza +# Copyright 2017 Tecnativa - Luis M. Ontalba +# Copyright 2021 Gianmarco Conte +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models +from odoo.exceptions import ValidationError +from odoo.osv import expression + + +class DeliveryCarrier(models.Model): + _inherit = "delivery.carrier" + + child_ids = fields.One2many( + comodel_name="delivery.carrier", + inverse_name="parent_id", + string="Destination grid", + ) + parent_id = fields.Many2one( + comodel_name="delivery.carrier", + string="Parent carrier", + ondelete="cascade", + ) + destination_type = fields.Selection( + selection=[("one", "One destination"), ("multi", "Multiple destinations")], + default="one", + required=True, + ) + + @api.onchange("destination_type", "child_ids") + def _onchange_destination_type(self): + """Define the corresponding value to avoid creation error with UX.""" + if self.destination_type == "multi" and self.child_ids and not self.product_id: + self.product_id = fields.first(self.child_ids.product_id) + + @api.model + @api.readonly + @api.returns("self") + def search(self, domain, offset=0, limit=None, order=None): + """Don't show by default children carriers.""" + if not self.env.context.get("show_children_carriers"): + if domain is None: + domain = [] + domain += [("parent_id", "=", False)] + return super().search(domain, offset=offset, limit=limit, order=order) + + @api.model + def _search_display_name(self, operator, value): + domain = super()._search_display_name(operator, value) + domain = expression.AND([[("parent_id", "=", False)], domain]) + return domain + + def available_carriers(self, partner, order): + """If the carrier is multi, we test the availability on children.""" + available = self.env["delivery.carrier"] + for carrier in self: + if carrier.destination_type == "one": + candidates = carrier + else: + carrier = carrier.with_context(show_children_carriers=True) + candidates = carrier.child_ids + if super(DeliveryCarrier, candidates).available_carriers(partner, order): + available |= carrier + return available + + def rate_shipment(self, order): + """We have to override this method for getting the proper price + according destination on sales orders. + """ + if self.destination_type == "one": + return super().rate_shipment(order) + else: + carrier = self.with_context(show_children_carriers=True) + for subcarrier in carrier.child_ids: + if subcarrier._match_address(order.partner_shipping_id): + return super( + DeliveryCarrier, + subcarrier, + ).rate_shipment(order) + + def send_shipping(self, pickings): + """We have to override this method for redirecting the result to the + proper "child" carrier. + """ + if self.destination_type == "one" or not self: + return super().send_shipping(pickings) + else: + carrier = self.with_context(show_children_carriers=True) + res = [] + for p in pickings: + picking_res = False + for subcarrier in carrier.child_ids.filtered( + lambda x, p=p: not x.company_id or x.company_id == p.company_id + ): + if subcarrier.delivery_type == "fixed": + if subcarrier._match_address(p.partner_id): + picking_res = [ + { + "exact_price": subcarrier.fixed_price, + "tracking_number": False, + } + ] + break + else: + try: + # on base_on_rule_send_shipping, the method + # _get_price_available is called using p.carrier_id, + # ignoring the self arg, so we need to temporarily replace + # it with the subcarrier + p.carrier_id = subcarrier.id + picking_res = super( + DeliveryCarrier, subcarrier + ).send_shipping(p) + break + except Exception: # pylint: disable=except-pass + pass + finally: + p.carrier_id = carrier + if not picking_res: + raise ValidationError( + p.env._("There is no matching delivery rule.") + ) + res += picking_res + return res diff --git a/delivery_multi_destination/pyproject.toml b/delivery_multi_destination/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/delivery_multi_destination/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/delivery_multi_destination/readme/CONFIGURE.md b/delivery_multi_destination/readme/CONFIGURE.md new file mode 100644 index 0000000000..48f5b4a33c --- /dev/null +++ b/delivery_multi_destination/readme/CONFIGURE.md @@ -0,0 +1,8 @@ +To configure delivery methods with multiple destinations: + +1. Go to Inventory \> Configuration \> Delivery \> Shipping Methods +2. Create or edit an existing record. +3. Select "Destination type" = "Multiple destinations". +4. Introduce a line for each destination in the new tab "Destinations" +5. Lines have priority, so you have to put first the lines with more + restricted destinations. diff --git a/delivery_multi_destination/readme/CONTRIBUTORS.md b/delivery_multi_destination/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..d99d8ceae0 --- /dev/null +++ b/delivery_multi_destination/readme/CONTRIBUTORS.md @@ -0,0 +1,7 @@ +- \`Tecnativa \<\>\_\_\`: + - Pedro M. Baeza + - Luis M. Ontalba + - Carlos Roca + - Carolina Fernandez +- \`Dinamiche Aziendali \<\>\_\_\`: + - Gianmarco Conte diff --git a/delivery_multi_destination/readme/DESCRIPTION.md b/delivery_multi_destination/readme/DESCRIPTION.md new file mode 100644 index 0000000000..66f21c4b9a --- /dev/null +++ b/delivery_multi_destination/readme/DESCRIPTION.md @@ -0,0 +1,8 @@ +This module allows to set different price rules depending on the +destination. + +This module restores the concept of delivery grid, reusing the same +model for nesting several "children" delivery methods, one per possible +destination. It has been designed to reuse all possible extensions to +the base delivery, without the need to create a glue module for having +multiple destinations. diff --git a/delivery_multi_destination/readme/ROADMAP.md b/delivery_multi_destination/readme/ROADMAP.md new file mode 100644 index 0000000000..029422f9b2 --- /dev/null +++ b/delivery_multi_destination/readme/ROADMAP.md @@ -0,0 +1,2 @@ +- Delivery prices for e-commerce (website_sale_delivery module) might + need an extra module for handling everything properly. diff --git a/delivery_multi_destination/readme/USAGE.md b/delivery_multi_destination/readme/USAGE.md new file mode 100644 index 0000000000..cf35a6502b --- /dev/null +++ b/delivery_multi_destination/readme/USAGE.md @@ -0,0 +1,3 @@ +1. When using the delivery method in a Sales order, delivery address + will be used for computing the delivery price according introduced + destinations. diff --git a/delivery_multi_destination/static/description/icon.png b/delivery_multi_destination/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/delivery_multi_destination/static/description/icon.png differ diff --git a/delivery_multi_destination/static/description/index.html b/delivery_multi_destination/static/description/index.html new file mode 100644 index 0000000000..1f3fb9fe2c --- /dev/null +++ b/delivery_multi_destination/static/description/index.html @@ -0,0 +1,469 @@ + + + + + +Multiple destinations for the same delivery method + + + +
+

Multiple destinations for the same delivery method

+ + +

Beta License: AGPL-3 OCA/delivery-carrier Translate me on Weblate Try me on Runboat

+

This module allows to set different price rules depending on the +destination.

+

This module restores the concept of delivery grid, reusing the same +model for nesting several “children” delivery methods, one per possible +destination. It has been designed to reuse all possible extensions to +the base delivery, without the need to create a glue module for having +multiple destinations.

+

Table of contents

+ +
+

Configuration

+

To configure delivery methods with multiple destinations:

+
    +
  1. Go to Inventory > Configuration > Delivery > Shipping Methods
  2. +
  3. Create or edit an existing record.
  4. +
  5. Select “Destination type” = “Multiple destinations”.
  6. +
  7. Introduce a line for each destination in the new tab “Destinations”
  8. +
  9. Lines have priority, so you have to put first the lines with more +restricted destinations.
  10. +
+
+
+

Usage

+
    +
  1. When using the delivery method in a Sales order, delivery address +will be used for computing the delivery price according introduced +destinations.
  2. +
+
+
+

Known issues / Roadmap

+
    +
  • Delivery prices for e-commerce (website_sale_delivery module) might +need an extra module for handling everything properly.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/delivery-carrier project on GitHub.

+

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

+
+
+
+ + diff --git a/delivery_multi_destination/tests/__init__.py b/delivery_multi_destination/tests/__init__.py new file mode 100644 index 0000000000..68b4d7a118 --- /dev/null +++ b/delivery_multi_destination/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_delivery_multi_destination diff --git a/delivery_multi_destination/tests/test_delivery_multi_destination.py b/delivery_multi_destination/tests/test_delivery_multi_destination.py new file mode 100644 index 0000000000..6ab5dd3789 --- /dev/null +++ b/delivery_multi_destination/tests/test_delivery_multi_destination.py @@ -0,0 +1,190 @@ +# Copyright 2017 Tecnativa - Luis M. Ontalba +# Copyright 2019-2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests import Form, common + + +class TestDeliveryMultiDestination(common.TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.country_1 = cls.env["res.country"].create( + {"name": "Test country 1", "code": "T1"} + ) + cls.pricelist = cls.env["product.pricelist"].create( + {"name": "Test pricelist", "currency_id": cls.env.company.currency_id.id} + ) + cls.partner_1 = cls.env["res.partner"].create( + { + "name": "Test partner 1", + "country_id": cls.country_1.id, + "property_product_pricelist": cls.pricelist.id, + } + ) + cls.country_2 = cls.env["res.country"].create( + {"name": "Test country 2", "code": "T2"} + ) + cls.state = cls.env["res.country.state"].create( + {"name": "Test state", "code": "TS", "country_id": cls.country_2.id} + ) + cls.partner_2 = cls.env["res.partner"].create( + { + "name": "Test partner 2", + "country_id": cls.country_2.id, + "state_id": cls.state.id, + "zip": "22222", + } + ) + cls.partner_3 = cls.env["res.partner"].create( + { + "name": "Test partner 3", + "country_id": cls.country_2.id, + "state_id": cls.state.id, + "zip": "33333", + } + ) + cls.product = cls.env["product.product"].create( + {"name": "Test carrier multi", "type": "service"} + ) + cls.product_child_1 = cls.env["product.product"].create( + {"name": "Test child 1", "type": "service"} + ) + cls.product_child_2 = cls.env["product.product"].create( + {"name": "Test child 2", "type": "service"} + ) + zip_prefix_child1 = cls.env["delivery.zip.prefix"].create({"name": "22222"}) + zip_prefix_child2 = cls.env["delivery.zip.prefix"].create({"name": "33333"}) + cls.carrier_multi = cls._create_carrier( + cls, + ( + { + "name": "Test child 1", + "product_id": cls.product_child_1, + "zip_prefix_ids": zip_prefix_child1, + "fixed_price": 50, + }, + { + "name": "Test child 2", + "product_id": cls.product_child_2, + "zip_prefix_ids": zip_prefix_child2, + "fixed_price": 150, + }, + ), + ) + cls.carrier_single = cls.carrier_multi.copy( + { + "name": "Test carrier single", + "destination_type": "one", + "child_ids": False, + } + ) + cls.product = cls.env["product.product"].create( + { + "name": "Test product", + "type": "consu", + "is_storable": True, + "list_price": 1, + } + ) + cls.sale_order = cls._create_sale_order(cls) + + def _create_carrier(self, childs): + carrier_form = Form(self.env["delivery.carrier"]) + carrier_form.name = "Test carrier multi" + carrier_form.product_id = self.product + carrier_form.delivery_type = "fixed" + carrier_form.fixed_price = 100 + # this needs to be done in this order + carrier_form.destination_type = "multi" + for child_item in childs: + with carrier_form.child_ids.new() as child_form: + child_form.name = child_item["name"] + child_form.product_id = child_item["product_id"] + child_form.country_ids.add(self.country_2) + child_form.state_ids.add(self.state) + child_form.zip_prefix_ids.add(child_item["zip_prefix_ids"]) + child_form.delivery_type = "fixed" + child_form.fixed_price = child_item["fixed_price"] + return carrier_form.save() + + def _create_sale_order(self): + order_form = Form(self.env["sale.order"]) + order_form.partner_id = self.partner_1 + with order_form.order_line.new() as line_form: + line_form.product_id = self.product + return order_form.save() + + def _choose_delivery_carrier(self, order, carrier): + wizard = Form( + self.env["choose.delivery.carrier"].with_context( + **{ + "default_order_id": order.id, + "default_carrier_id": carrier.id, + } + ) + ) + choose_delivery_carrier = wizard.save() + choose_delivery_carrier.button_confirm() + + def test_delivery_multi_destination(self): + order = self.sale_order + order.carrier_id = self.carrier_single.id + self._choose_delivery_carrier(order, order.carrier_id) + sale_order_line = order.order_line.filtered("is_delivery") + self.assertAlmostEqual(sale_order_line.price_unit, 100, 2) + self.assertTrue(sale_order_line.is_delivery) + order.carrier_id = self.carrier_multi.id + order.partner_shipping_id = self.partner_2.id + self._choose_delivery_carrier(order, order.carrier_id) + sale_order_line = order.order_line.filtered("is_delivery") + self.assertAlmostEqual(sale_order_line.price_unit, 50, 2) + self.assertTrue(sale_order_line.is_delivery) + order.partner_shipping_id = self.partner_3.id + self._choose_delivery_carrier(order, order.carrier_id) + sale_order_line = order.order_line.filtered("is_delivery") + self.assertAlmostEqual(sale_order_line.price_unit, 150, 2) + + def test_search(self): + carriers = self.env["delivery.carrier"].search([]) + children_carrier = self.carrier_multi.with_context( + show_children_carriers=True, + ).child_ids[0] + self.assertNotIn(children_carrier, carriers) + + def test_name_search(self): + carrier_names = self.env["delivery.carrier"].name_search() + children_carrier = self.carrier_multi.with_context( + show_children_carriers=True, + ).child_ids[0] + self.assertTrue(all(x[0] != children_carrier.id for x in carrier_names)) + + def test_available_carriers(self): + self.sale_order.carrier_id = self.carrier_multi.id + self.sale_order.partner_shipping_id = self.partner_2.id + self.assertEqual( + self.carrier_multi.available_carriers(self.partner_2, self.sale_order), + self.carrier_multi, + ) + + def test_picking_validation(self): + """Test a complete sales flow with picking.""" + self.sale_order.carrier_id = self.carrier_multi.id + self.sale_order.partner_shipping_id = self.partner_2.id + self.sale_order.action_confirm() + picking = self.sale_order.picking_ids + self.assertEqual(picking.carrier_id, self.carrier_multi) + picking.move_ids.quantity = False + picking.move_ids.quantity = 1 + picking._action_done() + self.assertAlmostEqual(picking.carrier_price, 50) + + def test_delivery_carrier_multi_form(self): + carrier_form = Form(self.env["delivery.carrier"]) + carrier_form.name = "Multi carrier" + carrier_form.destination_type = "multi" + with carrier_form.child_ids.new() as child_form: + child_form.name = "Child carrier" + child_form.product_id = self.product_child_1 + carrier = carrier_form.save() + self.assertEqual(carrier.product_id, self.product_child_1) diff --git a/delivery_multi_destination/views/delivery_carrier_view.xml b/delivery_multi_destination/views/delivery_carrier_view.xml new file mode 100644 index 0000000000..9bf481b052 --- /dev/null +++ b/delivery_multi_destination/views/delivery_carrier_view.xml @@ -0,0 +1,79 @@ + + + + + delivery.carrier + + +
+ + + +
+ + destination_type == 'multi' + + + destination_type == 'multi' + + + destination_type == 'multi' + + + free_over + not free_over or destination_type == 'multi' + + + destination_type == 'multi' + + + destination_type == 'multi' + + + + + + +
+
+ + delivery.carrier + + + + destination_type != 'one' + + + + + + + + + + + [('parent_id', '=', False)] + {'show_children_carriers': True} + +