Operators now drop a .docx or .pdf Fischerscope XDAL 600 export
on the cert form's Thickness Report tab. The wizard parses the
readings, calibration std, operator + date metadata, and the
embedded microscope image, then shows them for review before
recording on fp.certificate.
Operator Wizard Certificate
─────────────────────────────────────────────────────────────
Click "Upload Parse .docx / - thickness_reading_ids
Thickness .pdf → written (3 rows)
Report" Show 3 readings - x_fc_local_thickness
Pick file + metadata _pdf attached (original
Click Parse Click Save file)
- microscope image as
ir.attachment on cert
- chatter post
─────────────────────────────────────────────────────────────
When parse can't find readings (unrecognised format), wizard falls
through to manual state — operator can still save, file lands on
the cert as-is for the existing CoC page-2 merge logic.
Closes the gap in the S19 enforcement: x_fc_send_thickness_report
customers blocked at action_issue until the file is on file. Now
they have a parseable upload UX, not just a bare Binary field.
Architecture
- fischerscope_parser.py: pure-Python lib, branches on extension,
python-docx + PyPDF2 already on entech (no new deps). Regex
extraction returns {readings, metadata, image, errors}.
- fp.thickness.upload.wizard: TransientModel with upload/review/
manual states. Lazy-imports parser at action_parse time to dodge
Python 3.11 partial-init relative-import error.
- 27 tests (TestFischerscopeParser 9 + TestThicknessUploadWizard 8
+ the rehoused TestActionIssueGates 10) — all green on entech.
Same metadata copies onto every reading row, microscope image
attaches once at cert level (decisions 2026-05-19).
Drive-by fixes uncovered while running tests on entech:
- fp.certificate.action_issue: guard rec.company_id access with
field-existence check. Lazy-fill-signer branch crashed when
certified_by_id was unset on certs that don't carry a company_id
field. Pre-existing bug that never fired in production because
jobs auto-fill certified_by_id before reaching this branch.
- test_action_issue_gates: set x_fc_send_thickness_report=False on
the test partner. Field defaults to True so every cert in this
class hit the thickness gate; tests were never able to verify
the other gates in isolation.
- Tests directory missing test_action_issue_gates.py on entech.
Synced; turns out the 2026-05-18 "changes" commit added the file
locally but the deploy script never copied tests/.
Module: fusion_plating_certificates 19.0.6.4.0 → 19.0.7.0.0
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
| 1 | id | name | model_id:id | group_id:id | perm_read | perm_write | perm_create | perm_unlink |
|---|---|---|---|---|---|---|---|---|
| 2 | access_fp_certificate_operator | fp.certificate.operator | model_fp_certificate | fusion_plating.group_fusion_plating_operator | 1 | 0 | 0 | 0 |
| 3 | access_fp_certificate_supervisor | fp.certificate.supervisor | model_fp_certificate | fusion_plating.group_fusion_plating_supervisor | 1 | 1 | 1 | 0 |
| 4 | access_fp_certificate_manager | fp.certificate.manager | model_fp_certificate | fusion_plating.group_fusion_plating_manager | 1 | 1 | 1 | 1 |
| 5 | access_fp_thickness_reading_operator | fp.thickness.reading.operator | model_fp_thickness_reading | fusion_plating.group_fusion_plating_operator | 1 | 0 | 0 | 0 |
| 6 | access_fp_thickness_reading_supervisor | fp.thickness.reading.supervisor | model_fp_thickness_reading | fusion_plating.group_fusion_plating_supervisor | 1 | 1 | 1 | 0 |
| 7 | access_fp_thickness_reading_manager | fp.thickness.reading.manager | model_fp_thickness_reading | fusion_plating.group_fusion_plating_manager | 1 | 1 | 1 | 1 |
| 8 | access_fp_cert_void_wiz_sup | fp.cert.void.wiz.supervisor | model_fp_cert_void_wizard | fusion_plating.group_fusion_plating_supervisor | 1 | 1 | 1 | 1 |
| 9 | access_fp_cert_void_wiz_mgr | fp.cert.void.wiz.manager | model_fp_cert_void_wizard | fusion_plating.group_fusion_plating_manager | 1 | 1 | 1 | 1 |
| 10 | access_fp_thickness_upload_wiz_sup | fp.thickness.upload.wiz.supervisor | model_fp_thickness_upload_wizard | fusion_plating.group_fusion_plating_supervisor | 1 | 1 | 1 | 1 |
| 11 | access_fp_thickness_upload_wiz_mgr | fp.thickness.upload.wiz.manager | model_fp_thickness_upload_wizard | fusion_plating.group_fusion_plating_manager | 1 | 1 | 1 | 1 |
| 12 | access_fp_thickness_upload_wiz_line_sup | fp.thickness.upload.wiz.line.supervisor | model_fp_thickness_upload_wizard_line | fusion_plating.group_fusion_plating_supervisor | 1 | 1 | 1 | 1 |
| 13 | access_fp_thickness_upload_wiz_line_mgr | fp.thickness.upload.wiz.line.manager | model_fp_thickness_upload_wizard_line | fusion_plating.group_fusion_plating_manager | 1 | 1 | 1 | 1 |