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

[18.0][MIG] delivery_carrier_max_weight_constraint: Migration to 18.0 #970

Open
wants to merge 11 commits into
base: 18.0
Choose a base branch
from
94 changes: 94 additions & 0 deletions delivery_carrier_max_weight_constraint/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
================================
Constrain package maximum weight
================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_max_weight_constraint
:alt: OCA/delivery-carrier
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_carrier_max_weight_constraint
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=18.0
:alt: Try me on Runboat

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

This module ensures the wizard of package type selection cannot create a
package with a weight greater than the maximum configured on its
packaging type if the constraint is enabled and maximum weight set.

**Table of contents**

.. contents::
:local:

Usage
=====

The constraint can be enabled at multiple levels:

- Company: *Settings* - *Inventory* - *Shipping*
- Carrier with company level as default
- Package type with carrier level as default

If the constraint is disabled at the package type level Odoo behaves the
usual way.

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_max_weight_constraint%0Aversion:%2018.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
-------

* ACSONE SA/NV

Contributors
------------

- Nans Lefebvre <[email protected]>
- Hughes Damry <[email protected]>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

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/18.0/delivery_carrier_max_weight_constraint>`_ project on GitHub.

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

from . import models
from . import wizards
18 changes: 18 additions & 0 deletions delivery_carrier_max_weight_constraint/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2021 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Constrain package maximum weight",
"version": "18.0.1.0.0",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"category": "Delivery",
"depends": ["stock_delivery"],
"website": "https://github.com/OCA/delivery-carrier",
"data": [
"views/res_config_settings_views.xml",
"views/delivery_carrier_views.xml",
"views/stock_package_type_views.xml",
],
"license": "AGPL-3",
"installable": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_carrier_max_weight_constraint
#
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_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_res_company
msgid "Companies"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model_terms:ir.ui.view,arch_db:delivery_carrier_max_weight_constraint.res_config_settings_view_form
msgid "Constrain the maximum weight of packages to be respected"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_choose_delivery_package
msgid "Delivery Package Selection Wizard"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_stock_package_type__is_strict_weight
msgid "Overweight forbidden"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_delivery_carrier__is_strict_weight_package
msgid "Overweight package forbidden"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_res_company__delivery_carrier_strict_weight_package
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_res_config_settings__delivery_carrier_strict_weight_package
msgid "Overweight packages forbidden"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_delivery_carrier
msgid "Shipping Methods"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_stock_package_type
msgid "Stock package type"
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,help:delivery_carrier_max_weight_constraint.field_delivery_carrier__is_strict_weight_package
msgid "The maximum weight of packages can't be exceeded."
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,help:delivery_carrier_max_weight_constraint.field_stock_package_type__is_strict_weight
msgid "The maximum weight of the package can't be exceeded."
msgstr ""

#. module: delivery_carrier_max_weight_constraint
#. odoo-python
#: code:addons/delivery_carrier_max_weight_constraint/wizards/choose_delivery_package.py:0
#, python-format
msgid ""
"The weight of your package is higher than the maximum weight authorized for "
"this package type. Please choose another package type."
msgstr ""
84 changes: 84 additions & 0 deletions delivery_carrier_max_weight_constraint/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_carrier_max_weight_constraint
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-08-03 15:09+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\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_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_res_company
msgid "Companies"
msgstr "Compañías"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes de Configuración"

#. module: delivery_carrier_max_weight_constraint
#: model_terms:ir.ui.view,arch_db:delivery_carrier_max_weight_constraint.res_config_settings_view_form
msgid "Constrain the maximum weight of packages to be respected"
msgstr "Limitar el peso máximo a respetar de los paquetes"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_choose_delivery_package
msgid "Delivery Package Selection Wizard"
msgstr "Asistente de selección de paquetes de entrega"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_stock_package_type__is_strict_weight
msgid "Overweight forbidden"
msgstr "Prohibido el sobrepeso"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_delivery_carrier__is_strict_weight_package
msgid "Overweight package forbidden"
msgstr "Paquete con sobrepeso prohibido"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_res_company__delivery_carrier_strict_weight_package
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_res_config_settings__delivery_carrier_strict_weight_package
msgid "Overweight packages forbidden"
msgstr "Paquetes con sobrepeso prohibido"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_delivery_carrier
msgid "Shipping Methods"
msgstr "Métodos de envío"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_stock_package_type
msgid "Stock package type"
msgstr "Tipo de empaquetado de existencias"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,help:delivery_carrier_max_weight_constraint.field_delivery_carrier__is_strict_weight_package
msgid "The maximum weight of packages can't be exceeded."
msgstr "No se puede exceder el peso máximo de los paquetes."

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,help:delivery_carrier_max_weight_constraint.field_stock_package_type__is_strict_weight
msgid "The maximum weight of the package can't be exceeded."
msgstr "No se puede exceder el peso máximo del paquete."

#. module: delivery_carrier_max_weight_constraint
#. odoo-python
#: code:addons/delivery_carrier_max_weight_constraint/wizards/choose_delivery_package.py:0
#, python-format
msgid ""
"The weight of your package is higher than the maximum weight authorized for "
"this package type. Please choose another package type."
msgstr ""
"El peso de su paquete es superior al peso máximo autorizado para este tipo "
"de paquete. Por favor, elija otro tipo de paquete."
84 changes: 84 additions & 0 deletions delivery_carrier_max_weight_constraint/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_carrier_max_weight_constraint
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-08-21 16:06+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_res_company
msgid "Companies"
msgstr "Aziende"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"

#. module: delivery_carrier_max_weight_constraint
#: model_terms:ir.ui.view,arch_db:delivery_carrier_max_weight_constraint.res_config_settings_view_form
msgid "Constrain the maximum weight of packages to be respected"
msgstr "Limitare il peso massimo dei pacchi da rispettare"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_choose_delivery_package
msgid "Delivery Package Selection Wizard"
msgstr "Procedura guidata selezione collo consegna"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_stock_package_type__is_strict_weight
msgid "Overweight forbidden"
msgstr "Vietato il sovrappeso"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_delivery_carrier__is_strict_weight_package
msgid "Overweight package forbidden"
msgstr "Vietato il sovrappeso del collo"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_res_company__delivery_carrier_strict_weight_package
#: model:ir.model.fields,field_description:delivery_carrier_max_weight_constraint.field_res_config_settings__delivery_carrier_strict_weight_package
msgid "Overweight packages forbidden"
msgstr "Vietato il sovrappeso dei colli"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_delivery_carrier
msgid "Shipping Methods"
msgstr "Metodi di spedizione"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model,name:delivery_carrier_max_weight_constraint.model_stock_package_type
msgid "Stock package type"
msgstr "Tipo collo magazzino"

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,help:delivery_carrier_max_weight_constraint.field_delivery_carrier__is_strict_weight_package
msgid "The maximum weight of packages can't be exceeded."
msgstr "Il peso massimo dei colli non può essere superato."

#. module: delivery_carrier_max_weight_constraint
#: model:ir.model.fields,help:delivery_carrier_max_weight_constraint.field_stock_package_type__is_strict_weight
msgid "The maximum weight of the package can't be exceeded."
msgstr "Il peso massimo del collo non può essere superato."

#. module: delivery_carrier_max_weight_constraint
#. odoo-python
#: code:addons/delivery_carrier_max_weight_constraint/wizards/choose_delivery_package.py:0
#, python-format
msgid ""
"The weight of your package is higher than the maximum weight authorized for "
"this package type. Please choose another package type."
msgstr ""
"Il peso del collo è superiore al massimo peso autorizzato per questo tipo di "
"collo. Scegliere un altro tipo di collo."
7 changes: 7 additions & 0 deletions delivery_carrier_max_weight_constraint/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2022 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import delivery_carrier
from . import res_company
from . import res_config_settings
from . import stock_package_type
Loading