From 8067d7c9048843466efeafa4d0a82ba25f386874 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Fri, 13 Apr 2018 09:52:13 -0700 Subject: [PATCH 001/159] Add `delivery_partner`, `delivery_partner_dhl`, `delivery_partner_fedex`, `delivery_partner_ups` --- delivery_partner_fedex/__init__.py | 1 + delivery_partner_fedex/__manifest__.py | 18 ++++++++++++++++++ delivery_partner_fedex/models/__init__.py | 1 + delivery_partner_fedex/models/delivery.py | 17 +++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 delivery_partner_fedex/__init__.py create mode 100755 delivery_partner_fedex/__manifest__.py create mode 100644 delivery_partner_fedex/models/__init__.py create mode 100644 delivery_partner_fedex/models/delivery.py diff --git a/delivery_partner_fedex/__init__.py b/delivery_partner_fedex/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/delivery_partner_fedex/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/delivery_partner_fedex/__manifest__.py b/delivery_partner_fedex/__manifest__.py new file mode 100755 index 00000000..5f18d279 --- /dev/null +++ b/delivery_partner_fedex/__manifest__.py @@ -0,0 +1,18 @@ +{ + 'name': 'Fedex Partner Shipping Accounts', + 'author': 'Hibou Corp. ', + 'version': '11.0.1.0.0', + 'category': 'Stock', + 'sequence': 95, + 'summary': 'Fedex Partner Shipping Accounts', + 'description': """ + """, + 'website': 'https://hibou.io/', + 'depends': [ + 'delivery_partner', + ], + 'data': [ + ], + 'installable': True, + 'application': False, +} diff --git a/delivery_partner_fedex/models/__init__.py b/delivery_partner_fedex/models/__init__.py new file mode 100644 index 00000000..be8cabd6 --- /dev/null +++ b/delivery_partner_fedex/models/__init__.py @@ -0,0 +1 @@ +from . import delivery diff --git a/delivery_partner_fedex/models/delivery.py b/delivery_partner_fedex/models/delivery.py new file mode 100644 index 00000000..b9c264be --- /dev/null +++ b/delivery_partner_fedex/models/delivery.py @@ -0,0 +1,17 @@ +import re + +from odoo import fields, models +from odoo.exceptions import ValidationError + + +class PartnerShippingAccount(models.Model): + _inherit = 'partner.shipping.account' + + delivery_type = fields.Selection(selection_add=[('fedex', 'FedEx')]) + + def fedex_check_validity(self): + m = re.search('^\d{9}$', self.name or '') + if not m: + raise ValidationError('FedEx Account numbers must be 9 decimal numbers.') + + From 087bbc31f71972338ddf57501704b790e4b17ba6 Mon Sep 17 00:00:00 2001 From: Kristen Marie Kulha Date: Fri, 8 Jun 2018 10:54:50 -0700 Subject: [PATCH 002/159] Add README. --- delivery_partner_fedex/README.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 delivery_partner_fedex/README.rst diff --git a/delivery_partner_fedex/README.rst b/delivery_partner_fedex/README.rst new file mode 100644 index 00000000..60ba104c --- /dev/null +++ b/delivery_partner_fedex/README.rst @@ -0,0 +1,23 @@ +*************************************** +Hibou - FedEx Partner Shipping Accounts +*************************************** + +Adds FedEx shipping accounts. + +For more information and add-ons, visit `Hibou.io `_. + + +============= +Main Features +============= + +* Adds FedEx to the delivery type selection field. +* Validates entered FedEx account numbers are the correct length. + +======= +License +======= + +Please see `LICENSE `_. + +Copyright Hibou Corp. 2018 From e074559e6762c646ba3df5008eca5be00e47b716 Mon Sep 17 00:00:00 2001 From: Kristen Marie Kulha Date: Fri, 8 Jun 2018 12:24:07 -0700 Subject: [PATCH 003/159] Add screenshot --- delivery_partner_fedex/README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/delivery_partner_fedex/README.rst b/delivery_partner_fedex/README.rst index 60ba104c..17dfbcfd 100644 --- a/delivery_partner_fedex/README.rst +++ b/delivery_partner_fedex/README.rst @@ -14,6 +14,11 @@ Main Features * Adds FedEx to the delivery type selection field. * Validates entered FedEx account numbers are the correct length. +.. image:: https://user-images.githubusercontent.com/15882954/41176817-b7353356-6b16-11e8-8545-3e59b7b350ae.png + :alt: 'Register Payment Detail' + :width: 988 + :align: left + ======= License ======= From 88dd208a4915022455c0382cce9e34ee805cf141 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 2 Apr 2019 10:37:25 -0700 Subject: [PATCH 004/159] MIG `delivery_partner_fedex` to 12.0 --- delivery_partner_fedex/__manifest__.py | 2 +- delivery_partner_fedex/models/delivery.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/delivery_partner_fedex/__manifest__.py b/delivery_partner_fedex/__manifest__.py index 5f18d279..e149d0a4 100755 --- a/delivery_partner_fedex/__manifest__.py +++ b/delivery_partner_fedex/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Fedex Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Stock', 'sequence': 95, 'summary': 'Fedex Partner Shipping Accounts', diff --git a/delivery_partner_fedex/models/delivery.py b/delivery_partner_fedex/models/delivery.py index b9c264be..f6da8910 100644 --- a/delivery_partner_fedex/models/delivery.py +++ b/delivery_partner_fedex/models/delivery.py @@ -10,7 +10,7 @@ class PartnerShippingAccount(models.Model): delivery_type = fields.Selection(selection_add=[('fedex', 'FedEx')]) def fedex_check_validity(self): - m = re.search('^\d{9}$', self.name or '') + m = re.search(r'^\d{9}$', self.name or '') if not m: raise ValidationError('FedEx Account numbers must be 9 decimal numbers.') From 74702a95b4744ab08f57f167e84b9ac437344965 Mon Sep 17 00:00:00 2001 From: Leighton Pennicott Date: Fri, 6 Nov 2020 17:54:29 -0500 Subject: [PATCH 005/159] [MIG] delivery_partner_fedex: migrate module to Odoo 13.0 Added tests --- delivery_partner_fedex/__manifest__.py | 2 +- delivery_partner_fedex/tests/__init__.py | 1 + .../tests/test_fedex_account.py | 38 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 delivery_partner_fedex/tests/__init__.py create mode 100644 delivery_partner_fedex/tests/test_fedex_account.py diff --git a/delivery_partner_fedex/__manifest__.py b/delivery_partner_fedex/__manifest__.py index e149d0a4..b2150cba 100755 --- a/delivery_partner_fedex/__manifest__.py +++ b/delivery_partner_fedex/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Fedex Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'category': 'Stock', 'sequence': 95, 'summary': 'Fedex Partner Shipping Accounts', diff --git a/delivery_partner_fedex/tests/__init__.py b/delivery_partner_fedex/tests/__init__.py new file mode 100644 index 00000000..7e86b3ce --- /dev/null +++ b/delivery_partner_fedex/tests/__init__.py @@ -0,0 +1 @@ +from . import test_fedex_account diff --git a/delivery_partner_fedex/tests/test_fedex_account.py b/delivery_partner_fedex/tests/test_fedex_account.py new file mode 100644 index 00000000..777c0747 --- /dev/null +++ b/delivery_partner_fedex/tests/test_fedex_account.py @@ -0,0 +1,38 @@ +from odoo.tests.common import TransactionCase +from odoo.exceptions import ValidationError + + +class TestAccount(TransactionCase): + + def setUp(self): + super(TestAccount, self).setUp() + self.PartnerShippingAccount = self.env['partner.shipping.account'] + self.partner = self.env.ref('base.res_partner_12') + + def test_fedex_account_information(self): + # Create object and confirm that validation error raises if fedex account is blank or not 8 digits + with self.assertRaises(ValidationError): + wrong_account_number = self.PartnerShippingAccount.create({ + 'name': '12345678', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'fedex', + 'note': 'This is a note' + }) + + with self.assertRaises(ValidationError): + no_account_number = self.PartnerShippingAccount.create({ + 'name': '', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'fedex', + 'note': 'This is a note' + }) + + _ = self.PartnerShippingAccount.create({ + 'name': '123456789', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'fedex', + 'note': 'This is a note' + }) From ab02d45b6042875d1eeed54170a5210ea933874b Mon Sep 17 00:00:00 2001 From: Leighton Pennicott Date: Mon, 9 Nov 2020 09:56:12 -0500 Subject: [PATCH 006/159] [MIG] delivery_partner_fedex: migrate to odoo 14.0 Added 'ondelete' option. It's now required when the selection_add parameter is used. --- delivery_partner_fedex/__manifest__.py | 2 +- delivery_partner_fedex/models/delivery.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/delivery_partner_fedex/__manifest__.py b/delivery_partner_fedex/__manifest__.py index b2150cba..7449b318 100755 --- a/delivery_partner_fedex/__manifest__.py +++ b/delivery_partner_fedex/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Fedex Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '13.0.1.0.0', + 'version': '14.0.1.0.0', 'category': 'Stock', 'sequence': 95, 'summary': 'Fedex Partner Shipping Accounts', diff --git a/delivery_partner_fedex/models/delivery.py b/delivery_partner_fedex/models/delivery.py index f6da8910..a1eec67f 100644 --- a/delivery_partner_fedex/models/delivery.py +++ b/delivery_partner_fedex/models/delivery.py @@ -6,12 +6,10 @@ from odoo.exceptions import ValidationError class PartnerShippingAccount(models.Model): _inherit = 'partner.shipping.account' - - delivery_type = fields.Selection(selection_add=[('fedex', 'FedEx')]) - + + delivery_type = fields.Selection(selection_add=[('fedex', 'FedEx')], ondelete={'fedex': 'set default'}) + def fedex_check_validity(self): m = re.search(r'^\d{9}$', self.name or '') if not m: raise ValidationError('FedEx Account numbers must be 9 decimal numbers.') - - From 86e4681ff05c9d1ac12cf8319b6a4919e7e638b7 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 6 Oct 2021 07:23:14 -0700 Subject: [PATCH 007/159] [MIG] delivery_partner_fedex: to Odoo 15.0 --- delivery_partner_fedex/__manifest__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/delivery_partner_fedex/__manifest__.py b/delivery_partner_fedex/__manifest__.py index 7449b318..4a74f13c 100755 --- a/delivery_partner_fedex/__manifest__.py +++ b/delivery_partner_fedex/__manifest__.py @@ -1,7 +1,8 @@ { 'name': 'Fedex Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '14.0.1.0.0', + 'version': '15.0.1.0.0', + 'license': 'LGPL-3', 'category': 'Stock', 'sequence': 95, 'summary': 'Fedex Partner Shipping Accounts', From 22c1504b1c19400eb4167f5691053929f01a0057 Mon Sep 17 00:00:00 2001 From: Mishael De La Cruz Date: Tue, 2 Nov 2021 09:58:15 -0500 Subject: [PATCH 008/159] [I18N] multi: Initial Translations 15.0 --- delivery_partner_fedex/i18n/es.po | 37 +++++++++++++++++++++++ delivery_partner_fedex/models/delivery.py | 4 +-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 delivery_partner_fedex/i18n/es.po diff --git a/delivery_partner_fedex/i18n/es.po b/delivery_partner_fedex/i18n/es.po new file mode 100644 index 00000000..6468eca3 --- /dev/null +++ b/delivery_partner_fedex/i18n/es.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_partner_fedex +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-12 01:11+0000\n" +"PO-Revision-Date: 2021-10-12 01:11+0000\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_partner_fedex +#: model:ir.model.fields,field_description:delivery_partner_fedex.field_partner_shipping_account__delivery_type +msgid "Carrier" +msgstr "Transportista" + +#. module: delivery_partner_fedex +#: model:ir.model.fields.selection,name:delivery_partner_fedex.selection__partner_shipping_account__delivery_type__fedex +msgid "FedEx" +msgstr "FedEx" + +#. module: delivery_partner_fedex +#: code:addons/delivery_partner_fedex/models/delivery.py:0 +#, python-format +msgid "FedEx Account numbers must be 9 decimal numbers." +msgstr "Los números de cuenta FedEx deben ser 9 números decimales" + +#. module: delivery_partner_fedex +#: model:ir.model,name:delivery_partner_fedex.model_partner_shipping_account +msgid "Partner Shipping Account" +msgstr "Cuenta de Envío del Socio" diff --git a/delivery_partner_fedex/models/delivery.py b/delivery_partner_fedex/models/delivery.py index a1eec67f..77767710 100644 --- a/delivery_partner_fedex/models/delivery.py +++ b/delivery_partner_fedex/models/delivery.py @@ -1,6 +1,6 @@ import re -from odoo import fields, models +from odoo import fields, models, _ from odoo.exceptions import ValidationError @@ -12,4 +12,4 @@ class PartnerShippingAccount(models.Model): def fedex_check_validity(self): m = re.search(r'^\d{9}$', self.name or '') if not m: - raise ValidationError('FedEx Account numbers must be 9 decimal numbers.') + raise ValidationError(_('FedEx Account numbers must be 9 decimal numbers.')) From b76475de3ea533d38491d8c5d955b3e874727305 Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Wed, 19 Oct 2022 22:56:16 +0000 Subject: [PATCH 009/159] [MIG] delivery_partner_fedex: to 16 --- delivery_partner_fedex/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/delivery_partner_fedex/__manifest__.py b/delivery_partner_fedex/__manifest__.py index 4a74f13c..36b0e956 100755 --- a/delivery_partner_fedex/__manifest__.py +++ b/delivery_partner_fedex/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Fedex Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '15.0.1.0.0', + 'version': '16.0.1.0.0', 'license': 'LGPL-3', 'category': 'Stock', 'sequence': 95, From 7a739b60b78489cd285bf661fc2c8aaebf2cb85f Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Fri, 13 Apr 2018 09:52:13 -0700 Subject: [PATCH 010/159] Add `delivery_partner`, `delivery_partner_dhl`, `delivery_partner_fedex`, `delivery_partner_ups` --- delivery_partner_ups/__init__.py | 1 + delivery_partner_ups/__manifest__.py | 19 +++++++++++++++++++ delivery_partner_ups/models/__init__.py | 1 + delivery_partner_ups/models/delivery.py | 19 +++++++++++++++++++ delivery_partner_ups/views/delivery_views.xml | 13 +++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 delivery_partner_ups/__init__.py create mode 100755 delivery_partner_ups/__manifest__.py create mode 100644 delivery_partner_ups/models/__init__.py create mode 100644 delivery_partner_ups/models/delivery.py create mode 100644 delivery_partner_ups/views/delivery_views.xml diff --git a/delivery_partner_ups/__init__.py b/delivery_partner_ups/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/delivery_partner_ups/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/delivery_partner_ups/__manifest__.py b/delivery_partner_ups/__manifest__.py new file mode 100755 index 00000000..42e225d5 --- /dev/null +++ b/delivery_partner_ups/__manifest__.py @@ -0,0 +1,19 @@ +{ + 'name': 'UPS Partner Shipping Accounts', + 'author': 'Hibou Corp. ', + 'version': '11.0.1.0.0', + 'category': 'Stock', + 'sequence': 95, + 'summary': 'UPS Partner Shipping Accounts', + 'description': """ + """, + 'website': 'https://hibou.io/', + 'depends': [ + 'delivery_partner', + ], + 'data': [ + 'views/delivery_views.xml', + ], + 'installable': True, + 'application': False, +} diff --git a/delivery_partner_ups/models/__init__.py b/delivery_partner_ups/models/__init__.py new file mode 100644 index 00000000..be8cabd6 --- /dev/null +++ b/delivery_partner_ups/models/__init__.py @@ -0,0 +1 @@ +from . import delivery diff --git a/delivery_partner_ups/models/delivery.py b/delivery_partner_ups/models/delivery.py new file mode 100644 index 00000000..fef70cd2 --- /dev/null +++ b/delivery_partner_ups/models/delivery.py @@ -0,0 +1,19 @@ +import re + +from odoo import fields, models +from odoo.exceptions import ValidationError + + +class PartnerShippingAccount(models.Model): + _inherit = 'partner.shipping.account' + + delivery_type = fields.Selection(selection_add=[('ups', 'UPS')]) + ups_zip = fields.Char(string='UPS Account ZIP') + + def ups_check_validity(self): + m = re.search('^[\dA-Z]{6}$', self.name or '') + if not m: + raise ValidationError('UPS Account numbers must be 6 Alpha-numeric characters.') + m = re.search('^\d{5}$', self.ups_zip or '') + if not m: + raise ValidationError('UPS requires the 5 digit account ZIP.') diff --git a/delivery_partner_ups/views/delivery_views.xml b/delivery_partner_ups/views/delivery_views.xml new file mode 100644 index 00000000..d5c8a4e7 --- /dev/null +++ b/delivery_partner_ups/views/delivery_views.xml @@ -0,0 +1,13 @@ + + + + partner.shipping.account.form.inherit + partner.shipping.account + + + + + + + + From 4d45f2587039bc4b67b1aa648e78dbe0ff73f3d2 Mon Sep 17 00:00:00 2001 From: Kristen Marie Kulha Date: Fri, 8 Jun 2018 10:58:23 -0700 Subject: [PATCH 011/159] Add README.rst --- delivery_partner_ups/README.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 delivery_partner_ups/README.rst diff --git a/delivery_partner_ups/README.rst b/delivery_partner_ups/README.rst new file mode 100644 index 00000000..632af9f7 --- /dev/null +++ b/delivery_partner_ups/README.rst @@ -0,0 +1,25 @@ +*************************************** +Hibou - UPS Partner Shipping Accounts +*************************************** + +Adds UPS shipping accounts. + +For more information and add-ons, visit `Hibou.io `_. + + +============= +Main Features +============= + +* Adds UPS to the delivery type selection field. +* Adds new required field of UPS Account ZIP. +* Validates entered UPS account numbers are the correct length. + + +======= +License +======= + +Please see `LICENSE `_. + +Copyright Hibou Corp. 2018 From 9dfd4006c45d2c2e75cb213ea97c6b882689995f Mon Sep 17 00:00:00 2001 From: Kristen Marie Kulha Date: Fri, 8 Jun 2018 12:25:16 -0700 Subject: [PATCH 012/159] Add screenshot. --- delivery_partner_ups/README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/delivery_partner_ups/README.rst b/delivery_partner_ups/README.rst index 632af9f7..5896d237 100644 --- a/delivery_partner_ups/README.rst +++ b/delivery_partner_ups/README.rst @@ -15,6 +15,10 @@ Main Features * Adds new required field of UPS Account ZIP. * Validates entered UPS account numbers are the correct length. +.. image:: https://user-images.githubusercontent.com/15882954/41176879-e7dc5a66-6b16-11e8-82a2-9b6cd0c909fd.png + :alt: 'Register Payment Detail' + :width: 988 + :align: left ======= License From 772e02c5eb243c3a85d6612083c76e67bc67f881 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 2 Apr 2019 10:41:41 -0700 Subject: [PATCH 013/159] MIG `delivery_partner_ups` to 12.0 --- delivery_partner_ups/__manifest__.py | 2 +- delivery_partner_ups/models/delivery.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/delivery_partner_ups/__manifest__.py b/delivery_partner_ups/__manifest__.py index 42e225d5..4639f374 100755 --- a/delivery_partner_ups/__manifest__.py +++ b/delivery_partner_ups/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'UPS Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Stock', 'sequence': 95, 'summary': 'UPS Partner Shipping Accounts', diff --git a/delivery_partner_ups/models/delivery.py b/delivery_partner_ups/models/delivery.py index fef70cd2..dd9a3239 100644 --- a/delivery_partner_ups/models/delivery.py +++ b/delivery_partner_ups/models/delivery.py @@ -11,9 +11,9 @@ class PartnerShippingAccount(models.Model): ups_zip = fields.Char(string='UPS Account ZIP') def ups_check_validity(self): - m = re.search('^[\dA-Z]{6}$', self.name or '') + m = re.search(r'^[\dA-Z]{6}$', self.name or '') if not m: raise ValidationError('UPS Account numbers must be 6 Alpha-numeric characters.') - m = re.search('^\d{5}$', self.ups_zip or '') + m = re.search(r'^\d{5}$', self.ups_zip or '') if not m: raise ValidationError('UPS requires the 5 digit account ZIP.') From 7d69eb15b0113e32ef15c2795b17efae0ce0d0f7 Mon Sep 17 00:00:00 2001 From: Leighton Pennicott Date: Fri, 6 Nov 2020 18:44:19 -0500 Subject: [PATCH 014/159] [MIG] delivery_partner_ups: migrate to Odoo 13.0 Added tests --- delivery_partner_ups/__manifest__.py | 2 +- delivery_partner_ups/tests/__init__.py | 1 + .../tests/test_ups_account.py | 61 +++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 delivery_partner_ups/tests/__init__.py create mode 100644 delivery_partner_ups/tests/test_ups_account.py diff --git a/delivery_partner_ups/__manifest__.py b/delivery_partner_ups/__manifest__.py index 4639f374..b9cff5ac 100755 --- a/delivery_partner_ups/__manifest__.py +++ b/delivery_partner_ups/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'UPS Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'category': 'Stock', 'sequence': 95, 'summary': 'UPS Partner Shipping Accounts', diff --git a/delivery_partner_ups/tests/__init__.py b/delivery_partner_ups/tests/__init__.py new file mode 100644 index 00000000..9df4d58c --- /dev/null +++ b/delivery_partner_ups/tests/__init__.py @@ -0,0 +1 @@ +from . import test_ups_account diff --git a/delivery_partner_ups/tests/test_ups_account.py b/delivery_partner_ups/tests/test_ups_account.py new file mode 100644 index 00000000..f4391039 --- /dev/null +++ b/delivery_partner_ups/tests/test_ups_account.py @@ -0,0 +1,61 @@ +from odoo.tests.common import TransactionCase +from odoo.exceptions import ValidationError + + +class TestAccount(TransactionCase): + + def setUp(self): + super(TestAccount, self).setUp() + self.PartnerShippingAccount = self.env['partner.shipping.account'] + self.partner = self.env.ref('base.res_partner_12') + + def test_ups_account_information(self): + # Create object and confirm that validation error raises if ups account number is blank or not 8 digits + with self.assertRaises(ValidationError): + wrong_account_number = self.PartnerShippingAccount.create({ + 'name': '1234567', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'ups', + 'note': 'This is a note', + 'ups_zip': '12345' + }) + + with self.assertRaises(ValidationError): + no_account_number = self.PartnerShippingAccount.create({ + 'name': '', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'ups', + 'note': 'This is a note', + 'ups_zip': '12345' + }) + # Create object and confirm that validation error raises if zipcode is blank or not 5 digits + with self.assertRaises(ValidationError): + wrong_zip_code = self.PartnerShippingAccount.create({ + 'name': '123456', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'ups', + 'note': 'This is a note', + 'ups_zip': '1234' + }) + + with self.assertRaises(ValidationError): + no_zip_code = self.PartnerShippingAccount.create({ + 'name': '123456', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'ups', + 'note': 'This is a note', + 'ups_zip': '' + }) + + _ = self.PartnerShippingAccount.create({ + 'name': '123456', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'ups', + 'note': 'This is a note', + 'ups_zip': '12345' + }) From 9390b9a0988f6e795e9a4bac5ab69b58d78ddc60 Mon Sep 17 00:00:00 2001 From: Leighton Pennicott Date: Mon, 9 Nov 2020 09:10:12 -0500 Subject: [PATCH 015/159] [MIG] delivery_partner_ups: migrate delivery_partner_module to Odoo 14.0 --- delivery_partner_ups/__manifest__.py | 2 +- delivery_partner_ups/models/delivery.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/delivery_partner_ups/__manifest__.py b/delivery_partner_ups/__manifest__.py index b9cff5ac..8f0470dd 100755 --- a/delivery_partner_ups/__manifest__.py +++ b/delivery_partner_ups/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'UPS Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '13.0.1.0.0', + 'version': '14.0.1.0.0', 'category': 'Stock', 'sequence': 95, 'summary': 'UPS Partner Shipping Accounts', diff --git a/delivery_partner_ups/models/delivery.py b/delivery_partner_ups/models/delivery.py index dd9a3239..257e2503 100644 --- a/delivery_partner_ups/models/delivery.py +++ b/delivery_partner_ups/models/delivery.py @@ -7,7 +7,7 @@ from odoo.exceptions import ValidationError class PartnerShippingAccount(models.Model): _inherit = 'partner.shipping.account' - delivery_type = fields.Selection(selection_add=[('ups', 'UPS')]) + delivery_type = fields.Selection(selection_add=[('ups', 'UPS')], ondelete={'ups': 'set default'}) ups_zip = fields.Char(string='UPS Account ZIP') def ups_check_validity(self): From 290253dfa2ee5766b72e3c9a23bd073c064f4eb3 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 6 Oct 2021 07:25:09 -0700 Subject: [PATCH 016/159] [MIG] delivery_partner_ups: to Odoo 15.0 --- delivery_partner_ups/__manifest__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/delivery_partner_ups/__manifest__.py b/delivery_partner_ups/__manifest__.py index 8f0470dd..b4659cb6 100755 --- a/delivery_partner_ups/__manifest__.py +++ b/delivery_partner_ups/__manifest__.py @@ -1,7 +1,8 @@ { 'name': 'UPS Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '14.0.1.0.0', + 'version': '15.0.1.0.0', + 'license': 'LGPL-3', 'category': 'Stock', 'sequence': 95, 'summary': 'UPS Partner Shipping Accounts', From 1597f68baec45d9d8b870c82957241a304f916bc Mon Sep 17 00:00:00 2001 From: Mishael De La Cruz Date: Tue, 2 Nov 2021 09:58:15 -0500 Subject: [PATCH 017/159] [I18N] multi: Initial Translations 15.0 --- delivery_partner_ups/i18n/es.po | 47 +++++++++++++++++++++++++ delivery_partner_ups/models/delivery.py | 6 ++-- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 delivery_partner_ups/i18n/es.po diff --git a/delivery_partner_ups/i18n/es.po b/delivery_partner_ups/i18n/es.po new file mode 100644 index 00000000..1dbe5f59 --- /dev/null +++ b/delivery_partner_ups/i18n/es.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * delivery_partner_ups +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-12 01:10+0000\n" +"PO-Revision-Date: 2021-10-12 01:10+0000\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_partner_ups +#: model:ir.model.fields,field_description:delivery_partner_ups.field_partner_shipping_account__delivery_type +msgid "Carrier" +msgstr "Transportista" + +#. module: delivery_partner_ups +#: model:ir.model,name:delivery_partner_ups.model_partner_shipping_account +msgid "Partner Shipping Account" +msgstr "Cuenta de Envío del Socio" + +#. module: delivery_partner_ups +#: model:ir.model.fields.selection,name:delivery_partner_ups.selection__partner_shipping_account__delivery_type__ups +msgid "UPS" +msgstr "UPS" + +#. module: delivery_partner_ups +#: model:ir.model.fields,field_description:delivery_partner_ups.field_partner_shipping_account__ups_zip +msgid "UPS Account ZIP" +msgstr "Código postal de la cuenta UPS" +#. module: delivery_partner_ups +#: code:addons/delivery_partner_ups/models/delivery.py:0 +#, python-format +msgid "UPS Account numbers must be 6 Alpha-numeric characters." +msgstr "Los números de cuenta de UPS deben tener 6 caracteres alfanuméricos." + +#. module: delivery_partner_ups +#: code:addons/delivery_partner_ups/models/delivery.py:0 +#, python-format +msgid "UPS requires the 5 digit account ZIP." +msgstr "UPS requiere el código postal de 5 dígitos de la cuenta." diff --git a/delivery_partner_ups/models/delivery.py b/delivery_partner_ups/models/delivery.py index 257e2503..93d5ce56 100644 --- a/delivery_partner_ups/models/delivery.py +++ b/delivery_partner_ups/models/delivery.py @@ -1,6 +1,6 @@ import re -from odoo import fields, models +from odoo import fields, models, _ from odoo.exceptions import ValidationError @@ -13,7 +13,7 @@ class PartnerShippingAccount(models.Model): def ups_check_validity(self): m = re.search(r'^[\dA-Z]{6}$', self.name or '') if not m: - raise ValidationError('UPS Account numbers must be 6 Alpha-numeric characters.') + raise ValidationError(_('UPS Account numbers must be 6 Alpha-numeric characters.')) m = re.search(r'^\d{5}$', self.ups_zip or '') if not m: - raise ValidationError('UPS requires the 5 digit account ZIP.') + raise ValidationError(_('UPS requires the 5 digit account ZIP.')) From 5e4ae13a3294972fb264af6ab0b6d0edde448e97 Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Wed, 19 Oct 2022 23:09:56 +0000 Subject: [PATCH 018/159] [MIG] delivery_partner_ups: to 16 --- delivery_partner_ups/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/delivery_partner_ups/__manifest__.py b/delivery_partner_ups/__manifest__.py index b4659cb6..5f32574a 100755 --- a/delivery_partner_ups/__manifest__.py +++ b/delivery_partner_ups/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'UPS Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '15.0.1.0.0', + 'version': '16.0.1.0.0', 'license': 'LGPL-3', 'category': 'Stock', 'sequence': 95, From 4eb5c13a70217edc608bcbbf4c343adcede149ce Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 24 Apr 2018 09:34:11 -0700 Subject: [PATCH 019/159] Initial commit `maintenance_notebook` for 11.0 --- maintenance_notebook/__init__.py | 1 + maintenance_notebook/__manifest__.py | 22 +++++++++++++++++++ .../views/maintenance_views.xml | 13 +++++++++++ 3 files changed, 36 insertions(+) create mode 100644 maintenance_notebook/__init__.py create mode 100644 maintenance_notebook/__manifest__.py create mode 100644 maintenance_notebook/views/maintenance_views.xml diff --git a/maintenance_notebook/__init__.py b/maintenance_notebook/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/maintenance_notebook/__init__.py @@ -0,0 +1 @@ + diff --git a/maintenance_notebook/__manifest__.py b/maintenance_notebook/__manifest__.py new file mode 100644 index 00000000..198c0fb6 --- /dev/null +++ b/maintenance_notebook/__manifest__.py @@ -0,0 +1,22 @@ +{ + 'name': 'Maintenance Notebook', + 'version': '11.0.1.0.0', + 'author': 'Hibou Corp. ', + 'category': 'Human Resources', + 'summary': 'Record time on maintenance requests.', + 'description': """ +Maintenance Notebook +==================== + +Adds a 'notebook' XML element to the Maintenance form to add pages in other modules. +""", + 'website': 'https://hibou.io/', + 'depends': [ + 'maintenance', + ], + 'data': [ + 'views/maintenance_views.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/maintenance_notebook/views/maintenance_views.xml b/maintenance_notebook/views/maintenance_views.xml new file mode 100644 index 00000000..e5558e18 --- /dev/null +++ b/maintenance_notebook/views/maintenance_views.xml @@ -0,0 +1,13 @@ + + + + equipment.request.form.notebook + maintenance.request + + + + + + + + \ No newline at end of file From c0e81135c41018237b0d6362ea24b434034b8529 Mon Sep 17 00:00:00 2001 From: Kristen Marie Kulha Date: Mon, 11 Jun 2018 15:47:02 -0700 Subject: [PATCH 020/159] Add README to `maintenance_notebook`. --- maintenance_notebook/README.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 maintenance_notebook/README.rst diff --git a/maintenance_notebook/README.rst b/maintenance_notebook/README.rst new file mode 100644 index 00000000..1fbc238a --- /dev/null +++ b/maintenance_notebook/README.rst @@ -0,0 +1,22 @@ +**************************** +Hibou - Maintenance Notebook +**************************** + +Base module that creates tabs used in `maintenance_repair `_ and `maintenance_timesheet `_ + +For more information and add-ons, visit `Hibou.io `_. + + +.. image:: https://user-images.githubusercontent.com/15882954/41258483-2666f906-6d85-11e8-9f74-a50aaa6b527b.png + :alt: 'Equipment Detail' + :width: 988 + :align: left + + +======= +License +======= + +Please see `LICENSE `_. + +Copyright Hibou Corp. 2018 From 6c62e4092342de3e9d22daefb368eb95c90e79cd Mon Sep 17 00:00:00 2001 From: Bhoomi Date: Thu, 29 Aug 2019 10:17:31 -0400 Subject: [PATCH 021/159] MIG `maintenance_notebook` For Odoo 12.0 --- maintenance_notebook/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance_notebook/__manifest__.py b/maintenance_notebook/__manifest__.py index 198c0fb6..c314bd7e 100644 --- a/maintenance_notebook/__manifest__.py +++ b/maintenance_notebook/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Maintenance Notebook', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'author': 'Hibou Corp. ', 'category': 'Human Resources', 'summary': 'Record time on maintenance requests.', From b9f4b0959fc6a185e996df911ba092574bbe2fa5 Mon Sep 17 00:00:00 2001 From: Bhoomi Date: Fri, 30 Aug 2019 09:49:18 -0400 Subject: [PATCH 022/159] MIG `maintenance_notebook` For Odoo 13.0 --- maintenance_notebook/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance_notebook/__manifest__.py b/maintenance_notebook/__manifest__.py index c314bd7e..bd80ef5b 100644 --- a/maintenance_notebook/__manifest__.py +++ b/maintenance_notebook/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Maintenance Notebook', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'author': 'Hibou Corp. ', 'category': 'Human Resources', 'summary': 'Record time on maintenance requests.', From a2e4ff3ef9570103469df230d1abef53d4edc114 Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Tue, 25 Oct 2022 22:32:22 +0000 Subject: [PATCH 023/159] [MIG] maintenance_notebook: to 16 --- maintenance_notebook/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance_notebook/__manifest__.py b/maintenance_notebook/__manifest__.py index bd80ef5b..db5d4380 100644 --- a/maintenance_notebook/__manifest__.py +++ b/maintenance_notebook/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Maintenance Notebook', - 'version': '13.0.1.0.0', + 'version': '16.0.1.0.0', 'author': 'Hibou Corp. ', 'category': 'Human Resources', 'summary': 'Record time on maintenance requests.', From 277afbd40f99e40a404d81f4b158ce44139a0052 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 1 May 2018 09:54:22 -0700 Subject: [PATCH 024/159] Initial commit `maintenance_purchase_detail` for 11.0 --- maintenance_purchase_detail/README.rst | 26 +++++++++++++++++++ maintenance_purchase_detail/__init__.py | 1 + maintenance_purchase_detail/__manifest__.py | 22 ++++++++++++++++ .../models/__init__.py | 1 + .../models/maintenance.py | 13 ++++++++++ .../views/maintenance_views.xml | 20 ++++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 maintenance_purchase_detail/README.rst create mode 100644 maintenance_purchase_detail/__init__.py create mode 100644 maintenance_purchase_detail/__manifest__.py create mode 100644 maintenance_purchase_detail/models/__init__.py create mode 100644 maintenance_purchase_detail/models/maintenance.py create mode 100644 maintenance_purchase_detail/views/maintenance_views.xml diff --git a/maintenance_purchase_detail/README.rst b/maintenance_purchase_detail/README.rst new file mode 100644 index 00000000..0e081b44 --- /dev/null +++ b/maintenance_purchase_detail/README.rst @@ -0,0 +1,26 @@ +*********************************** +Hibou - Maintenance Purchase Detail +*********************************** + +Record purchase date and details on Equipments. + +For more information and add-ons, visit `Hibou.io `_. + +============= +Main Features +============= + +Adds the following fields to Maintenance Equipment: + +* Purchase Date +* Purchase Condition (dropdown) +* Purchase Note + +Additionally, adds a smart button to archive Equipments. + +======= +License +======= + +Please see `LICENSE `_. +Copyright Hibou Corp. 2018 \ No newline at end of file diff --git a/maintenance_purchase_detail/__init__.py b/maintenance_purchase_detail/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/maintenance_purchase_detail/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/maintenance_purchase_detail/__manifest__.py b/maintenance_purchase_detail/__manifest__.py new file mode 100644 index 00000000..e688ea32 --- /dev/null +++ b/maintenance_purchase_detail/__manifest__.py @@ -0,0 +1,22 @@ +{ + 'name': 'Equipment Purchase Detail', + 'version': '11.0.1.0.0', + 'author': 'Hibou Corp. ', + 'category': 'Human Resources', + 'summary': 'Record purchase date and details on Equipments.', + 'description': """ +Equipment Purchase Detail +========================= + +Adds fields for purchase date, and condition on the Equipment form. +""", + 'website': 'https://hibou.io/', + 'depends': [ + 'maintenance', + ], + 'data': [ + 'views/maintenance_views.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/maintenance_purchase_detail/models/__init__.py b/maintenance_purchase_detail/models/__init__.py new file mode 100644 index 00000000..12bf298f --- /dev/null +++ b/maintenance_purchase_detail/models/__init__.py @@ -0,0 +1 @@ +from . import maintenance diff --git a/maintenance_purchase_detail/models/maintenance.py b/maintenance_purchase_detail/models/maintenance.py new file mode 100644 index 00000000..cdf73d09 --- /dev/null +++ b/maintenance_purchase_detail/models/maintenance.py @@ -0,0 +1,13 @@ +from odoo import api, fields, models + + +class MaintenanceEquipment(models.Model): + _inherit = 'maintenance.equipment' + + purchase_date = fields.Date(string='Purchase Date') + purchase_condition = fields.Selection([ + ('new', 'New'), + ('used', 'Used'), + ('other', 'Other'), + ], string='Purchase Condition') + purchase_note = fields.Text(string='Purchase Note') diff --git a/maintenance_purchase_detail/views/maintenance_views.xml b/maintenance_purchase_detail/views/maintenance_views.xml new file mode 100644 index 00000000..5a2a9777 --- /dev/null +++ b/maintenance_purchase_detail/views/maintenance_views.xml @@ -0,0 +1,20 @@ + + + + equipment.form.inherited + maintenance.equipment + + + + + + + + + + + + + \ No newline at end of file From 156c2e387341567790d7b49d2e5e43b3d744b4a4 Mon Sep 17 00:00:00 2001 From: Bhoomi Date: Fri, 13 Sep 2019 12:41:33 -0400 Subject: [PATCH 025/159] MIG `maintenance_purchase_detail` For Odoo 12.0 --- maintenance_purchase_detail/__manifest__.py | 2 +- maintenance_purchase_detail/views/maintenance_views.xml | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/maintenance_purchase_detail/__manifest__.py b/maintenance_purchase_detail/__manifest__.py index e688ea32..79508ba7 100644 --- a/maintenance_purchase_detail/__manifest__.py +++ b/maintenance_purchase_detail/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Equipment Purchase Detail', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'author': 'Hibou Corp. ', 'category': 'Human Resources', 'summary': 'Record purchase date and details on Equipments.', diff --git a/maintenance_purchase_detail/views/maintenance_views.xml b/maintenance_purchase_detail/views/maintenance_views.xml index 5a2a9777..3a1bab21 100644 --- a/maintenance_purchase_detail/views/maintenance_views.xml +++ b/maintenance_purchase_detail/views/maintenance_views.xml @@ -5,12 +5,7 @@ maintenance.equipment - - - - + From 5e76731bf80c89a19f58199b1d799e27b982d8bb Mon Sep 17 00:00:00 2001 From: Bhoomi Date: Fri, 13 Sep 2019 17:27:36 -0400 Subject: [PATCH 026/159] MIG `maintenance_purchase_detail` For Odoo 13.0 --- maintenance_purchase_detail/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance_purchase_detail/__manifest__.py b/maintenance_purchase_detail/__manifest__.py index 79508ba7..5d6bce51 100644 --- a/maintenance_purchase_detail/__manifest__.py +++ b/maintenance_purchase_detail/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Equipment Purchase Detail', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'author': 'Hibou Corp. ', 'category': 'Human Resources', 'summary': 'Record purchase date and details on Equipments.', From dd6920a06d7f81c8ed342a79de63628be2fd32d5 Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Tue, 25 Oct 2022 22:22:04 +0000 Subject: [PATCH 027/159] [MIG] maintenance_purchase_detail: to 16 --- maintenance_purchase_detail/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance_purchase_detail/__manifest__.py b/maintenance_purchase_detail/__manifest__.py index 5d6bce51..162ca152 100644 --- a/maintenance_purchase_detail/__manifest__.py +++ b/maintenance_purchase_detail/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Equipment Purchase Detail', - 'version': '13.0.1.0.0', + 'version': '16.0.1.0.0', 'author': 'Hibou Corp. ', 'category': 'Human Resources', 'summary': 'Record purchase date and details on Equipments.', From 24e7ebb161337b0348a6a876aba6446a3c604cf5 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 6 Oct 2021 05:51:27 -0700 Subject: [PATCH 028/159] [ADD] web_hibou_color: for Odoo 15.0 --- web_hibou_color/__init__.py | 0 web_hibou_color/__manifest__.py | 21 +++++++++++++++++++ .../src/legacy/scss/primary_variables.scss | 9 ++++++++ 3 files changed, 30 insertions(+) create mode 100644 web_hibou_color/__init__.py create mode 100644 web_hibou_color/__manifest__.py create mode 100644 web_hibou_color/static/src/legacy/scss/primary_variables.scss diff --git a/web_hibou_color/__init__.py b/web_hibou_color/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/web_hibou_color/__manifest__.py b/web_hibou_color/__manifest__.py new file mode 100644 index 00000000..3f4b0c68 --- /dev/null +++ b/web_hibou_color/__manifest__.py @@ -0,0 +1,21 @@ +{ + 'name': 'Web Hibou Color', + 'category': 'Hidden', + 'version': '15.0.1.0.0', + 'description': """ +Hibou Colors +============ + +This module modifies the web addon to provide alternative colors. + """, + 'depends': [ + 'web', + ], + 'auto_install': True, + 'assets': { + 'web._assets_primary_variables': [ + ('prepend', 'web_hibou_color/static/src/legacy/scss/primary_variables.scss'), + ], + }, + 'license': 'LGPL-3', +} diff --git a/web_hibou_color/static/src/legacy/scss/primary_variables.scss b/web_hibou_color/static/src/legacy/scss/primary_variables.scss new file mode 100644 index 00000000..d816e793 --- /dev/null +++ b/web_hibou_color/static/src/legacy/scss/primary_variables.scss @@ -0,0 +1,9 @@ + + +$o-hibou-color: #0a6fa2; +$o-hibou-primary-color: #038f8c; + +$o-brand-odoo: $o-hibou-color; +$o-brand-primary: $o-hibou-primary-color; +//$o-brand-secondary: #8f8f8f; +//$o-brand-lightsecondary: $o-gray-100; From e8fcd5179f3fbfd18ed1e9b990e4176741150ebc Mon Sep 17 00:00:00 2001 From: Mishael De La Cruz Date: Tue, 2 Nov 2021 09:58:15 -0500 Subject: [PATCH 029/159] [I18N] multi: Initial Translations 15.0 --- web_hibou_color/i18n/es.po | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 web_hibou_color/i18n/es.po diff --git a/web_hibou_color/i18n/es.po b/web_hibou_color/i18n/es.po new file mode 100644 index 00000000..aab743cb --- /dev/null +++ b/web_hibou_color/i18n/es.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-12 01:59+0000\n" +"PO-Revision-Date: 2021-10-12 01:59+0000\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" From 7c68bdf581253a63af8666ce7d4a568bca361b6c Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Tue, 25 Oct 2022 17:34:52 +0000 Subject: [PATCH 030/159] [MIG] web_hibou_color: to 16 --- web_hibou_color/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_hibou_color/__manifest__.py b/web_hibou_color/__manifest__.py index 3f4b0c68..15b00b70 100644 --- a/web_hibou_color/__manifest__.py +++ b/web_hibou_color/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Web Hibou Color', 'category': 'Hidden', - 'version': '15.0.1.0.0', + 'version': '16.0.1.0.0', 'description': """ Hibou Colors ============ From ef473ca7883a104905c1737966d92fae06b8f297 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Mon, 30 Apr 2018 08:15:31 -0700 Subject: [PATCH 031/159] Adding all from 11.0 https://github.com/hibou-io/odoo-hr-payroll hr_payroll_holidays hr_payroll_input_name_report hr_payroll_input_report hr_payroll_payment hr_payroll_timesheet hr_payslip_line_date l10n_us_fl_hr_payroll l10n_us_hr_payroll l10n_us_mo_hr_payroll l10n_us_oh_hr_payroll l10n_us_va_hr_payroll --- hr_payslip_line_date/__init__.py | 2 ++ hr_payslip_line_date/__manifest__.py | 24 ++++++++++++++++++++++++ hr_payslip_line_date/payslip.py | 7 +++++++ hr_payslip_line_date/payslip_view.xml | 18 ++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100755 hr_payslip_line_date/__init__.py create mode 100755 hr_payslip_line_date/__manifest__.py create mode 100755 hr_payslip_line_date/payslip.py create mode 100755 hr_payslip_line_date/payslip_view.xml diff --git a/hr_payslip_line_date/__init__.py b/hr_payslip_line_date/__init__.py new file mode 100755 index 00000000..c09f11e8 --- /dev/null +++ b/hr_payslip_line_date/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import payslip diff --git a/hr_payslip_line_date/__manifest__.py b/hr_payslip_line_date/__manifest__.py new file mode 100755 index 00000000..a9100917 --- /dev/null +++ b/hr_payslip_line_date/__manifest__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +{ + 'name': 'Date on Payslip Lines', + 'author': 'Hibou Corp. ', + 'license': 'AGPL-3', + 'category': 'Human Resources', + 'depends': ['hr_payroll_account'], + 'version': '11.0.0.0.0', + 'description': """ +Date on Payslip Lines +===================== + + * Adds "Date Account" (date) field to payslip line from payslip + * Adds group by date to Payslip Line search view + * Allows filtering by "Date Account" for easy period reporting + """, + + 'auto_install': True, + 'website': 'https://hibou.io/', + 'data':[ + 'payslip_view.xml', + ], + 'installable': True +} diff --git a/hr_payslip_line_date/payslip.py b/hr_payslip_line_date/payslip.py new file mode 100755 index 00000000..7b55423e --- /dev/null +++ b/hr_payslip_line_date/payslip.py @@ -0,0 +1,7 @@ +from odoo import models, fields + + +class PayslipLine(models.Model): + _inherit = 'hr.payslip.line' + + date = fields.Date(string="Date Account", related='slip_id.date', store=True) \ No newline at end of file diff --git a/hr_payslip_line_date/payslip_view.xml b/hr_payslip_line_date/payslip_view.xml new file mode 100755 index 00000000..61f5ba18 --- /dev/null +++ b/hr_payslip_line_date/payslip_view.xml @@ -0,0 +1,18 @@ + + + + + hr.payslip.line.select + hr.payslip.line + 20 + + + + + + + + + + + From 8a1d75edfeeb7ff0afc09ebd6d0f9453323fb69a Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 20 Nov 2018 08:45:20 -0800 Subject: [PATCH 032/159] IMP `hr_payslip_line_date` added dynamic date filters. --- hr_payslip_line_date/payslip_view.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hr_payslip_line_date/payslip_view.xml b/hr_payslip_line_date/payslip_view.xml index 61f5ba18..7a431425 100755 --- a/hr_payslip_line_date/payslip_view.xml +++ b/hr_payslip_line_date/payslip_view.xml @@ -8,6 +8,18 @@ + + + + + + + + + + + + From d41a33f4b26322539d2230356f8006e4c431182b Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 21 Nov 2018 06:20:05 -0800 Subject: [PATCH 033/159] IMP `hr_payslip_line_date` more dynamic filters. --- hr_payslip_line_date/payslip_view.xml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/hr_payslip_line_date/payslip_view.xml b/hr_payslip_line_date/payslip_view.xml index 7a431425..ec551bd4 100755 --- a/hr_payslip_line_date/payslip_view.xml +++ b/hr_payslip_line_date/payslip_view.xml @@ -10,19 +10,26 @@ - - - - + + + + + + + + + + + - - - - + + + + - + - + From a1902b13a5b72b53826cc43fa7c7ff3e159e5410 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Mon, 20 May 2019 15:54:00 -0700 Subject: [PATCH 034/159] MIG `hr_payslip_line_date` to 12.0 --- hr_payslip_line_date/__manifest__.py | 11 ++--- hr_payslip_line_date/payslip_view.xml | 66 +++++++++++++-------------- 2 files changed, 37 insertions(+), 40 deletions(-) diff --git a/hr_payslip_line_date/__manifest__.py b/hr_payslip_line_date/__manifest__.py index a9100917..1723d1de 100755 --- a/hr_payslip_line_date/__manifest__.py +++ b/hr_payslip_line_date/__manifest__.py @@ -1,23 +1,22 @@ -# -*- encoding: utf-8 -*- { 'name': 'Date on Payslip Lines', 'author': 'Hibou Corp. ', 'license': 'AGPL-3', 'category': 'Human Resources', 'depends': ['hr_payroll_account'], - 'version': '11.0.0.0.0', + 'version': '12.0.1.0.0', 'description': """ Date on Payslip Lines ===================== - * Adds "Date Account" (date) field to payslip line from payslip - * Adds group by date to Payslip Line search view - * Allows filtering by "Date Account" for easy period reporting +* Adds "Date Account" (date) field to payslip line from payslip +* Adds group by date to Payslip Line search view +* Allows filtering by "Date Account" for easy period reporting """, 'auto_install': True, 'website': 'https://hibou.io/', - 'data':[ + 'data': [ 'payslip_view.xml', ], 'installable': True diff --git a/hr_payslip_line_date/payslip_view.xml b/hr_payslip_line_date/payslip_view.xml index ec551bd4..790b5447 100755 --- a/hr_payslip_line_date/payslip_view.xml +++ b/hr_payslip_line_date/payslip_view.xml @@ -1,37 +1,35 @@ - - - hr.payslip.line.select - hr.payslip.line - 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + hr.payslip.line.select + hr.payslip.line + 20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + From bc2eca8cad24ed6e277681e5f061e0a03c6691cf Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Fri, 3 Jul 2020 12:35:45 -0700 Subject: [PATCH 035/159] [MIG] hr_payslip_line_date: to Odoo 13.0 --- hr_payslip_line_date/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hr_payslip_line_date/__manifest__.py b/hr_payslip_line_date/__manifest__.py index 1723d1de..b67dfe15 100755 --- a/hr_payslip_line_date/__manifest__.py +++ b/hr_payslip_line_date/__manifest__.py @@ -4,7 +4,7 @@ 'license': 'AGPL-3', 'category': 'Human Resources', 'depends': ['hr_payroll_account'], - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'description': """ Date on Payslip Lines ===================== From 153f4b2e77d1207a2ab084eb889eb68e3c84b5b0 Mon Sep 17 00:00:00 2001 From: Leighton Pennicott Date: Thu, 8 Oct 2020 16:31:39 -0400 Subject: [PATCH 036/159] [IMP] hr_payslip_line_date: Add hr_payslip_line_date to Odoo v13 Add the hr_payslip_line module to Odoo13 H3953 --- hr_payslip_line_date/__init__.py | 3 +- hr_payslip_line_date/__manifest__.py | 3 +- hr_payslip_line_date/models/__init__.py | 1 + hr_payslip_line_date/{ => models}/payslip.py | 0 hr_payslip_line_date/views/payslip_menu.xml | 15 +++++ hr_payslip_line_date/views/payslip_view.xml | 64 ++++++++++++++++++++ 6 files changed, 83 insertions(+), 3 deletions(-) mode change 100755 => 100644 hr_payslip_line_date/__init__.py create mode 100755 hr_payslip_line_date/models/__init__.py rename hr_payslip_line_date/{ => models}/payslip.py (100%) create mode 100644 hr_payslip_line_date/views/payslip_menu.xml create mode 100755 hr_payslip_line_date/views/payslip_view.xml diff --git a/hr_payslip_line_date/__init__.py b/hr_payslip_line_date/__init__.py old mode 100755 new mode 100644 index c09f11e8..0650744f --- a/hr_payslip_line_date/__init__.py +++ b/hr_payslip_line_date/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- -from . import payslip +from . import models diff --git a/hr_payslip_line_date/__manifest__.py b/hr_payslip_line_date/__manifest__.py index b67dfe15..9864b715 100755 --- a/hr_payslip_line_date/__manifest__.py +++ b/hr_payslip_line_date/__manifest__.py @@ -17,7 +17,8 @@ Date on Payslip Lines 'auto_install': True, 'website': 'https://hibou.io/', 'data': [ - 'payslip_view.xml', + 'views/payslip_view.xml', + 'views/payslip_menu.xml', ], 'installable': True } diff --git a/hr_payslip_line_date/models/__init__.py b/hr_payslip_line_date/models/__init__.py new file mode 100755 index 00000000..305e17f9 --- /dev/null +++ b/hr_payslip_line_date/models/__init__.py @@ -0,0 +1 @@ +from . import payslip diff --git a/hr_payslip_line_date/payslip.py b/hr_payslip_line_date/models/payslip.py similarity index 100% rename from hr_payslip_line_date/payslip.py rename to hr_payslip_line_date/models/payslip.py diff --git a/hr_payslip_line_date/views/payslip_menu.xml b/hr_payslip_line_date/views/payslip_menu.xml new file mode 100644 index 00000000..b1a3e6f7 --- /dev/null +++ b/hr_payslip_line_date/views/payslip_menu.xml @@ -0,0 +1,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/hr_payslip_line_date/views/payslip_view.xml b/hr_payslip_line_date/views/payslip_view.xml new file mode 100755 index 00000000..e36b50cd --- /dev/null +++ b/hr_payslip_line_date/views/payslip_view.xml @@ -0,0 +1,64 @@ + + + + + hr.payslip.line.select + hr.payslip.line + 20 + + + + + Last Month (Date From) + + + Last Quarter (Date From) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hr.payslip.line.tree.extend + hr.payslip.line + + + + + + + + + True + + + + + + + + + + From d0940d2db7cbb8bb7bb18f70e50ddfe9badff702 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Thu, 6 Jan 2022 09:53:20 -0800 Subject: [PATCH 037/159] [MIG] hr_payslip_line_date: to 15.0 --- hr_payslip_line_date/__manifest__.py | 2 +- hr_payslip_line_date/models/payslip.py | 2 +- hr_payslip_line_date/views/payslip_menu.xml | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hr_payslip_line_date/__manifest__.py b/hr_payslip_line_date/__manifest__.py index 9864b715..68a3582e 100755 --- a/hr_payslip_line_date/__manifest__.py +++ b/hr_payslip_line_date/__manifest__.py @@ -4,7 +4,7 @@ 'license': 'AGPL-3', 'category': 'Human Resources', 'depends': ['hr_payroll_account'], - 'version': '13.0.1.0.0', + 'version': '15.0.1.0.0', 'description': """ Date on Payslip Lines ===================== diff --git a/hr_payslip_line_date/models/payslip.py b/hr_payslip_line_date/models/payslip.py index 7b55423e..2162eaa3 100755 --- a/hr_payslip_line_date/models/payslip.py +++ b/hr_payslip_line_date/models/payslip.py @@ -4,4 +4,4 @@ from odoo import models, fields class PayslipLine(models.Model): _inherit = 'hr.payslip.line' - date = fields.Date(string="Date Account", related='slip_id.date', store=True) \ No newline at end of file + date = fields.Date(string="Date Account", related='slip_id.date', store=True) diff --git a/hr_payslip_line_date/views/payslip_menu.xml b/hr_payslip_line_date/views/payslip_menu.xml index b1a3e6f7..9647a00b 100644 --- a/hr_payslip_line_date/views/payslip_menu.xml +++ b/hr_payslip_line_date/views/payslip_menu.xml @@ -2,14 +2,15 @@ - + + Payslip Lines + hr.payslip.line + tree,pivot + + action="action_payslip_lines" /> \ No newline at end of file From 58a1c0b42d88f27650a0235a05a747e5f1133f7c Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Tue, 25 Oct 2022 17:08:31 +0000 Subject: [PATCH 038/159] [MIG] hr_payslip_line_date: to 16 --- hr_payslip_line_date/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hr_payslip_line_date/__manifest__.py b/hr_payslip_line_date/__manifest__.py index 68a3582e..013977c5 100755 --- a/hr_payslip_line_date/__manifest__.py +++ b/hr_payslip_line_date/__manifest__.py @@ -4,7 +4,7 @@ 'license': 'AGPL-3', 'category': 'Human Resources', 'depends': ['hr_payroll_account'], - 'version': '15.0.1.0.0', + 'version': '16.0.1.0.0', 'description': """ Date on Payslip Lines ===================== From 30a0b2af0ca887e860b87c338dc5c81971c32a19 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Thu, 29 Oct 2020 11:25:45 -0700 Subject: [PATCH 039/159] [MOV] helpdesk_sales: from hibou-suite-enterprise:11.0 --- helpdesk_sales/__init__.py | 1 + helpdesk_sales/__manifest__.py | 22 ++++++++++++++++++++++ helpdesk_sales/models/__init__.py | 1 + helpdesk_sales/models/helpdesk.py | 15 +++++++++++++++ helpdesk_sales/views/helpdesk_views.xml | 20 ++++++++++++++++++++ 5 files changed, 59 insertions(+) create mode 100644 helpdesk_sales/__init__.py create mode 100755 helpdesk_sales/__manifest__.py create mode 100644 helpdesk_sales/models/__init__.py create mode 100644 helpdesk_sales/models/helpdesk.py create mode 100644 helpdesk_sales/views/helpdesk_views.xml diff --git a/helpdesk_sales/__init__.py b/helpdesk_sales/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/helpdesk_sales/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/helpdesk_sales/__manifest__.py b/helpdesk_sales/__manifest__.py new file mode 100755 index 00000000..008a5ac2 --- /dev/null +++ b/helpdesk_sales/__manifest__.py @@ -0,0 +1,22 @@ +{ + 'name': 'Helpdesk Sales', + 'summary': 'Adds smart button on Helpdesk Tickets to see and create Sale Orders', + 'version': '11.0.1.0.0', + 'author': "Hibou Corp.", + 'category': 'Helpdesk', + 'license': 'AGPL-3', + 'images': [], + 'website': "https://hibou.io", + 'description': "Adds smart button on Helpdesk Tickets to see and create Sale Orders", + 'depends': [ + 'helpdesk', + 'sale', + 'sale_management', + ], + 'demo': [], + 'data': [ + 'views/helpdesk_views.xml', + ], + 'auto_install': False, + 'installable': True, + } diff --git a/helpdesk_sales/models/__init__.py b/helpdesk_sales/models/__init__.py new file mode 100644 index 00000000..a3d4b803 --- /dev/null +++ b/helpdesk_sales/models/__init__.py @@ -0,0 +1 @@ +from . import helpdesk diff --git a/helpdesk_sales/models/helpdesk.py b/helpdesk_sales/models/helpdesk.py new file mode 100644 index 00000000..26b149ec --- /dev/null +++ b/helpdesk_sales/models/helpdesk.py @@ -0,0 +1,15 @@ +from odoo import api, models, fields + + +class Ticket(models.Model): + _inherit = 'helpdesk.ticket' + + sale_order_count = fields.Integer(related='partner_id.sale_order_count', string='# of Sale Orders') + + def action_partner_sales(self): + self.ensure_one() + action = self.env.ref('sale.act_res_partner_2_sale_order').read()[0] + action['context'] = { + 'search_default_partner_id': self.partner_id.id, + } + return action diff --git a/helpdesk_sales/views/helpdesk_views.xml b/helpdesk_sales/views/helpdesk_views.xml new file mode 100644 index 00000000..4f12041b --- /dev/null +++ b/helpdesk_sales/views/helpdesk_views.xml @@ -0,0 +1,20 @@ + + + + + + helpdesk.ticket.form.inherit + helpdesk.ticket + + + + + + + + + From 2236e237ae74b45d1230f0c2344e6feb238496f0 Mon Sep 17 00:00:00 2001 From: Connor Christian Date: Fri, 30 Oct 2020 15:00:54 -0400 Subject: [PATCH 040/159] [MIG] helpdesk_sales: for Odoo 12.0 Additionally hide button if there is no assigned customer --- helpdesk_sales/__manifest__.py | 2 +- helpdesk_sales/views/helpdesk_views.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helpdesk_sales/__manifest__.py b/helpdesk_sales/__manifest__.py index 008a5ac2..134a6457 100755 --- a/helpdesk_sales/__manifest__.py +++ b/helpdesk_sales/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Helpdesk Sales', 'summary': 'Adds smart button on Helpdesk Tickets to see and create Sale Orders', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'author': "Hibou Corp.", 'category': 'Helpdesk', 'license': 'AGPL-3', diff --git a/helpdesk_sales/views/helpdesk_views.xml b/helpdesk_sales/views/helpdesk_views.xml index 4f12041b..7fd09982 100644 --- a/helpdesk_sales/views/helpdesk_views.xml +++ b/helpdesk_sales/views/helpdesk_views.xml @@ -10,6 +10,7 @@ From 1b6494e9eb43ee3298be9cffe88b8173c41255e4 Mon Sep 17 00:00:00 2001 From: Connor Christian Date: Fri, 30 Oct 2020 17:32:05 -0400 Subject: [PATCH 041/159] [MIG] helpdesk_sales: for Odoo 13.0 --- helpdesk_sales/__manifest__.py | 2 +- helpdesk_sales/views/helpdesk_views.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helpdesk_sales/__manifest__.py b/helpdesk_sales/__manifest__.py index 134a6457..349334a8 100755 --- a/helpdesk_sales/__manifest__.py +++ b/helpdesk_sales/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Helpdesk Sales', 'summary': 'Adds smart button on Helpdesk Tickets to see and create Sale Orders', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'author': "Hibou Corp.", 'category': 'Helpdesk', 'license': 'AGPL-3', diff --git a/helpdesk_sales/views/helpdesk_views.xml b/helpdesk_sales/views/helpdesk_views.xml index 7fd09982..3b0c3e5e 100644 --- a/helpdesk_sales/views/helpdesk_views.xml +++ b/helpdesk_sales/views/helpdesk_views.xml @@ -7,9 +7,9 @@ helpdesk.ticket - + From ca071fe8720c110039fd232269f009275692e8c1 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Mon, 10 Jan 2022 08:39:15 -0800 Subject: [PATCH 100/159] [FIX] project_task_line: access error on action for low level users --- project_task_line/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/models/project.py b/project_task_line/models/project.py index 91c1534f..887f53ab 100644 --- a/project_task_line/models/project.py +++ b/project_task_line/models/project.py @@ -15,7 +15,7 @@ class ProjectTask(models.Model): task.subtask_count_done = len(subtasks.filtered(lambda t: t.stage_id.is_closed)) def action_subtask(self): - action = self.env.ref('project.action_view_all_task').read()[0] + action = self.env.ref('project.action_view_all_task').sudo().read()[0] # display all subtasks of current task action['domain'] = [('id', 'child_of', self.id), ('id', '!=', self.id)] From ace8808db9d7fc6379c6ebd53081bb774bc30295 Mon Sep 17 00:00:00 2001 From: Leo Pinedo Date: Fri, 21 Oct 2022 22:58:25 +0000 Subject: [PATCH 101/159] [MIG] project_task_line: to 16 --- project_task_line/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_line/__manifest__.py b/project_task_line/__manifest__.py index 306dba71..d8023b12 100644 --- a/project_task_line/__manifest__.py +++ b/project_task_line/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Project Task Lines', - 'version': '15.0.1.0.0', + 'version': '16.0.1.0.0', 'author': 'Hibou Corp. ', 'website': 'https://hibou.io/', 'license': 'AGPL-3', From 98c6ad8f3c6c8ff97e77185fd153c41e6c70ebc8 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Fri, 18 Sep 2020 11:28:39 -0700 Subject: [PATCH 102/159] [NEW] hr_attendance_work_entry: for Odoo 13 --- hr_attendance_work_entry/__init__.py | 15 +++++ hr_attendance_work_entry/__manifest__.py | 17 ++++++ .../data/hr_attendance_work_entry_data.xml | 17 ++++++ hr_attendance_work_entry/models/__init__.py | 3 + hr_attendance_work_entry/models/attendance.py | 9 +++ hr_attendance_work_entry/models/employee.py | 58 +++++++++++++++++++ hr_attendance_work_entry/models/work_entry.py | 13 +++++ hr_attendance_work_entry/tests/__init__.py | 1 + .../tests/test_attendance_work_type.py | 47 +++++++++++++++ 9 files changed, 180 insertions(+) create mode 100644 hr_attendance_work_entry/__init__.py create mode 100755 hr_attendance_work_entry/__manifest__.py create mode 100644 hr_attendance_work_entry/data/hr_attendance_work_entry_data.xml create mode 100644 hr_attendance_work_entry/models/__init__.py create mode 100644 hr_attendance_work_entry/models/attendance.py create mode 100644 hr_attendance_work_entry/models/employee.py create mode 100644 hr_attendance_work_entry/models/work_entry.py create mode 100644 hr_attendance_work_entry/tests/__init__.py create mode 100644 hr_attendance_work_entry/tests/test_attendance_work_type.py diff --git a/hr_attendance_work_entry/__init__.py b/hr_attendance_work_entry/__init__.py new file mode 100644 index 00000000..26c033a8 --- /dev/null +++ b/hr_attendance_work_entry/__init__.py @@ -0,0 +1,15 @@ +from . import models + + +def attn_payroll_pre_init_hook(cr): + """ + This module installs a Work Entry Type with code "ATTN" + If you have undergone a migration (either for this module + or even your own Payslip Work Entry lines with code "ATTN") + then the uniqueness constraint will prevent this module + from installing. + """ + cr.execute("UPDATE hr_work_entry_type " + "SET code = 'ATTN-PRE-INSTALL' " + "WHERE code = 'ATTN';" + ) diff --git a/hr_attendance_work_entry/__manifest__.py b/hr_attendance_work_entry/__manifest__.py new file mode 100755 index 00000000..97d1d7ab --- /dev/null +++ b/hr_attendance_work_entry/__manifest__.py @@ -0,0 +1,17 @@ +{ + 'name': 'Attendance Work Entry Type', + 'description': 'Set work types on attendance records.', + 'version': '13.0.1.0.0', + 'website': 'https://hibou.io/', + 'author': 'Hibou Corp. ', + 'license': 'AGPL-3', + 'category': 'Human Resources', + 'data': [ + 'data/hr_attendance_work_entry_data.xml', + ], + 'depends': [ + 'hr_attendance', + 'hr_work_entry', + ], + 'pre_init_hook': 'attn_payroll_pre_init_hook', +} diff --git a/hr_attendance_work_entry/data/hr_attendance_work_entry_data.xml b/hr_attendance_work_entry/data/hr_attendance_work_entry_data.xml new file mode 100644 index 00000000..ab99a1ca --- /dev/null +++ b/hr_attendance_work_entry/data/hr_attendance_work_entry_data.xml @@ -0,0 +1,17 @@ + + + + + Attendance + ATTN + + checked_in + fa-sign-in + + + + + Work Calendar + + + \ No newline at end of file diff --git a/hr_attendance_work_entry/models/__init__.py b/hr_attendance_work_entry/models/__init__.py new file mode 100644 index 00000000..1e37c49d --- /dev/null +++ b/hr_attendance_work_entry/models/__init__.py @@ -0,0 +1,3 @@ +from . import attendance +from . import employee +from . import work_entry diff --git a/hr_attendance_work_entry/models/attendance.py b/hr_attendance_work_entry/models/attendance.py new file mode 100644 index 00000000..273b1367 --- /dev/null +++ b/hr_attendance_work_entry/models/attendance.py @@ -0,0 +1,9 @@ +from odoo import fields, models + + +class HrAttendance(models.Model): + _inherit = 'hr.attendance' + + work_type_id = fields.Many2one('hr.work.entry.type', string='Work Type', + default=lambda self: self.env.ref('hr_attendance_work_entry.work_input_attendance', + raise_if_not_found=False)) diff --git a/hr_attendance_work_entry/models/employee.py b/hr_attendance_work_entry/models/employee.py new file mode 100644 index 00000000..d9caffc4 --- /dev/null +++ b/hr_attendance_work_entry/models/employee.py @@ -0,0 +1,58 @@ +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + attendance_state = fields.Selection(selection_add=[('break', 'Break')]) + + @api.depends('last_attendance_id.work_type_id') + def _compute_attendance_state(self): + for employee in self: + att = employee.last_attendance_id.sudo() + if not att or att.check_out: + employee.attendance_state = 'checked_out' + elif employee.last_attendance_id.work_type_id.attendance_state: + employee.attendance_state = employee.last_attendance_id.work_type_id.attendance_state + else: + employee.attendance_state = 'checked_in' + + def attendance_manual(self, next_action, entered_pin=None, work_type_id=None): + self = self.with_context(work_type_id=work_type_id) + return super(HrEmployee, self).attendance_manual(next_action, entered_pin=entered_pin) + + def _attendance_action_change(self): + """ Check In/Check Out action + Check In: create a new attendance record + Check Out: modify check_out field of appropriate attendance record + """ + self.ensure_one() + action_date = fields.Datetime.now() + work_type_id = self._context.get('work_type_id', False) + + if self.attendance_state == 'checked_out': + vals = { + 'employee_id': self.id, + 'check_in': action_date, + } + if work_type_id: + # if we don't have a work_type_id, we want the default + vals['work_type_id'] = work_type_id + return self.env['hr.attendance'].create(vals) + attendance = self.env['hr.attendance'].search([('employee_id', '=', self.id), ('check_out', '=', False)], limit=1) + if attendance and work_type_id: + # work_type_id is the "next" attendance type + attendance.check_out = action_date + vals = { + 'employee_id': self.id, + 'check_in': action_date, + 'work_type_id': work_type_id, + } + return self.env['hr.attendance'].create(vals) + if attendance: + attendance.check_out = action_date + else: + raise UserError(_('Cannot perform check out on %(empl_name)s, could not find corresponding check in. ' + 'Your attendances have probably been modified manually by human resources.') % {'empl_name': self.sudo().name, }) + return attendance diff --git a/hr_attendance_work_entry/models/work_entry.py b/hr_attendance_work_entry/models/work_entry.py new file mode 100644 index 00000000..b4088b0e --- /dev/null +++ b/hr_attendance_work_entry/models/work_entry.py @@ -0,0 +1,13 @@ +from odoo import fields, models + + +class HrWorkEntryType(models.Model): + _inherit = 'hr.work.entry.type' + + allow_attendance = fields.Boolean(string='Allow in Attendance') + attendance_icon = fields.Char(string='Attendance Icon', default='fa-sign-in') + attendance_state = fields.Selection([ + # ('checked_out', "Checked out"), # reserved for detecting new punch in + ('checked_in', "Checked in"), + ('break', 'Break'), + ], string='Attendance State', default='checked_in') diff --git a/hr_attendance_work_entry/tests/__init__.py b/hr_attendance_work_entry/tests/__init__.py new file mode 100644 index 00000000..170aaad8 --- /dev/null +++ b/hr_attendance_work_entry/tests/__init__.py @@ -0,0 +1 @@ +from . import test_attendance_work_type diff --git a/hr_attendance_work_entry/tests/test_attendance_work_type.py b/hr_attendance_work_entry/tests/test_attendance_work_type.py new file mode 100644 index 00000000..3b739d6d --- /dev/null +++ b/hr_attendance_work_entry/tests/test_attendance_work_type.py @@ -0,0 +1,47 @@ +from odoo.tests import common + + +class TestAttendanceWorkType(common.TransactionCase): + def setUp(self): + super().setUp() + self.employee = self.env.ref('hr.employee_hne') + self.default_work_type = self.env.ref('hr_attendance_work_entry.work_input_attendance') + + def test_01_work_type(self): + attendance = self.env['hr.attendance'].create({ + 'employee_id': self.employee.id, + 'check_in': '2020-01-06 10:00:00', # Monday + 'check_out': '2020-01-06 19:00:00', + }) + self.assertTrue(attendance.work_type_id) + self.assertEqual(attendance.work_type_id, self.default_work_type) + + def test_11_employee_clock_in(self): + self.assertEqual(self.employee.attendance_state, 'checked_out') + attendance = self.employee._attendance_action_change() + self.assertEqual(attendance.work_type_id, self.default_work_type) + self.assertEqual(self.employee.attendance_state, 'checked_in') + + # check out + self.employee._attendance_action_change() + self.assertEqual(self.employee.attendance_state, 'checked_out') + + def test_12_employee_clock_in_break(self): + # check in with non-standard work type + break_type = self.env['hr.work.entry.type'].create({ + 'name': 'Test Break', + 'code': 'TESTBREAK', + 'allow_attendance': True, + 'attendance_state': 'break', + }) + self.employee = self.employee.with_context(work_type_id=break_type.id) + attendance = self.employee._attendance_action_change() + self.assertEqual(attendance.work_type_id, break_type) + self.assertEqual(self.employee.attendance_state, 'break') + + # check back in immediately with default + self.employee = self.employee.with_context(work_type_id=self.default_work_type.id) + attendance = self.employee._attendance_action_change() + self.assertEqual(attendance.work_type_id, self.default_work_type) + self.assertEqual(attendance.work_type_id.attendance_state, 'checked_in') + self.assertEqual(self.employee.attendance_state, 'checked_in') From 601d9115378067e681d9a62d16da3de451c9d432 Mon Sep 17 00:00:00 2001 From: Brett Spaulding Date: Fri, 18 Sep 2020 17:26:50 -0400 Subject: [PATCH 103/159] [IMP] hr_attendance_work_entry: Modified kiosk mode views and attendance views to allow for various punch types. --- hr_attendance_work_entry/__manifest__.py | 16 ++- .../data/hr_attendance_work_entry_demo.xml | 20 +++ hr_attendance_work_entry/models/attendance.py | 7 +- hr_attendance_work_entry/models/employee.py | 5 +- hr_attendance_work_entry/models/work_entry.py | 2 + .../static/src/js/kiosk_confirm.js | 71 ++++++++++ .../static/src/js/my_attendances.js | 50 +++++++ .../static/src/scss/hr_attendances.scss | 31 ++++ .../static/src/xml/hr_attendance.xml | 134 ++++++++++++++++++ .../views/attendance_views.xml | 15 ++ .../views/employee_views.xml | 58 ++++++++ hr_attendance_work_entry/views/web_assets.xml | 14 ++ .../views/work_entry_views.xml | 36 +++++ 13 files changed, 454 insertions(+), 5 deletions(-) create mode 100644 hr_attendance_work_entry/data/hr_attendance_work_entry_demo.xml create mode 100644 hr_attendance_work_entry/static/src/js/kiosk_confirm.js create mode 100644 hr_attendance_work_entry/static/src/js/my_attendances.js create mode 100644 hr_attendance_work_entry/static/src/scss/hr_attendances.scss create mode 100644 hr_attendance_work_entry/static/src/xml/hr_attendance.xml create mode 100644 hr_attendance_work_entry/views/attendance_views.xml create mode 100644 hr_attendance_work_entry/views/employee_views.xml create mode 100644 hr_attendance_work_entry/views/web_assets.xml create mode 100644 hr_attendance_work_entry/views/work_entry_views.xml diff --git a/hr_attendance_work_entry/__manifest__.py b/hr_attendance_work_entry/__manifest__.py index 97d1d7ab..61ab485f 100755 --- a/hr_attendance_work_entry/__manifest__.py +++ b/hr_attendance_work_entry/__manifest__.py @@ -6,12 +6,22 @@ 'author': 'Hibou Corp. ', 'license': 'AGPL-3', 'category': 'Human Resources', - 'data': [ - 'data/hr_attendance_work_entry_data.xml', - ], 'depends': [ 'hr_attendance', 'hr_work_entry', ], + 'data': [ + 'data/hr_attendance_work_entry_data.xml', + 'views/attendance_views.xml', + 'views/employee_views.xml', + 'views/web_assets.xml', + 'views/work_entry_views.xml', + ], + 'demo': [ + 'data/hr_attendance_work_entry_demo.xml', + ], + 'qweb': [ + 'static/src/xml/hr_attendance.xml', + ], 'pre_init_hook': 'attn_payroll_pre_init_hook', } diff --git a/hr_attendance_work_entry/data/hr_attendance_work_entry_demo.xml b/hr_attendance_work_entry/data/hr_attendance_work_entry_demo.xml new file mode 100644 index 00000000..e88356b2 --- /dev/null +++ b/hr_attendance_work_entry/data/hr_attendance_work_entry_demo.xml @@ -0,0 +1,20 @@ + + + + + Break + ATTN_BREAK + + break + fa-hourglass-1 + + + + Lunch + ATTN_LUNCH + + lunch + fa-coffee + + + \ No newline at end of file diff --git a/hr_attendance_work_entry/models/attendance.py b/hr_attendance_work_entry/models/attendance.py index 273b1367..cd0d35b5 100644 --- a/hr_attendance_work_entry/models/attendance.py +++ b/hr_attendance_work_entry/models/attendance.py @@ -1,4 +1,4 @@ -from odoo import fields, models +from odoo import api, fields, models class HrAttendance(models.Model): @@ -7,3 +7,8 @@ class HrAttendance(models.Model): work_type_id = fields.Many2one('hr.work.entry.type', string='Work Type', default=lambda self: self.env.ref('hr_attendance_work_entry.work_input_attendance', raise_if_not_found=False)) + + @api.model + def gather_attendance_work_types(self): + work_types = self.env['hr.work.entry.type'].sudo().search([('allow_attendance', '=', True)]) + return work_types.read(['id', 'name', 'attendance_icon']) diff --git a/hr_attendance_work_entry/models/employee.py b/hr_attendance_work_entry/models/employee.py index d9caffc4..49edc1d6 100644 --- a/hr_attendance_work_entry/models/employee.py +++ b/hr_attendance_work_entry/models/employee.py @@ -5,7 +5,7 @@ from odoo.exceptions import UserError class HrEmployee(models.Model): _inherit = 'hr.employee' - attendance_state = fields.Selection(selection_add=[('break', 'Break')]) + attendance_state = fields.Selection(selection_add=[('break', 'Break'), ('lunch', 'Lunch')]) @api.depends('last_attendance_id.work_type_id') def _compute_attendance_state(self): @@ -20,6 +20,9 @@ class HrEmployee(models.Model): def attendance_manual(self, next_action, entered_pin=None, work_type_id=None): self = self.with_context(work_type_id=work_type_id) + if not entered_pin: + # fix for pin mode with specific argument order for work_type_id + entered_pin = None return super(HrEmployee, self).attendance_manual(next_action, entered_pin=entered_pin) def _attendance_action_change(self): diff --git a/hr_attendance_work_entry/models/work_entry.py b/hr_attendance_work_entry/models/work_entry.py index b4088b0e..73618223 100644 --- a/hr_attendance_work_entry/models/work_entry.py +++ b/hr_attendance_work_entry/models/work_entry.py @@ -3,6 +3,7 @@ from odoo import fields, models class HrWorkEntryType(models.Model): _inherit = 'hr.work.entry.type' + _order = 'sequence, id' allow_attendance = fields.Boolean(string='Allow in Attendance') attendance_icon = fields.Char(string='Attendance Icon', default='fa-sign-in') @@ -10,4 +11,5 @@ class HrWorkEntryType(models.Model): # ('checked_out', "Checked out"), # reserved for detecting new punch in ('checked_in', "Checked in"), ('break', 'Break'), + ('lunch', 'Lunch'), ], string='Attendance State', default='checked_in') diff --git a/hr_attendance_work_entry/static/src/js/kiosk_confirm.js b/hr_attendance_work_entry/static/src/js/kiosk_confirm.js new file mode 100644 index 00000000..8919f0e3 --- /dev/null +++ b/hr_attendance_work_entry/static/src/js/kiosk_confirm.js @@ -0,0 +1,71 @@ +odoo.define('hr_attendance_work_entry.kiosk_confirm', function (require) { +"use strict"; + +var core = require('web.core'); +var KioskConfirm = require('hr_attendance.kiosk_confirm'); +var KioskConfirmTyped = KioskConfirm.extend({ + events: _.extend({}, KioskConfirm.prototype.events, { + "click .o_hr_attendance_punch_type": _.debounce(function(e) { + var work_entry_type = $(e.target).data('work-entry-type'); + this.update_attendance(work_entry_type); + }, 200, true), + "click .o_hr_attendance_pin_pad_button_work": _.debounce(function(e) { + var work_entry_type = $(e.target).data('work-entry-type'); + this.update_attendance_pin(work_entry_type); + }, 200, true), + }), + willStart: function () { + var self = this; + + var def = this._rpc({ + model: 'hr.attendance', + method: 'gather_attendance_work_types', + args: []}) + .then(function (res) { + self.work_types = res; + }); + + return Promise.all([def, this._super.apply(this, arguments)]); + }, + update_attendance: function (type) { + var self = this; + this._rpc({ + model: 'hr.employee', + method: 'attendance_manual', + args: [[self.employee_id], this.next_action, false, type], + }) + .then(function(result) { + if (result.action) { + self.do_action(result.action); + } else if (result.warning) { + self.do_warn(result.warning); + } + }); + }, + update_attendance_pin: function (type) { + var self = this; + this.$('.o_hr_attendance_pin_pad_button_ok').attr("disabled", "disabled"); + this.$('.o_hr_attendance_pin_pad_button_work').attr("disabled", "disabled"); + this._rpc({ + model: 'hr.employee', + method: 'attendance_manual', + args: [[this.employee_id], this.next_action, this.$('.o_hr_attendance_PINbox').val(), type], + }) + .then(function(result) { + if (result.action) { + self.do_action(result.action); + } else if (result.warning) { + self.do_warn(result.warning); + self.$('.o_hr_attendance_PINbox').val(''); + setTimeout( function() { + self.$('.o_hr_attendance_pin_pad_button_ok').removeAttr("disabled"); + self.$('.o_hr_attendance_pin_pad_button_work').removeAttr("disabled"); + }, 500); + } + }); + }, +}); + +core.action_registry.add('hr_attendance_kiosk_confirm', KioskConfirmTyped); +return KioskConfirmTyped; +}); \ No newline at end of file diff --git a/hr_attendance_work_entry/static/src/js/my_attendances.js b/hr_attendance_work_entry/static/src/js/my_attendances.js new file mode 100644 index 00000000..d9dcf7ac --- /dev/null +++ b/hr_attendance_work_entry/static/src/js/my_attendances.js @@ -0,0 +1,50 @@ +odoo.define('hr_attendance_work_entry.my_attendances', function (require) { +"use strict"; + +var core = require('web.core'); +var MyAttendances = require('hr_attendance.my_attendances'); + +var MyTypedAttendances = MyAttendances.extend({ + events: _.extend({}, MyAttendances.prototype.events, { + "click .o_hr_attendance_punch_type": _.debounce(function(e) { + var work_entry_type = $(e.target).data('work-entry-type'); + this.update_attendance(work_entry_type); + }, 200, true), + }), + + willStart: function () { + var self = this; + + var def = this._rpc({ + model: 'hr.attendance', + method: 'gather_attendance_work_types', + args: []}) + .then(function (res) { + self.work_types = res; + }); + + return Promise.all([def, this._super.apply(this, arguments)]); + }, + + update_attendance: function (type) { + var self = this; + this._rpc({ + model: 'hr.employee', + method: 'attendance_manual', + args: [[self.employee.id], 'hr_attendance.hr_attendance_action_my_attendances', false, type], + }) + .then(function(result) { + if (result.action) { + self.do_action(result.action); + } else if (result.warning) { + self.do_warn(result.warning); + } + }); + }, +}); + +core.action_registry.add('hr_attendance_my_attendances', MyTypedAttendances); + +return MyTypedAttendances; + +}); \ No newline at end of file diff --git a/hr_attendance_work_entry/static/src/scss/hr_attendances.scss b/hr_attendance_work_entry/static/src/scss/hr_attendances.scss new file mode 100644 index 00000000..308412de --- /dev/null +++ b/hr_attendance_work_entry/static/src/scss/hr_attendances.scss @@ -0,0 +1,31 @@ +.o_hr_attendance_sign_in_out_icon { + cursor: pointer; + border-radius: .1em; + box-shadow: inset 0 -3px 0 fade-out(black, 0.7); + + &.btn-secondary:hover { + color: $o-brand-primary; + } +} + +#oe_hr_attendance_status { + color: $o-brand-secondary; + + &.oe_hr_attendance_status_blue { + color: theme-color('info'); + } + + &.oe_hr_attendance_status_orange { + color: theme-color('warning'); + } +} + +.o_hr_attendance_kiosk_mode p.o_hr_attendance_continue { + margin-bottom: 0; + text-align: center; + font-weight: bold; +} + +.o_hr_attendance_pin_pad_button_work { + font-size: 0.9em; +} diff --git a/hr_attendance_work_entry/static/src/xml/hr_attendance.xml b/hr_attendance_work_entry/static/src/xml/hr_attendance.xml new file mode 100644 index 00000000..e356c106 --- /dev/null +++ b/hr_attendance_work_entry/static/src/xml/hr_attendance.xml @@ -0,0 +1,134 @@ + + + + + +
+ + + +
+ +
+

+

Welcome! + Want to check out?

+

Today's work hours:

+
+
+ +
+ + + +

+ Or, continue working as: +

+ + + + + + + +
+ +
+
+
+ + Warning : Your user should be linked to an employee to use attendance. Please contact your administrator. + +
+ +
+
+ + + +