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 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +