Skip to content

Commit

Permalink
[MIG] delivery_multi_destination: Migration to 11.0
Browse files Browse the repository at this point in the history
* Standard procedure
* README by fragments
* Code changed to follow v11 logic
* Tests adapted and expanded
  • Loading branch information
pedrobaeza authored and jado95 committed Jun 4, 2021
1 parent 83fcffd commit 7274cef
Show file tree
Hide file tree
Showing 24 changed files with 863 additions and 177 deletions.
76 changes: 54 additions & 22 deletions delivery_multi_destination/README.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

==================================================
Multiple destinations for the same delivery method
==================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/11.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-11-0/delivery-carrier-11-0-delivery_multi_destination
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/99/11.0
:alt: Try me on Runbot

|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
=============

Expand All @@ -31,43 +55,51 @@ Usage
#. When using the delivery method in a Sales order, delivery address will be
used for computing the delivery price according introduced destinations.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/99/10.0
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 smashing it by providing a detailed and welcomed feedback.
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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_multi_destination%0Aversion:%2011.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
=======

Images
------
Authors
~~~~~~~

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
* Tecnativa

Contributors
------------
~~~~~~~~~~~~

* Pedro M. Baeza <[email protected]>
* Luis M. Ontalba <[email protected]>
* `Tecnativa <https://www.tecnativa.com>__`:

Maintainer
----------
* Pedro M. Baeza <[email protected]>
* Luis M. Ontalba <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/11.0/delivery_multi_destination>`_ project on GitHub.

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

from . import models
5 changes: 2 additions & 3 deletions delivery_multi_destination/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Pedro M. Baeza <[email protected]>
# Copyright 2016-2019 Tecnativa - Pedro M. Baeza
# Copyright 2017 Luis M. Ontalba <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Multiple destinations for the same delivery method",
"version": "10.0.1.1.0",
"version": "11.0.1.0.0",
"category": "Delivery",
"website": "https://github.com/OCA/delivery-carrier",
"author": "Tecnativa, "
Expand Down
35 changes: 24 additions & 11 deletions delivery_multi_destination/demo/delivery_carrier_demo.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<?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="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="product_type">service</field>
<field name="product_sale_ok" eval="False"/>
<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="type">service</field>
</record>

<record id="delivery_carrier_multi_child_1" model="delivery.carrier">
Expand All @@ -15,16 +24,14 @@
<field name="fixed_price">20</field>
<field name="sequence">1</field>
<field name="delivery_type">base_on_rule</field>
<field name="product_type">service</field>
<field name="product_sale_ok" eval="False"/>
<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"/>
<field name="standard_price" eval="10"/>
</record>

<!-- delivery charge of product if weight more than 5kg-->
Expand All @@ -33,7 +40,6 @@
<field name="operator">&gt;=</field>
<field name="max_value" eval="5"/>
<field name="list_base_price" eval="50"/>
<field name="standard_price" eval="30"/>
</record>

<!-- free delivery charge if price more than 300-->
Expand All @@ -43,7 +49,11 @@
<field name="variable">price</field>
<field name="max_value" eval="300"/>
<field name="list_base_price" eval="0"/>
<field name="standard_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="type">service</field>
</record>

<record id="delivery_carrier_multi_child_2" model="delivery.carrier">
Expand All @@ -52,9 +62,13 @@
<field name="fixed_price">40</field>
<field name="sequence">2</field>
<field name="delivery_type">fixed</field>
<field name="product_type">service</field>
<field name="product_sale_ok" eval="False"/>
<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="type">service</field>
</record>

<record id="delivery_carrier_multi_child_3" model="delivery.carrier">
Expand All @@ -63,9 +77,8 @@
<field name="fixed_price">60</field>
<field name="sequence">2</field>
<field name="delivery_type">fixed</field>
<field name="product_type">service</field>
<field name="product_sale_ok" eval="False"/>
<field name="country_ids" eval="[(4, ref('base.uk'))]"/>
<field name="product_id" ref="product_product_delivery_carrier_multi_child_3"/>
</record>

</odoo>
42 changes: 29 additions & 13 deletions delivery_multi_destination/i18n/cs_CZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ msgstr ""

#. module: delivery_multi_destination
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1
#: model:product.product,name:delivery_multi_destination.delivery_carrier_multi_child_1_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_child_1_product_template
msgid "Belgium"
msgstr "Belgie"

Expand All @@ -31,35 +29,55 @@ msgstr "Belgie"
msgid "Carrier"
msgstr "Dopravce"

#. 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:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier_destination_type
msgid "Destination type"
msgstr "Typ cíle"

#. module: delivery_multi_destination
#: model: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
#: model:product.product,name:delivery_multi_destination.delivery_carrier_multi_child_2_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_child_2_product_template
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.delivery_carrier_multi_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_product_template
#: 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
#: selection:delivery.carrier,destination_type:0
msgid "Multiple destinations"
Expand All @@ -77,7 +95,5 @@ msgstr "Nadřazený dopravce"

#. module: delivery_multi_destination
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3
#: model:product.product,name:delivery_multi_destination.delivery_carrier_multi_child_3_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_child_3_product_template
msgid "United Kingdom"
msgstr "Spojené království"
36 changes: 24 additions & 12 deletions delivery_multi_destination/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ msgstr ""

#. module: delivery_multi_destination
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_1
#: model:product.product,name:delivery_multi_destination.delivery_carrier_multi_child_1_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_child_1_product_template
msgid "Belgium"
msgstr ""

Expand All @@ -31,13 +29,13 @@ msgid "Carrier"
msgstr "Spediteur"

#. module: delivery_multi_destination
#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier_child_ids
msgid "Destination grid"
#: 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_destination_type
msgid "Destination type"
#: model:ir.model.fields,field_description:delivery_multi_destination.field_delivery_carrier_child_ids
msgid "Destination grid"
msgstr ""

#. module: delivery_multi_destination
Expand All @@ -47,18 +45,34 @@ msgstr ""

#. module: delivery_multi_destination
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_2
#: model:product.product,name:delivery_multi_destination.delivery_carrier_multi_child_2_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_child_2_product_template
msgid "France"
msgstr ""

#. module: delivery_multi_destination
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi
#: model:product.product,name:delivery_multi_destination.delivery_carrier_multi_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_product_template
#: 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
#: selection:delivery.carrier,destination_type:0
msgid "Multiple destinations"
Expand All @@ -76,7 +90,5 @@ msgstr ""

#. module: delivery_multi_destination
#: model:delivery.carrier,name:delivery_multi_destination.delivery_carrier_multi_child_3
#: model:product.product,name:delivery_multi_destination.delivery_carrier_multi_child_3_product_product
#: model:product.template,name:delivery_multi_destination.delivery_carrier_multi_child_3_product_template
msgid "United Kingdom"
msgstr ""
Loading

0 comments on commit 7274cef

Please sign in to comment.