Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] delivery_multi_destination: Migration to version 16.0 #766

Merged
merged 23 commits into from
Apr 1, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5527442
[ADD] delivery_multi_destination
pedrobaeza Dec 10, 2016
d4435dc
[10.0][ADD] delivery_multi_destination
luismontalba Sep 26, 2017
bf114e4
[FIX+IMP] delivery_multi_destination: Don't show children + demo (#148)
pedrobaeza Dec 23, 2017
c1fbe16
[MIG] delivery_multi_destination: Migration to 11.0
pedrobaeza Jan 18, 2019
511b5ba
[MIG] delivery_multi_destination: Migration to 12.0
luismontalba May 18, 2019
18f6ed1
[FIX] delivery_multi_destination: Fix singleton error
pedrobaeza Aug 19, 2019
f89f07a
[IMP] delivery_multi_destination: Improve view for hiding undesired e…
pedrobaeza Feb 20, 2020
d8ec3a4
[FIX] delivery_multi_destination: available carriers must return the …
pedrobaeza Feb 20, 2020
8ca3725
[FIX] delivery_multi_destination: Make delivery shipping properly wit…
pedrobaeza Feb 21, 2020
c3e2e00
[IMP] delivery_multi_destination: black, isort, prettier
CarlosRoca13 Jan 26, 2021
c8135ba
[MIG] delivery_multi_destination: Migration to v13.0
CarlosRoca13 Jan 26, 2021
378c929
[IMP] delivery_multi_destination: black, isort, prettier
jado95 Jun 4, 2021
7130374
[MIG] delivery_multi_destination: Migration to 14.0
jado95 Jun 4, 2021
f2329b1
[FIX] delivery_multi_destination: consider no carrier scenario
hailangvn Jan 19, 2022
2f56f04
[FIX] delivery_multi_destination: ondelete=cascade + hide field in multi
pedrobaeza Apr 12, 2022
df3737f
[MIG] delivery_multi_destination: Migration to 15.0
victoralmau Nov 3, 2022
67bc983
[FIX] delivery_multi_destination: Avoid error in creation of a multip…
victoralmau May 2, 2023
4e58f46
Revert "[FIX] delivery_multi_destination: consider no carrier scenario"
pedrobaeza May 30, 2023
f004d90
[FIX] delivery_multi_destination: consider no carrier scenario
pedrobaeza May 29, 2023
1e42e12
[FIX] delivery_multi_destination: Get properly subcarrier price on ba…
pedrobaeza May 10, 2023
b2dcabb
[FIX] delivery_multi_destination: Filter subdestination carriers from…
pedrobaeza May 27, 2023
ab04037
[MIG] delivery_multi_destination: Migration to 16.0
GabbasovDinar Apr 17, 2023
4539c4c
[16.0][MIG] delivery_multi_destination: Continue Migration
carolinafernandez-tecnativa Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions delivery_multi_destination/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
==================================================
Multiple destinations for the same delivery method
==================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2cb9cc1f227af0d903b43f5511bdd469acf455504f9aa767342cff2c1dd7fdf5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/16.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-16-0/delivery-carrier-16-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=16.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:

#. Go to Inventory > Configuration > Delivery > Shipping Methods
#. Create or edit an existing record.
#. Select "Destination type" = "Multiple destinations".
#. Introduce a line for each destination in the new tab "Destinations"
#. Lines have priority, so you have to put first the lines with more restricted
destinations.

Usage
=====

#. 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 <https://github.com/OCA/delivery-carrier/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 <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**>`_.

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

Credits
=======

Authors
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>__`:

* Pedro M. Baeza
* Luis M. Ontalba
* Carlos Roca
* Carolina Fernandez

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

* 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 <https://github.com/OCA/delivery-carrier/tree/16.0/delivery_multi_destination>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions delivery_multi_destination/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
18 changes: 18 additions & 0 deletions delivery_multi_destination/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2016-2019 Tecnativa - Pedro M. Baeza
# Copyright 2017 Tecnativa - Luis M. Ontalba
# Copyright 2021 Gianmarco Conte <gconte@dinamicheaziendali.it>
# 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": "16.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"],
"demo": ["demo/delivery_carrier_demo.xml"],
"data": ["views/delivery_carrier_view.xml"],
}
72 changes: 72 additions & 0 deletions delivery_multi_destination/demo/delivery_carrier_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="product_product_delivery_carrier_multi" model="product.product">
<field name="name">International Carrier Inc.</field>
<field name="detailed_type">service</field>
</record>
<record id="delivery_carrier_multi" model="delivery.carrier">
<field name="name">International Carrier Inc.</field>
<field name="sequence">4</field>
<field name="destination_type">multi</field>
<field name="product_id" ref="product_product_delivery_carrier_multi" />
</record>
<record id="product_product_delivery_carrier_multi_child_1" model="product.product">
<field name="name">International Carrier Inc., Belgium</field>
<field name="detailed_type">service</field>
</record>
<record id="delivery_carrier_multi_child_1" model="delivery.carrier">
<field name="name">Belgium</field>
<field name="parent_id" ref="delivery_carrier_multi" />
<field name="fixed_price">20</field>
<field name="sequence">1</field>
<field name="delivery_type">base_on_rule</field>
<field name="country_ids" eval="[(4, ref('base.be'))]" />
<field name="product_id" ref="product_product_delivery_carrier_multi_child_1" />
</record>
<record id="delivery_price_rule1" model="delivery.price.rule">
<field name="carrier_id" ref="delivery_carrier_multi_child_1" />
<field name="max_value" eval="5" />
<field name="list_base_price" eval="20" />
</record>
<!-- delivery charge of product if weight more than 5kg-->
<record id="delivery_price_rule2" model="delivery.price.rule">
<field name="carrier_id" ref="delivery_carrier_multi_child_1" />
<field name="operator">&gt;=</field>
<field name="max_value" eval="5" />
<field name="list_base_price" eval="50" />
</record>
<!-- free delivery charge if price more than 300-->
<record id="delivery_price_rule3" model="delivery.price.rule">
<field name="carrier_id" ref="delivery_carrier_multi_child_1" />
<field name="operator">&gt;=</field>
<field name="variable">price</field>
<field name="max_value" eval="300" />
<field name="list_base_price" eval="0" />
</record>
<record id="product_product_delivery_carrier_multi_child_2" model="product.product">
<field name="name">International Carrier Inc., France</field>
<field name="detailed_type">service</field>
</record>
<record id="delivery_carrier_multi_child_2" model="delivery.carrier">
<field name="name">France</field>
<field name="parent_id" ref="delivery_carrier_multi" />
<field name="fixed_price">40</field>
<field name="sequence">2</field>
<field name="delivery_type">fixed</field>
<field name="country_ids" eval="[(4, ref('base.fr'))]" />
<field name="product_id" ref="product_product_delivery_carrier_multi_child_2" />
</record>
<record id="product_product_delivery_carrier_multi_child_3" model="product.product">
<field name="name">International Carrier Inc., United Kingdom</field>
<field name="detailed_type">service</field>
</record>
<record id="delivery_carrier_multi_child_3" model="delivery.carrier">
<field name="name">United Kingdom</field>
<field name="parent_id" ref="delivery_carrier_multi" />
<field name="fixed_price">60</field>
<field name="sequence">2</field>
<field name="delivery_type">fixed</field>
<field name="country_ids" eval="[(4, ref('base.uk'))]" />
<field name="product_id" ref="product_product_delivery_carrier_multi_child_3" />
</record>
</odoo>
117 changes: 117 additions & 0 deletions delivery_multi_destination/i18n/cs_CZ.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# Lukáš Spurný <lukasspurny8@gmail.com>, 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ý <lukasspurny8@gmail.com>, 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 ""
119 changes: 119 additions & 0 deletions delivery_multi_destination/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <maria.sparenberg@gmx.net>\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"
107 changes: 107 additions & 0 deletions delivery_multi_destination/i18n/delivery_multi_destination.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# 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.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 ""
114 changes: 114 additions & 0 deletions delivery_multi_destination/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# enjolras <yo@miguelrevilla.com>, 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 <informatica@totmaterial.es>\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"
112 changes: 112 additions & 0 deletions delivery_multi_destination/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""
112 changes: 112 additions & 0 deletions delivery_multi_destination/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 2017\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"

#. 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 ""
112 changes: 112 additions & 0 deletions delivery_multi_destination/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""
113 changes: 113 additions & 0 deletions delivery_multi_destination/i18n/nl_NL.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# Peter Hageman <hageman.p@gmail.com>, 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 <hageman.p@gmail.com>, 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 ""
123 changes: 123 additions & 0 deletions delivery_multi_destination/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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: 2022-02-01 19:33+0000\n"
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatica@protonmail.com>\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.3.2\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 ""

#. 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 ""

#~ msgid "Delivery Methods"
#~ msgstr "Métodos de entrega"

#~ msgid "Unit(s)"
#~ msgstr "Unidade(s)"

#~ msgid "kg"
#~ msgstr "kg"
117 changes: 117 additions & 0 deletions delivery_multi_destination/i18n/sl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_multi_destination
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <matjaz@matmoz.si>\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"
119 changes: 119 additions & 0 deletions delivery_multi_destination/i18n/zh_CN.po
Original file line number Diff line number Diff line change
@@ -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 "千克"
3 changes: 3 additions & 0 deletions delivery_multi_destination/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import delivery_carrier
124 changes: 124 additions & 0 deletions delivery_multi_destination/models/delivery_carrier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Copyright 2016-2020 Tecnativa - Pedro M. Baeza
# Copyright 2017 Tecnativa - Luis M. Ontalba
# Copyright 2021 Gianmarco Conte <gconte@dinamicheaziendali.it>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models
from odoo.exceptions import ValidationError


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)

def search(self, args, offset=0, limit=None, order=None, count=False):
"""Don't show by default children carriers."""
if not self.env.context.get("show_children_carriers"):
if args is None:
args = []

Check warning on line 39 in delivery_multi_destination/models/delivery_carrier.py

Codecov / codecov/patch

delivery_multi_destination/models/delivery_carrier.py#L39

Added line #L39 was not covered by tests
args += [("parent_id", "=", False)]
return super(DeliveryCarrier, self).search(
args,
offset=offset,
limit=limit,
order=order,
count=count,
)

@api.model
def name_search(self, name="", args=None, operator="ilike", limit=100):
"""Don't show by default children carriers."""
domain = [("parent_id", "=", False)]
return self.search(domain, limit=limit).name_get()

def available_carriers(self, partner):
"""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):
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: 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:

Check warning on line 107 in delivery_multi_destination/models/delivery_carrier.py

Codecov / codecov/patch

delivery_multi_destination/models/delivery_carrier.py#L107

Added line #L107 was not covered by tests
# 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(

Check warning on line 113 in delivery_multi_destination/models/delivery_carrier.py

Codecov / codecov/patch

delivery_multi_destination/models/delivery_carrier.py#L112-L113

Added lines #L112 - L113 were not covered by tests
DeliveryCarrier, subcarrier
).send_shipping(p)
break
except Exception: # pylint: disable=except-pass
pass

Check warning on line 118 in delivery_multi_destination/models/delivery_carrier.py

Codecov / codecov/patch

delivery_multi_destination/models/delivery_carrier.py#L116-L118

Added lines #L116 - L118 were not covered by tests
finally:
p.carrier_id = carrier
if not picking_res:
raise ValidationError(_("There is no matching delivery rule."))

Check warning on line 122 in delivery_multi_destination/models/delivery_carrier.py

Codecov / codecov/patch

delivery_multi_destination/models/delivery_carrier.py#L122

Added line #L122 was not covered by tests
res += picking_res
return res
8 changes: 8 additions & 0 deletions delivery_multi_destination/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
To configure delivery methods with multiple destinations:

#. Go to Inventory > Configuration > Delivery > Shipping Methods
#. Create or edit an existing record.
#. Select "Destination type" = "Multiple destinations".
#. Introduce a line for each destination in the new tab "Destinations"
#. Lines have priority, so you have to put first the lines with more restricted
destinations.
10 changes: 10 additions & 0 deletions delivery_multi_destination/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* `Tecnativa <https://www.tecnativa.com>__`:

* Pedro M. Baeza
* Luis M. Ontalba
* Carlos Roca
* Carolina Fernandez

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

* Gianmarco Conte
6 changes: 6 additions & 0 deletions delivery_multi_destination/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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.
2 changes: 2 additions & 0 deletions delivery_multi_destination/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Delivery prices for e-commerce (`website_sale_delivery` module) might need
an extra module for handling everything properly.
2 changes: 2 additions & 0 deletions delivery_multi_destination/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#. When using the delivery method in a Sales order, delivery address will be
used for computing the delivery price according introduced destinations.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
463 changes: 463 additions & 0 deletions delivery_multi_destination/static/description/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions delivery_multi_destination/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import test_delivery_multi_destination
178 changes: 178 additions & 0 deletions delivery_multi_destination/tests/test_delivery_multi_destination.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# 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"})
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"})
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", "detailed_type": "service"}
)
cls.product_child_1 = cls.env["product.product"].create(
{"name": "Test child 1", "detailed_type": "service"}
)
cls.product_child_2 = cls.env["product.product"].create(
{"name": "Test child 2", "detailed_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", "detailed_type": "product", "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.assertEqual(
self.carrier_multi.available_carriers(self.partner_2),
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_done = 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)
95 changes: 95 additions & 0 deletions delivery_multi_destination/views/delivery_carrier_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016-2020 Tecnativa - Pedro M. Baeza
Copyright 2017 Tecnativa - Luis M. Ontalba
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_delivery_carrier_form" model="ir.ui.view">
<field name="model">delivery.carrier</field>
<field name="inherit_id" ref="delivery.view_delivery_carrier_form" />
<field name="arch" type="xml">
<div name="title" position="after">
<group name="group_destination_type">
<field
name="destination_type"
invisible="context.get('show_children_fields', False)"
/>
</group>
</div>
<group name="provider_details" position="attributes">
<attribute
name="attrs"
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
</group>
<label for="margin" position="attributes">
<attribute
name="attrs"
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
</label>
<xpath expr="//field[@name='margin']/.." position="attributes">
<attribute
name="attrs"
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
</xpath>
<xpath expr="//field[@name='free_over']/.." position="attributes">
<attribute
name="attrs"
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
</xpath>
<field name="amount" position="attributes">
<attribute
name="attrs"
>{'required':[('free_over','!=', False)], 'invisible':['|', ('free_over','=', False), ('destination_type', '=', 'multi')]}</attribute>
</field>
<page name="pricing" position="attributes">
<attribute
name="attrs"
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
</page>
<page name="destination" position="attributes">
<attribute
name="attrs"
>{'invisible': [('destination_type', '=', 'multi')]}</attribute>
</page>
<notebook position="inside">
<page
string="Destinations"
name="page_multi_destination"
attrs="{'invisible': [('destination_type', '!=', 'multi')]}"
>
<field name="child_ids" context="{'show_children_fields': True}" />
</page>
</notebook>
</field>
</record>
<record id="view_delivery_carrier_tree" model="ir.ui.view">
<field name="model">delivery.carrier</field>
<field name="inherit_id" ref="delivery.view_delivery_carrier_tree" />
<field name="arch" type="xml">
<field name="delivery_type" position="attributes">
<attribute
name="attrs"
>{'invisible': [('destination_type', '!=', 'one')]}</attribute>
</field>
<field name="delivery_type" position="after">
<field name="destination_type" />
<field
name="country_ids"
invisible="not context.get('show_children_fields', False)"
/>
<field
name="state_ids"
invisible="not context.get('show_children_fields', False)"
/>
<field
name="zip_prefix_ids"
widget="many2many_tags"
invisible="not context.get('show_children_fields', False)"
/>
</field>
</field>
</record>
<record id="delivery.action_delivery_carrier_form" model="ir.actions.act_window">
<field name="domain">[('parent_id', '=', False)]</field>
<field name="context">{'show_children_carriers': True}</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/delivery_multi_destination/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)