folder rename

This commit is contained in:
gsinghpal
2026-04-16 20:53:53 -04:00
parent 3f3ddcbab4
commit 7c7ef06057
634 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
# Fusion Plating — E-Sign Bridge (EE)
**Enterprise-only bridge module.** Wires `fusion_plating_quality` into Odoo EE `sign`
so customer CoC (Certificate of Conformance) acceptance can be captured as a
legally-binding e-signature.
Copyright © 2026 Nexa Systems Inc.
License: OPL-1
## Behaviour
| Trigger | Result |
|---|---|
| Install both `fusion_plating_quality` and EE `sign` | This bridge auto-installs |
| Install only the CE stack | This module is never discovered — `depends: sign` hides it |
| FAIR reaches state `approved` | "Send for Customer Signature" button appears in the header |
| Customer completes signature in Sign | `sign.request.state` flips; bridge preserves back-reference |
## What it adds
On `fusion.plating.fair`:
- `x_fc_sign_request_id` — M2o `sign.request` (the generated signing envelope)
- `x_fc_sign_request_state` — related display of signing progress
- `x_fc_signed_date`, `x_fc_signed_by`, `x_fc_signed_pdf_id` — final artefact
- Header buttons: Send for Customer Signature / View Sign Request / Download Signed PDF
- E-Signature notebook page on the FAIR form
## What it does NOT do
- Sync Sign status back into the FAIR automatically on every change. The EE sign
module fires its own activities; this bridge only stores the back-reference and
lets users navigate. A customer-delivered callback wiring `sign.request` state
changes back onto FAIR is a future enhancement.
- Work on Community Edition. By design.
## Install
When you add EE `sign` to a site that already runs `fusion_plating_quality`, the
bridge appears with `auto_install=True` and loads on the next update:
```bash
docker exec odoo-dev-app odoo -d fusion-dev -u base --stop-after-init
```

View File

@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from . import models

View File

@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
{
'name': 'Fusion Plating — E-Sign Bridge (EE)',
'version': '19.0.1.0.0',
'category': 'Manufacturing/Plating',
'summary': 'Enterprise bridge: wires Fusion Plating FAIR into Odoo EE Sign for '
'legally-binding customer CoC acceptance. Auto-installs when Sign '
'and fusion_plating_quality are both present.',
'description': """
Fusion Plating — E-Sign Bridge
==============================
Enterprise bridge module.
When Odoo Enterprise ``sign`` and ``fusion_plating_quality`` are both installed,
this bridge installs automatically and adds:
* "Send for Customer Signature" button on approved FAIR records
* Linked ``sign.request`` state displayed on the FAIR form
* Signed PDF attachment preservation and quick-view action
This module never installs on Community Edition — it depends on the EE
``sign`` module. Safe to ship in the product bundle; simply won't activate
where ``sign`` is unavailable.
""",
'author': 'Nexa Systems Inc.',
'website': 'https://www.nexasystems.ca',
'maintainer': 'Nexa Systems Inc.',
'support': 'support@nexasystems.ca',
'license': 'OPL-1',
'price': 0.00,
'currency': 'CAD',
'depends': [
'fusion_plating_quality',
'sign',
],
'data': [
'security/ir.model.access.csv',
'views/fp_fair_views.xml',
],
'assets': {
'web.assets_backend': [
'fusion_plating_bridge_sign/static/src/scss/fusion_plating_bridge_sign.scss',
],
},
'installable': True,
'application': False,
'auto_install': True,
}

View File

@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from . import fp_fair

View File

@@ -0,0 +1,119 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import _, api, fields, models
class FpFair(models.Model):
"""Bridge-level extension of FAIR: link to an Odoo EE sign.request.
Installs only when the Enterprise ``sign`` module and
``fusion_plating_quality`` are both present. Adds a header button to
send a FAIR for customer e-signature, stores the back-reference to
the generated sign.request, and preserves the final signed PDF.
"""
_inherit = 'fusion.plating.fair'
x_fc_sign_request_id = fields.Many2one(
'sign.request',
string='Sign Request',
copy=False,
readonly=True,
help='Odoo EE Sign request created when this FAIR was sent for '
'customer acceptance. One sign.request per FAIR.',
)
x_fc_sign_request_state = fields.Selection(
related='x_fc_sign_request_id.state',
string='Signature State',
readonly=True,
)
x_fc_signed_date = fields.Datetime(
string='Signed On',
copy=False,
readonly=True,
help='Datetime when the customer completed signing.',
)
x_fc_signed_by = fields.Char(
string='Signed By',
copy=False,
readonly=True,
)
x_fc_signed_pdf_id = fields.Many2one(
'ir.attachment',
string='Signed PDF',
copy=False,
readonly=True,
help='Final signed PDF stored as an attachment on this FAIR.',
)
# ==========================================================================
# Actions
# ==========================================================================
def action_send_for_signature(self):
"""Open the EE sign.send.request wizard pre-filled with this FAIR.
The wizard expects a ``default_attachment_ids`` context with the
PDF to sign. We pass the FAIR's existing attachments (e.g. an
AS9102 Form 3 if fusion_plating_aerospace is installed) or let
the user upload one inside the wizard.
"""
self.ensure_one()
if self.state != 'approved':
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': _('FAIR not approved'),
'message': _(
'Only approved FAIRs can be sent for customer '
'signature. Mark the FAIR as Approved first.'
),
'type': 'warning',
'sticky': False,
},
}
# Gather attachments linked to this FAIR via chatter
attachment_ids = self.env['ir.attachment'].search([
('res_model', '=', self._name),
('res_id', '=', self.id),
]).ids
ctx = dict(self.env.context, default_attachment_ids=attachment_ids)
if self.customer_id:
ctx['default_signer_ids'] = [(0, 0, {'partner_id': self.customer_id.id})]
return {
'name': _('Send %s for Customer Signature') % self.name,
'type': 'ir.actions.act_window',
'res_model': 'sign.send.request',
'view_mode': 'form',
'target': 'new',
'context': ctx,
}
def action_view_signed_document(self):
"""Open the signed PDF attachment in a new browser tab."""
self.ensure_one()
if not self.x_fc_signed_pdf_id:
return False
return {
'type': 'ir.actions.act_url',
'url': '/web/content/%s?download=true' % self.x_fc_signed_pdf_id.id,
'target': 'new',
}
def action_view_sign_request(self):
"""Open the underlying sign.request record."""
self.ensure_one()
if not self.x_fc_sign_request_id:
return False
return {
'type': 'ir.actions.act_window',
'res_model': 'sign.request',
'res_id': self.x_fc_sign_request_id.id,
'view_mode': 'form',
'target': 'current',
}

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_fp_bridge_sign_request_read,fp.bridge.sign.request.read,sign.model_sign_request,fusion_plating.group_fusion_plating_manager,1,0,0,0
access_fp_bridge_sign_request_supervisor_read,fp.bridge.sign.request.supervisor.read,sign.model_sign_request,fusion_plating.group_fusion_plating_supervisor,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_fp_bridge_sign_request_read fp.bridge.sign.request.read sign.model_sign_request fusion_plating.group_fusion_plating_manager 1 0 0 0
3 access_fp_bridge_sign_request_supervisor_read fp.bridge.sign.request.supervisor.read sign.model_sign_request fusion_plating.group_fusion_plating_supervisor 1 0 0 0

View File

@@ -0,0 +1,43 @@
// =============================================================================
// Fusion Plating — E-Sign Bridge (EE)
// Copyright 2026 Nexa Systems Inc.
// License OPL-1 (Odoo Proprietary License v1.0)
//
// Theme-aware: uses Bootstrap/Odoo CSS custom properties so light and dark
// modes both render correctly without duplication. No hex codes, no
// prefers-color-scheme overrides.
// =============================================================================
.o_fp_signed_badge {
// Only when the signature is complete does the badge tint green.
&[data-value="signed"],
&[data-value="done"] {
background-color: color-mix(in srgb, var(--bs-success) 12%, transparent);
color: var(--bs-success);
border: 1px solid color-mix(in srgb, var(--bs-success) 35%, transparent);
}
// In-progress (sent to signer) — amber tint.
&[data-value="sent"],
&[data-value="shared"] {
background-color: color-mix(in srgb, var(--bs-warning) 12%, transparent);
color: var(--bs-warning);
border: 1px solid color-mix(in srgb, var(--bs-warning) 35%, transparent);
}
// Cancelled / expired — grey tint from the secondary token.
&[data-value="canceled"],
&[data-value="expired"] {
background-color: color-mix(in srgb, var(--bs-secondary-color) 12%, transparent);
color: var(--bs-secondary-color);
border: 1px solid color-mix(in srgb, var(--bs-secondary-color) 35%, transparent);
}
}
.o_fp_pending_signature {
background-color: color-mix(in srgb, var(--bs-warning) 10%, transparent);
color: var(--bs-warning);
border-left: 3px solid var(--bs-warning);
padding: 8px 12px;
border-radius: 6px;
}

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<!--
Extend the quality module's FAIR form to add e-signature controls.
Inherits `fusion_plating_quality.view_fp_fair_form`.
-->
<record id="view_fp_fair_form_bridge_sign" model="ir.ui.view">
<field name="name">fp.fair.form.bridge.sign</field>
<field name="model">fusion.plating.fair</field>
<field name="inherit_id" ref="fusion_plating_quality.view_fp_fair_form"/>
<field name="arch" type="xml">
<!-- Header buttons -->
<xpath expr="//header" position="inside">
<button name="action_send_for_signature"
string="Send for Customer Signature"
type="object"
class="btn-primary"
invisible="state != 'approved' or x_fc_sign_request_id"/>
<button name="action_view_sign_request"
string="View Sign Request"
type="object"
invisible="not x_fc_sign_request_id"/>
<button name="action_view_signed_document"
string="Download Signed PDF"
type="object"
class="btn-success"
invisible="not x_fc_signed_pdf_id"/>
</xpath>
<!-- E-Signature notebook page -->
<xpath expr="//sheet//notebook" position="inside">
<page string="E-Signature" name="esignature"
invisible="not x_fc_sign_request_id and not x_fc_signed_pdf_id">
<group>
<group string="Request">
<field name="x_fc_sign_request_id" readonly="1"/>
<field name="x_fc_sign_request_state" readonly="1"
widget="badge"
class="o_fp_signed_badge"/>
</group>
<group string="Completion">
<field name="x_fc_signed_date" readonly="1"/>
<field name="x_fc_signed_by" readonly="1"/>
<field name="x_fc_signed_pdf_id" readonly="1"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
</odoo>