diff --git a/delivery_gls_nl/__init__.py b/delivery_gls_nl/__init__.py index 0650744f..09434554 100644 --- a/delivery_gls_nl/__init__.py +++ b/delivery_gls_nl/__init__.py @@ -1 +1,3 @@ +# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details. + from . import models diff --git a/delivery_gls_nl/__manifest__.py b/delivery_gls_nl/__manifest__.py index 1b27d305..a917e826 100644 --- a/delivery_gls_nl/__manifest__.py +++ b/delivery_gls_nl/__manifest__.py @@ -1,10 +1,12 @@ +# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details. + { 'name': 'GLS Netherlands Shipping', 'summary': 'Create and print your shipping labels with GLS from the Netherlands.', - 'version': '12.0.1.0.0', + 'version': '15.0.1.0.0', 'author': "Hibou Corp.", 'category': 'Warehouse', - 'license': 'AGPL-3', + 'license': 'LGPL-3', 'images': [], 'website': "https://hibou.io", 'description': """ diff --git a/delivery_gls_nl/models/__init__.py b/delivery_gls_nl/models/__init__.py index d16621df..3da2e91f 100644 --- a/delivery_gls_nl/models/__init__.py +++ b/delivery_gls_nl/models/__init__.py @@ -1 +1,3 @@ +# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details. + from . import delivery_gls_nl diff --git a/delivery_gls_nl/models/delivery_gls_nl.py b/delivery_gls_nl/models/delivery_gls_nl.py index c0694d70..659a2873 100644 --- a/delivery_gls_nl/models/delivery_gls_nl.py +++ b/delivery_gls_nl/models/delivery_gls_nl.py @@ -1,3 +1,5 @@ +# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details. + from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError from .gls_nl_request import GLSNLRequest @@ -6,8 +8,8 @@ from base64 import decodebytes from csv import reader as csv_reader -class ProductPackaging(models.Model): - _inherit = 'product.packaging' +class PackageType(models.Model): + _inherit = 'stock.package.type' package_carrier_type = fields.Selection(selection_add=[('gls_nl', 'GLS Netherlands')]) @@ -16,10 +18,11 @@ class ProviderGLSNL(models.Model): _inherit = 'delivery.carrier' GLS_NL_SOFTWARE_NAME = 'Odoo' - GLS_NL_SOFTWARE_VER = '12.0' + GLS_NL_SOFTWARE_VER = '15.0' GLS_NL_COUNTRY_NOT_FOUND = 'GLS_NL_COUNTRY_NOT_FOUND' - delivery_type = fields.Selection(selection_add=[('gls_nl', 'GLS Netherlands')]) + delivery_type = fields.Selection(selection_add=[('gls_nl', 'GLS Netherlands')], + ondelete={'gls_nl': lambda recs: recs.write({'delivery_type': 'fixed', 'fixed_price': 0})}) gls_nl_username = fields.Char(string='GLS NL Username', groups='base.group_system') gls_nl_password = fields.Char(string='GLS NL Password', groups='base.group_system') diff --git a/delivery_gls_nl/models/gls_nl_request.py b/delivery_gls_nl/models/gls_nl_request.py index 9011ed69..1c92d562 100644 --- a/delivery_gls_nl/models/gls_nl_request.py +++ b/delivery_gls_nl/models/gls_nl_request.py @@ -1,3 +1,5 @@ +# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details. + import requests from json import dumps