From 1b473a78737009326da66b45002dba04233bfc24 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Mon, 25 May 2026 17:02:18 -0400 Subject: [PATCH] fix(tablet_pin_reset): manifest data slot + drop notif wrapper (deploy fixes) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two bugs caught by entech battle test on first deploy: 1. Manifest entry landed in the 'demo' list instead of 'data' because my anchor (fp_demo_shopfloor_data.xml) was already in 'demo' — the entry pattern-matched into the wrong section. Demo data doesn't load on entech (no --load demo), so the mail.template never existed. Moved fp_tablet_pin_reset_template.xml to 'data'. 2. The fp.notification.template wrapper record referenced a model that doesn't exist until fusion_plating_notifications loads; fusion_plating_shopfloor doesn't depend on notifications, so the data load ParseError'd. Removed the wrapper — the controller calls mail_template.send_mail() directly anyway, not via the notification dispatcher. Added an inline comment explaining why the wrapper isn't here. Battle test updated to drop the (now removed) wrapper xmlid check. Battle test ALL PASS on entech after fixes. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../fusion_plating_shopfloor/__manifest__.py | 2 +- .../data/fp_tablet_pin_reset_template.xml | 16 +++++++++------- .../scripts/bt_pin_reset.py | 9 +-------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/fusion_plating/fusion_plating_shopfloor/__manifest__.py b/fusion_plating/fusion_plating_shopfloor/__manifest__.py index e0252d35..fd3f576f 100644 --- a/fusion_plating/fusion_plating_shopfloor/__manifest__.py +++ b/fusion_plating/fusion_plating_shopfloor/__manifest__.py @@ -48,6 +48,7 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved. 'data/fp_tablet_config_data.xml', 'data/fp_tablet_kiosk_user.xml', 'data/fp_tablet_cron.xml', + 'data/fp_tablet_pin_reset_template.xml', 'views/fp_shopfloor_station_views.xml', 'views/res_users_views.xml', 'views/fp_bake_oven_views.xml', @@ -59,7 +60,6 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved. ], 'demo': [ 'data/fp_demo_shopfloor_data.xml', - 'data/fp_tablet_pin_reset_template.xml', ], 'assets': { 'web.assets_backend': [ diff --git a/fusion_plating/fusion_plating_shopfloor/data/fp_tablet_pin_reset_template.xml b/fusion_plating/fusion_plating_shopfloor/data/fp_tablet_pin_reset_template.xml index b3efd578..3ca6da55 100644 --- a/fusion_plating/fusion_plating_shopfloor/data/fp_tablet_pin_reset_template.xml +++ b/fusion_plating/fusion_plating_shopfloor/data/fp_tablet_pin_reset_template.xml @@ -46,13 +46,15 @@ - - - Tablet PIN Reset Code - tablet_pin_reset_requested - - - + diff --git a/fusion_plating/fusion_plating_shopfloor/scripts/bt_pin_reset.py b/fusion_plating/fusion_plating_shopfloor/scripts/bt_pin_reset.py index bfc68f4c..f9d24b61 100644 --- a/fusion_plating/fusion_plating_shopfloor/scripts/bt_pin_reset.py +++ b/fusion_plating/fusion_plating_shopfloor/scripts/bt_pin_reset.py @@ -100,14 +100,7 @@ tpl = env.ref( ) _ok(bool(tpl), 'mail.template fp_mail_template_tablet_pin_reset exists') -# 9. Notification template wrapper exists -notif = env.ref( - 'fusion_plating_shopfloor.fp_notif_tablet_pin_reset', - raise_if_not_found=False, -) -_ok(bool(notif), 'fp.notification.template fp_notif_tablet_pin_reset exists') - -# 10. Cleanup cron exists +# 9. Cleanup cron exists cron = env.ref( 'fusion_plating_shopfloor.cron_purge_expired_pin_resets', raise_if_not_found=False,