Skip to content

Commit

Permalink
Merge PR #988 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 22, 2025
2 parents 7ff54bf + 8742187 commit 5c47f1a
Show file tree
Hide file tree
Showing 28 changed files with 2,332 additions and 0 deletions.
118 changes: 118 additions & 0 deletions delivery_multi_destination/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
==================================================
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/17.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-17-0/delivery-carrier-17-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=17.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 <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:%2017.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
- Víctor Martínez

- \`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/17.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": "17.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": ["stock_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 ""
Loading

0 comments on commit 5c47f1a

Please sign in to comment.