Files
Odoo-Modules/fix_po_vendor_models.sql
gsinghpal c66bdf5089 changes
2026-04-03 15:45:18 -04:00

106 lines
9.0 KiB
PL/PgSQL

BEGIN;
-- ============================================================
-- Partner-mapping reconciliation models for PO vendors
-- These auto-assign the vendor to the bank line so the payment
-- appears on the vendor's account. When the bill is posted from
-- the PO, the payment shows up as "outstanding credit" on the bill.
-- ============================================================
-- Access BDD / TK Access Solutions (partner 6895)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Access BDD / TK Access"}', 1, 'auto_reconcile', 'contains', 'TK ACCESS', 6895, false, 200, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Access BDD - Storage"}', 1, 'auto_reconcile', 'contains', 'access storage', 6895, false, 201, true, 2, 2, NOW(), NOW());
-- Blake Medical (partner 4944)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Blake Medical"}', 1, 'auto_reconcile', 'contains', 'blake medical', 4944, false, 202, true, 2, 2, NOW(), NOW());
-- Drive Medical (partner 15)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Drive Medical"}', 1, 'auto_reconcile', 'contains', 'DRIVE MEDICAL', 15, false, 203, true, 2, 2, NOW(), NOW());
-- Evolution Technologies (partner 4962)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Evolution Technologies"}', 1, 'auto_reconcile', 'contains', 'Evolution Tech', 4962, false, 204, true, 2, 2, NOW(), NOW());
-- HumanCare Canada (partner 4976)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "HumanCare Canada"}', 1, 'auto_reconcile', 'contains', 'HumanCare', 4976, false, 205, true, 2, 2, NOW(), NOW());
-- Sunrise Medical (partner 42)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Sunrise Medical"}', 1, 'auto_reconcile', 'contains', 'Sunrise Medical', 42, false, 206, true, 2, 2, NOW(), NOW());
-- East Penn Canada (partner 4959)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "East Penn Canada"}', 1, 'auto_reconcile', 'contains', 'EAST PENN', 4959, false, 207, true, 2, 2, NOW(), NOW());
-- Invacare Canada (partner 24)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Invacare Canada"}', 1, 'auto_reconcile', 'contains', 'Invacare', 24, false, 208, true, 2, 2, NOW(), NOW());
-- Joerns Healthcare (partner 25)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Joerns Healthcare"}', 1, 'auto_reconcile', 'contains', 'joerns', 25, false, 209, true, 2, 2, NOW(), NOW());
-- Nighthawk Manufacturing (partner 4998)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Nighthawk Manufacturing"}', 1, 'auto_reconcile', 'contains', 'NIGHTHAWK', 4998, false, 210, true, 2, 2, NOW(), NOW());
-- Savaria Concord (partner 6864)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Savaria Concord Lifts"}', 1, 'auto_reconcile', 'contains', 'SAVARIA', 6864, false, 211, true, 2, 2, NOW(), NOW());
-- Parsons ADL (partner 5001)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Parsons ADL"}', 1, 'auto_reconcile', 'contains', 'PARSONS', 5001, false, 212, true, 2, 2, NOW(), NOW());
-- Cardinal Health (partner 4948)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Cardinal Health"}', 1, 'auto_reconcile', 'contains', 'Cardinal Health', 4948, false, 213, true, 2, 2, NOW(), NOW());
-- HPU Rehab / HPU Medical (partner 5137)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "HPU Rehab"}', 1, 'auto_reconcile', 'contains', 'hpu medical', 5137, false, 214, true, 2, 2, NOW(), NOW());
-- Interstate Batteries (partner 6200)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Interstate Batteries"}', 1, 'auto_reconcile', 'contains', 'INTERSTATE', 6200, false, 215, true, 2, 2, NOW(), NOW());
-- Standers Inc (partner 5014)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Standers Inc"}', 1, 'auto_reconcile', 'contains', 'STANDERS', 5014, false, 216, true, 2, 2, NOW(), NOW());
-- Handicare / Accessibility Canada (partner 5588)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Handicare Canada"}', 1, 'auto_reconcile', 'contains', 'handicare', 5588, false, 217, true, 2, 2, NOW(), NOW());
-- Mobb Healthcare (partner 4994)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Mobb Healthcare"}', 1, 'auto_reconcile', 'contains', 'Mobb Healthcare', 4994, false, 218, true, 2, 2, NOW(), NOW());
-- Healthcraft Products (partner 4973)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Healthcraft Products"}', 1, 'auto_reconcile', 'contains', 'HEALTHCRAFT', 4973, false, 219, true, 2, 2, NOW(), NOW());
-- Medline Canada (partner 28)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Medline Canada"}', 1, 'auto_reconcile', 'contains', 'MEDLINE', 28, false, 220, true, 2, 2, NOW(), NOW());
-- Carex Health Brands (partner 6779)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Carex Health"}', 1, 'auto_reconcile', 'contains', 'CAREX HEALTH', 6779, false, 221, true, 2, 2, NOW(), NOW());
-- Advanced Mobility Systems (partner 5158)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Advanced Mobility Systems"}', 1, 'auto_reconcile', 'contains', 'advanced mobility', 5158, false, 222, true, 2, 2, NOW(), NOW());
-- Enhance Mobility (partner 6745)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, mapped_partner_id, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Enhance Mobility"}', 1, 'auto_reconcile', 'contains', 'ENHANCE MOBILITY', 6745, false, 223, true, 2, 2, NOW(), NOW());
COMMIT;