This commit is contained in:
gsinghpal
2026-04-12 09:09:50 -04:00
parent d07159b9b5
commit be611876ad
470 changed files with 41761 additions and 51 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Fusion Claims',
'version': '19.0.8.0.5',
'version': '19.0.8.0.6',
'category': 'Sales',
'summary': 'Complete ADP Claims Management with Dashboard, Sales Integration, Billing Automation, and Two-Stage Verification.',
'description': """

View File

@@ -7,6 +7,7 @@ import { FormController } from "@web/views/form/form_controller";
import { useService } from "@web/core/utils/hooks";
import { onMounted, onWillUnmount } from "@odoo/owl";
import { patch } from "@web/core/utils/patch";
import { registry } from "@web/core/registry";
// Store for autocomplete instances and services
let googleMapsLoaded = false;
@@ -55,6 +56,18 @@ async function loadGoogleMapsApi(apiKey) {
});
}
/**
* Check if the Odoo Enterprise google_address_autocomplete module is installed and active.
* When active, its field widget handles res.partner street autocomplete — we skip ours.
*/
function isOdooAddressAutocompleteActive() {
try {
return registry.category("fields").contains("google_address_autocomplete");
} catch {
return false;
}
}
/**
* Get API key from Odoo config
*/
@@ -639,7 +652,14 @@ function initCompanyAutocomplete(input, formModel) {
*/
async function setupPartnerAutocomplete(el, model, orm) {
globalOrm = orm;
// If the Odoo Enterprise google_address_autocomplete widget is active,
// it handles res.partner street autocomplete — skip our custom implementation.
if (isOdooAddressAutocompleteActive()) {
console.log('[GooglePlaces] Odoo Google Address Autocomplete detected — skipping custom partner autocomplete');
return;
}
const apiKey = await getGoogleMapsApiKey(orm);
if (!apiKey) {
console.log('[GooglePlaces] API key not configured');
@@ -1027,6 +1047,7 @@ function initSimpleAddressAutocomplete(input) {
* Works for res.users (x_fc_start_address) and res.config.settings (fc_technician_start_address).
*/
async function setupSimpleAddressFields(el, orm) {
if (!el) return; // guard against null rootRef.el from observer callbacks firing after unmount
const apiKey = await getGoogleMapsApiKey(orm);
if (!apiKey) return;
try { await loadGoogleMapsApi(apiKey); } catch (e) { return; }
@@ -1252,6 +1273,9 @@ function _startDialogWatcher(orm) {
* Check all open dialogs for partner address forms
*/
function _checkDialogsForPartnerForms() {
// Enterprise widget handles dialogs via its own widget — skip ours
if (isOdooAddressAutocompleteActive()) return;
// Get all visible modals/dialogs
const modals = document.querySelectorAll(
'.o_dialog, .modal, .o_FormViewDialog, [role="dialog"]'