From 2a6797162ebf1410a5f1923a8331eb96b1715655 Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Mon, 7 Apr 2025 16:20:21 +0530 Subject: [PATCH] [FIX] : Apr 7 Bug Fixed 'odoo_google_contact_integration' --- .../__manifest__.py | 2 +- .../doc/RELEASE_NOTES.md | 1 + .../models/res_company.py | 14 +- .../description/assets/icons/whatsapp.svg | 14 ++ .../static/description/index.html | 154 ++++++++++++++++-- 5 files changed, 169 insertions(+), 16 deletions(-) create mode 100644 odoo_google_contact_integration/static/description/assets/icons/whatsapp.svg diff --git a/odoo_google_contact_integration/__manifest__.py b/odoo_google_contact_integration/__manifest__.py index 776bf4b2d..44775625c 100644 --- a/odoo_google_contact_integration/__manifest__.py +++ b/odoo_google_contact_integration/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################### { 'name': "Google Contact Connector", - 'version': '18.0.1.0.0', + 'version': '18.0.1.0.1', "category": "Extra Tools", 'summary': """Synchronize Google Contacts (Import/Export).""", 'description': 'The Google Contact Connector module helps you import Google' diff --git a/odoo_google_contact_integration/doc/RELEASE_NOTES.md b/odoo_google_contact_integration/doc/RELEASE_NOTES.md index 2067bfd13..719825dd3 100644 --- a/odoo_google_contact_integration/doc/RELEASE_NOTES.md +++ b/odoo_google_contact_integration/doc/RELEASE_NOTES.md @@ -3,3 +3,4 @@ #### Version 18.0.1.0.0 #### ADD - Initial commit for Google Contact Connector +- Fixed the issue of default country and state assignment during contact import \ No newline at end of file diff --git a/odoo_google_contact_integration/models/res_company.py b/odoo_google_contact_integration/models/res_company.py index d621e63f7..0b2b3d489 100644 --- a/odoo_google_contact_integration/models/res_company.py +++ b/odoo_google_contact_integration/models/res_company.py @@ -148,9 +148,17 @@ class ResCompany(models.Model): [("name", 'ilike', state)], limit=1) state_id = state.id if state else False country_code = addresses.get('countryCode', '') - country = self.env['res.country'].search( - [('code', 'ilike', country_code)], limit=1) - country_id = country.id if country else False + + if addresses: + if country_code: + country_record = self.env['res.country'].search([('code', 'ilike', country_code)], limit=1) + country_id = country_record.id if country_record else False + else: + country_id = False + else: + state_id = False + country_id = False + partner_vals = { 'name': name or '', 'first_name': first_name or '', diff --git a/odoo_google_contact_integration/static/description/assets/icons/whatsapp.svg b/odoo_google_contact_integration/static/description/assets/icons/whatsapp.svg new file mode 100644 index 000000000..bba9ca395 --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/icons/whatsapp.svg @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/odoo_google_contact_integration/static/description/index.html b/odoo_google_contact_integration/static/description/index.html index 9a0831e4a..eae1c7c18 100644 --- a/odoo_google_contact_integration/static/description/index.html +++ b/odoo_google_contact_integration/static/description/index.html @@ -85,26 +85,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
-
- Community -
-
- Enterprise -
-
- Odoo.sh + + +
+
+
+
+
+
+ +
+ Supports: +
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+ Availability: +
+ On Premise +
+
+ Odoo Online +
+
+ Odoo.sh +
+
+
+
+
+
@@ -1171,6 +1271,36 @@ role="tabpanel">
+
+

+ Latest Release 18.0.1.0.1 +

+ + 7th April, 2025 + +
+
+
+
+
+ Updt +
+
+
+
    +
  • + Fixed the issue of default country and state assignment during contact import +
  • + +
+
+
+
+
+
+
+

Latest Release 18.0.1.0.0