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

[15.0] [MIG] delivery_carrier_city: Migration to 15.0 #883

Open
wants to merge 6 commits into
base: 15.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
87 changes: 87 additions & 0 deletions delivery_carrier_city/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
=====================
Delivery Carrier City
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8401e76feccaa3a2b703e44076a605638c786a92a3ce0c2a65f9cd7f445687a8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/15.0/delivery_carrier_city
: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-15-0/delivery-carrier-15-0-delivery_carrier_city
: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=15.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Integrates delivery carrier with base_address_city, to allow to
use cities in the delivery methods' destination conditions.

**Table of contents**

.. contents::
:local:

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_carrier_city%0Aversion:%2015.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
~~~~~~~

* Camptocamp

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

* `Camptocamp <https://www.camptocamp.com>`_

* Iván Todorovich <ivan.todorovich@gmail.com>

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.

.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px
:target: https://github.com/ivantodorovich
:alt: ivantodorovich

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ivantodorovich|

This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/15.0/delivery_carrier_city>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions delivery_carrier_city/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions delivery_carrier_city/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 Camptocamp SA - Iván Todorovich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Delivery Carrier City",
"summary": "Integrates delivery with base_address_city",
"version": "15.0.1.0.0",
"category": "Delivery",
"website": "https://github.com/OCA/delivery-carrier",
"author": "Camptocamp, Odoo Community Association (OCA)",
"maintainers": ["ivantodorovich"],
"license": "AGPL-3",
"depends": [
"delivery",
"base_address_city",
],
"data": [
"views/delivery_carrier.xml",
],
}
39 changes: 39 additions & 0 deletions delivery_carrier_city/i18n/delivery_carrier_city.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_carrier_city
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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_carrier_city
#: model:ir.model.fields,field_description:delivery_carrier_city.field_delivery_carrier__city_ids
msgid "Cities"
msgstr ""

#. module: delivery_carrier_city
#: model:ir.model.fields,field_description:delivery_carrier_city.field_delivery_carrier__display_name
msgid "Display Name"
msgstr ""

#. module: delivery_carrier_city
#: model:ir.model.fields,field_description:delivery_carrier_city.field_delivery_carrier__id
msgid "ID"
msgstr ""

#. module: delivery_carrier_city
#: model:ir.model.fields,field_description:delivery_carrier_city.field_delivery_carrier____last_update
msgid "Last Modified on"
msgstr ""

#. module: delivery_carrier_city
#: model:ir.model,name:delivery_carrier_city.model_delivery_carrier
msgid "Shipping Methods"
msgstr ""
1 change: 1 addition & 0 deletions delivery_carrier_city/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import delivery_carrier
22 changes: 22 additions & 0 deletions delivery_carrier_city/models/delivery_carrier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 Camptocamp SA - Iván Todorovich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class DeliveryCarrier(models.Model):
_inherit = "delivery.carrier"

city_ids = fields.Many2many(
comodel_name="res.city",
relation="delivery_carrier_city_rel",
column1="carrier_id",
column2="city_id",
string="Cities",
)

def _match_address(self, partner):
# Override to account for city_ids
if self.city_ids and partner.city_id not in self.city_ids:
return False
return super()._match_address(partner)
3 changes: 3 additions & 0 deletions delivery_carrier_city/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Camptocamp <https://www.camptocamp.com>`_

* Iván Todorovich <ivan.todorovich@gmail.com>
2 changes: 2 additions & 0 deletions delivery_carrier_city/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Integrates delivery carrier with base_address_city, to allow to
use cities in the delivery methods' destination conditions.
Binary file added delivery_carrier_city/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading