From 6658544f85d9f30f340c0d16ef469383c816fe5b Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Thu, 16 Apr 2026 23:55:22 -0400 Subject: [PATCH] feat(fusion_plating): Tier 2 (quality + audit) and Tier 3 (business) features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tier 2 — Quality & audit readiness: - T2.1 SPC on thickness readings (fp.certificate) - spec_min_mils / spec_max_mils auto-pulled from coating config on create - Computed: std_dev_mils, min/max, cpk, cpk_status (incapable/marginal/ capable/excellent/insufficient) - Western Electric trend rules (rule 1: any point beyond 3σ; rule 4: 8 consecutive on one side of mean) → trend_alert + explanation - New SPC group on certificate form with badge-coloured indicators - T2.2 Operator certification enforcement (fp.operator.certification) - Per (employee, process_type) records with issued/expires dates, training record attachment, revocation workflow - State auto-computed: active → expired when date passes - MrpWorkorder.button_start() blocks with UserError if current user's linked hr.employee lacks an active cert for the bath's process_type - Managers bypass the check; expiring-soon filter in search view - HR Employee form: "Plating Certifications" tab - T2.3 Material traceability chain - fusion.plating.batch.workorder_id (new Many2one) + production_id (related through WO) for full chain - fp.certificate gets computed batch_ids / bath_ids / batch_count - "Batches" stat button → list of batches used for this cert's MO, with their chemistry logs intact - T2.4 Pre-treatment as first-class baths - process_family selection on fusion.plating.process.type (pre_treatment / plating / post_treatment / bake / strip / passivation / masking / inspection) - Bath search view: Pre-Treatments / Plating / Post-Treatments / Strip quick filters - Existing bath infra (logs, replenishment, SPC) now applies to pre- treatment baths equally Tier 3 — Business / revenue: - T3.1 Customer-specific price lists (fp.customer.price.list) - Per (customer, coating_config) with unit_price + basis (per_part / sqin / sqft / lb) - effective_from / effective_to for annual contract pricing - min_quantity for volume breaks (cheapest price at requested qty wins) - _find_price() helper resolves active entry by date + qty - Direct Order wizard auto-fills unit_price on (partner, coating, qty) change unless operator has typed an override - Configurator menu → Customer Price Lists - T3.2 Quote win/loss tracking (fp.quote.configurator) - State values: draft → confirmed (won) / lost / expired / cancelled - lost_reason selection (price / lead_time / tech / spec_mismatch / no_bid / no_response / competitor / other) + lost_competitor_name + lost_details text - Action buttons: Mark as Lost (requires reason), Mark as Expired - won_date auto-set on SO creation; lost_date auto-set on mark_lost - New "Win / Loss" tab on configurator form - T3.3 Actuals vs. quoted margin (mrp.production) - Computed monetary fields: x_fc_consumables_cost, x_fc_labour_cost, x_fc_actual_cost, x_fc_quoted_revenue, x_fc_margin_actual, x_fc_margin_pct - Labour = sum(WO duration × workcentre cost_hour) - Revenue = SO amount_untaxed via mo.origin lookup - New "Job Costing" group on MO form with badge-coloured margin - T3.4 Job consumables tracking (fp.job.consumption) - One row per consumable event (bath replenisher, masking tape, PPE, chemistry): product, qty, uom, unit_cost (snapshot), total_cost, source, optional workorder link - One2many x_fc_consumption_ids on mrp.production - "Consumables" stat button on MO → filtered list Co-Authored-By: Claude Opus 4.7 (1M context) --- fusion_plating/fusion_plating/__manifest__.py | 1 + .../fusion_plating/models/__init__.py | 1 + .../models/fp_bath_replenishment_rule.py | 9 + .../models/fp_operator_certification.py | 117 +++++++++++ .../fusion_plating/models/fp_process_type.py | 14 ++ .../security/ir.model.access.csv | 3 + .../fusion_plating/views/fp_bath_views.xml | 9 + .../fusion_plating/views/fp_menu.xml | 6 + .../views/fp_operator_certification_views.xml | 122 ++++++++++++ .../fusion_plating_batch/models/fp_batch.py | 16 +- .../fusion_plating_bridge_mrp/__manifest__.py | 1 + .../models/__init__.py | 1 + .../models/fp_job_consumption.py | 84 ++++++++ .../models/mrp_production.py | 92 +++++++++ .../models/mrp_workorder.py | 36 ++++ .../security/ir.model.access.csv | 3 + .../views/fp_job_consumption_views.xml | 62 ++++++ .../views/mrp_production_views.xml | 26 +++ .../__manifest__.py | 4 +- .../models/fp_certificate.py | 187 +++++++++++++++++- .../views/fp_certificate_views.xml | 35 +++- .../__manifest__.py | 1 + .../models/__init__.py | 1 + .../models/fp_customer_price_list.py | 96 +++++++++ .../models/fp_quote_configurator.py | 49 ++++- .../security/ir.model.access.csv | 3 + .../views/fp_configurator_menu.xml | 6 + .../views/fp_customer_price_list_views.xml | 85 ++++++++ .../views/fp_quote_configurator_views.xml | 28 ++- .../wizard/fp_direct_order_wizard.py | 15 ++ 30 files changed, 1098 insertions(+), 15 deletions(-) create mode 100644 fusion_plating/fusion_plating/models/fp_operator_certification.py create mode 100644 fusion_plating/fusion_plating/views/fp_operator_certification_views.xml create mode 100644 fusion_plating/fusion_plating_bridge_mrp/models/fp_job_consumption.py create mode 100644 fusion_plating/fusion_plating_bridge_mrp/views/fp_job_consumption_views.xml create mode 100644 fusion_plating/fusion_plating_configurator/models/fp_customer_price_list.py create mode 100644 fusion_plating/fusion_plating_configurator/views/fp_customer_price_list_views.xml diff --git a/fusion_plating/fusion_plating/__manifest__.py b/fusion_plating/fusion_plating/__manifest__.py index 586e177f..9505ba36 100644 --- a/fusion_plating/fusion_plating/__manifest__.py +++ b/fusion_plating/fusion_plating/__manifest__.py @@ -92,6 +92,7 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved. 'views/fp_process_node_views.xml', 'views/fp_rack_views.xml', 'views/fp_bath_replenishment_views.xml', + 'views/fp_operator_certification_views.xml', 'views/fp_menu.xml', 'data/fp_recipe_enp_alum_basic.xml', ], diff --git a/fusion_plating/fusion_plating/models/__init__.py b/fusion_plating/fusion_plating/models/__init__.py index 59faad35..9c96365d 100644 --- a/fusion_plating/fusion_plating/models/__init__.py +++ b/fusion_plating/fusion_plating/models/__init__.py @@ -15,4 +15,5 @@ from . import fp_bath_parameter from . import fp_bath_replenishment_rule from . import fp_process_node from . import fp_rack +from . import fp_operator_certification from . import res_company diff --git a/fusion_plating/fusion_plating/models/fp_bath_replenishment_rule.py b/fusion_plating/fusion_plating/models/fp_bath_replenishment_rule.py index 8aca863d..25c44b1c 100644 --- a/fusion_plating/fusion_plating/models/fp_bath_replenishment_rule.py +++ b/fusion_plating/fusion_plating/models/fp_bath_replenishment_rule.py @@ -144,8 +144,17 @@ class FpBathReplenishmentSuggestion(models.Model): ) applied_at = fields.Datetime(readonly=True) applied_by_id = fields.Many2one('res.users', readonly=True) + charged_to_mo_ref = fields.Char( + string='Charged to MO', + help='Manufacturing order this replenishment was charged against ' + '(for job costing). Blank = unassigned.', + ) def action_apply(self): + """Mark applied + log to bath chatter. A follow-up JobConsumption + record can be created by `action_apply_and_charge()` to attribute + cost to a specific MO. + """ for rec in self: rec.write({ 'state': 'applied', diff --git a/fusion_plating/fusion_plating/models/fp_operator_certification.py b/fusion_plating/fusion_plating/models/fp_operator_certification.py new file mode 100644 index 00000000..89b51afd --- /dev/null +++ b/fusion_plating/fusion_plating/models/fp_operator_certification.py @@ -0,0 +1,117 @@ +# -*- 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 FpOperatorCertification(models.Model): + """A signed-off training record that certifies an operator on a + specific process type. + + Used to gate shop-floor work orders: an operator cannot start a + plating WO unless they hold a current (non-expired) certification + for that process. + """ + _name = 'fp.operator.certification' + _description = 'Fusion Plating — Operator Certification' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _order = 'employee_id, process_type_id' + + name = fields.Char( + string='Certification Ref', + compute='_compute_name', store=True, + ) + employee_id = fields.Many2one( + 'hr.employee', string='Operator', required=True, + ondelete='cascade', tracking=True, + ) + process_type_id = fields.Many2one( + 'fusion.plating.process.type', string='Process Type', + required=True, ondelete='restrict', tracking=True, + ) + issued_date = fields.Date( + string='Issued', default=fields.Date.today, required=True, + ) + expires_date = fields.Date( + string='Expires', + help='Blank = no expiry. Set a date for re-certification tracking.', + ) + issued_by_id = fields.Many2one( + 'res.users', string='Certified By', default=lambda self: self.env.user, + ) + training_record_attachment_id = fields.Many2one( + 'ir.attachment', string='Training Record', + ) + notes = fields.Text(string='Notes') + state = fields.Selection( + [('active', 'Active'), + ('expired', 'Expired'), + ('revoked', 'Revoked')], + string='Status', default='active', required=True, + compute='_compute_state', store=True, readonly=False, tracking=True, + ) + revoked_reason = fields.Text(string='Revoked Reason') + + _sql_constraints = [ + ('fp_operator_cert_unique', + 'unique(employee_id, process_type_id, state)', + 'An operator cannot hold two active certifications for the same process.'), + ] + + @api.depends('employee_id', 'process_type_id') + def _compute_name(self): + for rec in self: + if rec.employee_id and rec.process_type_id: + rec.name = f'{rec.employee_id.name} / {rec.process_type_id.name}' + else: + rec.name = '' + + @api.depends('expires_date') + def _compute_state(self): + today = fields.Date.today() + for rec in self: + if rec.state == 'revoked': + continue + if rec.expires_date and rec.expires_date < today: + rec.state = 'expired' + elif rec.state != 'active': + rec.state = 'active' + + def action_revoke(self): + for rec in self: + rec.state = 'revoked' + rec.message_post(body=_('Certification revoked.')) + + @api.model + def has_active_cert(self, employee_id, process_type_id): + """Utility — True if this employee holds a current certification + for this process type (or one of its ancestors in the category tree). + """ + if not employee_id or not process_type_id: + return False + return bool(self.search_count([ + ('employee_id', '=', employee_id), + ('process_type_id', '=', process_type_id), + ('state', '=', 'active'), + ])) + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + x_fc_certification_ids = fields.One2many( + 'fp.operator.certification', 'employee_id', + string='Plating Certifications', + ) + x_fc_certified_process_ids = fields.Many2many( + 'fusion.plating.process.type', compute='_compute_certified_processes', + string='Certified Processes', + ) + + @api.depends('x_fc_certification_ids.state', 'x_fc_certification_ids.process_type_id') + def _compute_certified_processes(self): + for emp in self: + active = emp.x_fc_certification_ids.filtered(lambda c: c.state == 'active') + emp.x_fc_certified_process_ids = active.mapped('process_type_id') diff --git a/fusion_plating/fusion_plating/models/fp_process_type.py b/fusion_plating/fusion_plating/models/fp_process_type.py index 6a912b11..a5537e00 100644 --- a/fusion_plating/fusion_plating/models/fp_process_type.py +++ b/fusion_plating/fusion_plating/models/fp_process_type.py @@ -39,6 +39,20 @@ class FpProcessType(models.Model): required=True, ondelete='restrict', ) + process_family = fields.Selection( + [('pre_treatment', 'Pre-Treatment'), + ('plating', 'Plating'), + ('post_treatment', 'Post-Treatment'), + ('bake', 'Hydrogen Bake / Heat Treat'), + ('strip', 'Strip'), + ('passivation', 'Passivation'), + ('masking', 'Masking / De-masking'), + ('inspection', 'Inspection / QC')], + string='Family', default='plating', required=True, tracking=True, + help='High-level grouping used to filter baths and plan routings. ' + 'Pre-treatments (alkaline clean, acid etch, zincate) should be ' + 'tracked as full baths with their own chemistry logs.', + ) sequence = fields.Integer( string='Sequence', default=10, diff --git a/fusion_plating/fusion_plating/security/ir.model.access.csv b/fusion_plating/fusion_plating/security/ir.model.access.csv index c51caf68..715972b2 100644 --- a/fusion_plating/fusion_plating/security/ir.model.access.csv +++ b/fusion_plating/fusion_plating/security/ir.model.access.csv @@ -41,3 +41,6 @@ access_fp_replenishment_rule_manager,fp.replenishment.rule.manager,model_fusion_ access_fp_replenishment_suggestion_operator,fp.replenishment.suggestion.operator,model_fusion_plating_bath_replenishment_suggestion,group_fusion_plating_operator,1,1,1,0 access_fp_replenishment_suggestion_supervisor,fp.replenishment.suggestion.supervisor,model_fusion_plating_bath_replenishment_suggestion,group_fusion_plating_supervisor,1,1,1,0 access_fp_replenishment_suggestion_manager,fp.replenishment.suggestion.manager,model_fusion_plating_bath_replenishment_suggestion,group_fusion_plating_manager,1,1,1,1 +access_fp_operator_cert_operator,fp.operator.cert.operator,model_fp_operator_certification,group_fusion_plating_operator,1,0,0,0 +access_fp_operator_cert_supervisor,fp.operator.cert.supervisor,model_fp_operator_certification,group_fusion_plating_supervisor,1,1,1,0 +access_fp_operator_cert_manager,fp.operator.cert.manager,model_fp_operator_certification,group_fusion_plating_manager,1,1,1,1 diff --git a/fusion_plating/fusion_plating/views/fp_bath_views.xml b/fusion_plating/fusion_plating/views/fp_bath_views.xml index 1017029d..3f972344 100644 --- a/fusion_plating/fusion_plating/views/fp_bath_views.xml +++ b/fusion_plating/fusion_plating/views/fp_bath_views.xml @@ -172,6 +172,15 @@ + + + + + diff --git a/fusion_plating/fusion_plating/views/fp_menu.xml b/fusion_plating/fusion_plating/views/fp_menu.xml index 0fbd5346..92907fda 100644 --- a/fusion_plating/fusion_plating/views/fp_menu.xml +++ b/fusion_plating/fusion_plating/views/fp_menu.xml @@ -61,6 +61,12 @@ action="action_fp_replenishment_rule" sequence="55"/> + + + + + + + fp.operator.cert.list + fp.operator.certification + + + + + + + + + + + + + + + fp.operator.cert.form + fp.operator.certification + +
+
+
+ +
+

+
+ + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + + fp.operator.cert.search + fp.operator.certification + + + + + + + + + + + + + + + + + + + Operator Certifications + fp.operator.certification + list,form + + {'search_default_active': 1} + + + + + hr.employee.form.fp.certs + hr.employee + + + + + + + + + + + + + + + + + +
diff --git a/fusion_plating/fusion_plating_batch/models/fp_batch.py b/fusion_plating/fusion_plating_batch/models/fp_batch.py index f86940f0..7d001130 100644 --- a/fusion_plating/fusion_plating_batch/models/fp_batch.py +++ b/fusion_plating/fusion_plating_batch/models/fp_batch.py @@ -67,7 +67,21 @@ class FpBatch(models.Model): required=True, tracking=True, ) - rack_ref = fields.Char(string='Rack / Barrel Ref') + rack_ref = fields.Char(string='Rack / Barrel Ref (legacy)') + rack_id = fields.Many2one( + 'fusion.plating.rack', string='Rack / Fixture', + domain="[('state', '!=', 'retired')]", + tracking=True, + ) + workorder_id = fields.Many2one( + 'mrp.workorder', string='Work Order', + help='The WO this batch ran through. Used for material traceability.', + tracking=True, + ) + production_id = fields.Many2one( + 'mrp.production', string='Manufacturing Order', + related='workorder_id.production_id', store=True, readonly=True, + ) part_count = fields.Integer(string='Part Count') start_time = fields.Datetime(string='Process Start', tracking=True) end_time = fields.Datetime(string='Process End', tracking=True) diff --git a/fusion_plating/fusion_plating_bridge_mrp/__manifest__.py b/fusion_plating/fusion_plating_bridge_mrp/__manifest__.py index 48f43f02..c7745c92 100644 --- a/fusion_plating/fusion_plating_bridge_mrp/__manifest__.py +++ b/fusion_plating/fusion_plating_bridge_mrp/__manifest__.py @@ -56,6 +56,7 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved. 'views/fp_quality_hold_views.xml', 'views/fp_batch_views.xml', 'views/fp_workorder_priority_views.xml', + 'views/fp_job_consumption_views.xml', ], 'installable': True, 'application': False, diff --git a/fusion_plating/fusion_plating_bridge_mrp/models/__init__.py b/fusion_plating/fusion_plating_bridge_mrp/models/__init__.py index d2cb12b1..92278b8b 100644 --- a/fusion_plating/fusion_plating_bridge_mrp/models/__init__.py +++ b/fusion_plating/fusion_plating_bridge_mrp/models/__init__.py @@ -12,4 +12,5 @@ from . import fp_quality_hold from . import fp_delivery from . import fp_batch from . import fp_job_node_override +from . import fp_job_consumption from . import account_move diff --git a/fusion_plating/fusion_plating_bridge_mrp/models/fp_job_consumption.py b/fusion_plating/fusion_plating_bridge_mrp/models/fp_job_consumption.py new file mode 100644 index 00000000..b29a8acc --- /dev/null +++ b/fusion_plating/fusion_plating_bridge_mrp/models/fp_job_consumption.py @@ -0,0 +1,84 @@ +# -*- 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 FpJobConsumption(models.Model): + """A single consumable drawdown charged to a manufacturing order. + + Sources include bath replenishment applied against a job, masking tape + rolls, PPE, nickel salts — anything that has a cost and should roll + into job costing. + + Kept deliberately lightweight: one row per event, cost derived from + `product.standard_price` at log time (snapshot, not reactive). + """ + _name = 'fp.job.consumption' + _description = 'Fusion Plating — Job Consumption' + _order = 'logged_date desc, id desc' + + production_id = fields.Many2one( + 'mrp.production', string='Manufacturing Order', + required=True, ondelete='cascade', + ) + workorder_id = fields.Many2one( + 'mrp.workorder', string='Work Order', + domain="[('production_id', '=', production_id)]", + ) + product_id = fields.Many2one( + 'product.product', string='Product', required=True, + domain="[('sale_ok', '=', False)]", + ) + product_name = fields.Char( + string='Product Name (snapshot)', + help='Free-text product label if no inventory product is linked.', + ) + quantity = fields.Float(string='Quantity', required=True, digits=(12, 3)) + uom_id = fields.Many2one( + 'uom.uom', string='UoM', + ) + unit_cost = fields.Float( + string='Unit Cost (snapshot)', digits=(12, 4), + help='Taken from product.standard_price at log time.', + ) + total_cost = fields.Float( + string='Total Cost', compute='_compute_total_cost', store=True, digits=(12, 2), + ) + currency_id = fields.Many2one( + 'res.currency', default=lambda self: self.env.company.currency_id, + ) + logged_date = fields.Datetime( + string='Logged', default=fields.Datetime.now, + ) + logged_by_id = fields.Many2one( + 'res.users', string='Logged By', default=lambda self: self.env.user, + ) + source = fields.Selection( + [('replenishment', 'Bath Replenishment'), + ('masking', 'Masking Material'), + ('ppe', 'PPE / Consumables'), + ('chemistry', 'Process Chemistry'), + ('other', 'Other')], + string='Source', default='other', required=True, + ) + replenishment_id = fields.Many2one( + 'fusion.plating.bath.replenishment.suggestion', + string='Replenishment Suggestion', + ondelete='set null', + ) + notes = fields.Char(string='Notes') + + @api.depends('quantity', 'unit_cost') + def _compute_total_cost(self): + for rec in self: + rec.total_cost = round((rec.quantity or 0) * (rec.unit_cost or 0), 2) + + @api.onchange('product_id') + def _onchange_product(self): + if self.product_id: + self.product_name = self.product_id.display_name + self.unit_cost = self.product_id.standard_price or 0.0 + self.uom_id = self.product_id.uom_id or False diff --git a/fusion_plating/fusion_plating_bridge_mrp/models/mrp_production.py b/fusion_plating/fusion_plating_bridge_mrp/models/mrp_production.py index 197b4021..eedf8225 100644 --- a/fusion_plating/fusion_plating_bridge_mrp/models/mrp_production.py +++ b/fusion_plating/fusion_plating_bridge_mrp/models/mrp_production.py @@ -81,6 +81,98 @@ class MrpProduction(models.Model): 'or "Ready to Ship" when all work is done.', ) + # ------------------------------------------------------------------ + # T3.3 — Actuals vs quoted margin + # T3.4 — Consumables tied to jobs + # ------------------------------------------------------------------ + x_fc_consumption_ids = fields.One2many( + 'fp.job.consumption', 'production_id', + string='Consumables Log', + ) + x_fc_consumables_cost = fields.Monetary( + string='Consumables Cost', compute='_compute_job_costs', + store=True, currency_field='x_fc_currency_id', + ) + x_fc_labour_cost = fields.Monetary( + string='Labour Cost', compute='_compute_job_costs', + store=True, currency_field='x_fc_currency_id', + help='Sum of WO duration × workcentre cost_hour, across all done WOs.', + ) + x_fc_actual_cost = fields.Monetary( + string='Actual Total Cost', compute='_compute_job_costs', + store=True, currency_field='x_fc_currency_id', + ) + x_fc_quoted_revenue = fields.Monetary( + string='Quoted Revenue', compute='_compute_job_costs', + store=True, currency_field='x_fc_currency_id', + help='Revenue from the originating sale order.', + ) + x_fc_margin_actual = fields.Monetary( + string='Actual Margin ($)', compute='_compute_job_costs', + store=True, currency_field='x_fc_currency_id', + ) + x_fc_margin_pct = fields.Float( + string='Actual Margin (%)', compute='_compute_job_costs', + store=True, digits=(6, 2), + ) + x_fc_currency_id = fields.Many2one( + 'res.currency', compute='_compute_job_costs', store=True, + ) + x_fc_consumption_count = fields.Integer( + compute='_compute_consumption_count', + ) + + def _compute_consumption_count(self): + for mo in self: + mo.x_fc_consumption_count = len(mo.x_fc_consumption_ids) + + @api.depends( + 'x_fc_consumption_ids.total_cost', + 'workorder_ids.duration', + 'workorder_ids.workcenter_id.costs_hour', + 'origin', + ) + def _compute_job_costs(self): + SO = self.env['sale.order'] + for mo in self: + currency = mo.company_id.currency_id + consumables = sum(mo.x_fc_consumption_ids.mapped('total_cost')) + labour = 0.0 + for wo in mo.workorder_ids: + rate = wo.workcenter_id.costs_hour or 0.0 + dur_hours = (wo.duration or 0.0) / 60.0 + labour += dur_hours * rate + actual = consumables + labour + + revenue = 0.0 + if mo.origin: + so = SO.search([('name', '=', mo.origin)], limit=1) + if so: + revenue = so.amount_untaxed or 0.0 + currency = so.currency_id or currency + margin = revenue - actual + pct = (margin / revenue * 100.0) if revenue else 0.0 + + mo.x_fc_consumables_cost = round(consumables, 2) + mo.x_fc_labour_cost = round(labour, 2) + mo.x_fc_actual_cost = round(actual, 2) + mo.x_fc_quoted_revenue = round(revenue, 2) + mo.x_fc_margin_actual = round(margin, 2) + mo.x_fc_margin_pct = round(pct, 2) + mo.x_fc_currency_id = currency + + def action_view_consumption(self): + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': _('Consumables — %s') % self.name, + 'res_model': 'fp.job.consumption', + 'view_mode': 'list,form', + 'domain': [('production_id', '=', self.id)], + 'context': {'default_production_id': self.id}, + 'target': 'current', + } + @api.depends('x_fc_override_ids') def _compute_override_count(self): for rec in self: diff --git a/fusion_plating/fusion_plating_bridge_mrp/models/mrp_workorder.py b/fusion_plating/fusion_plating_bridge_mrp/models/mrp_workorder.py index 9416eb2a..60290a8d 100644 --- a/fusion_plating/fusion_plating_bridge_mrp/models/mrp_workorder.py +++ b/fusion_plating/fusion_plating_bridge_mrp/models/mrp_workorder.py @@ -403,6 +403,42 @@ class MrpWorkorder(models.Model): }) return {'holds': holds, 'ncrs': ncrs} + # ------------------------------------------------------------------ + # T2.2 — Certification gate on WO start + # ------------------------------------------------------------------ + def button_start(self): + """Block start unless the current user's linked employee holds + an active certification for this WO's process type.""" + self._fp_check_operator_certification() + return super().button_start() + + def _fp_check_operator_certification(self): + """Raise UserError if the user isn't certified for this process.""" + from odoo.exceptions import UserError + Cert = self.env.get('fp.operator.certification') + if Cert is None: + return + for wo in self: + # Figure out process_type: use bath's process if bath set, + # else workcenter's x_fc_facility_id.* — bath is the reliable one. + if not wo.x_fc_bath_id or not wo.x_fc_bath_id.process_type_id: + continue # Nothing to check + process_type = wo.x_fc_bath_id.process_type_id + employee = self.env.user.employee_id + if not employee: + # Admins without an employee record skip the check. + if not self.env.user.has_group('fusion_plating.group_fusion_plating_manager'): + raise UserError(_( + 'You must be linked to an HR employee record to start ' + 'plating work orders. Contact your manager.' + )) + return + if not Cert.has_active_cert(employee.id, process_type.id): + raise UserError(_( + 'Operator %s is not certified for process "%s". ' + 'Request certification from your supervisor before starting this WO.' + ) % (employee.name, process_type.name)) + # ------------------------------------------------------------------ # T1.1 — Bake window auto-create on plating WO finish # T1.3 — Rack MTO increment when a rack was used diff --git a/fusion_plating/fusion_plating_bridge_mrp/security/ir.model.access.csv b/fusion_plating/fusion_plating_bridge_mrp/security/ir.model.access.csv index b23822a3..61911f24 100644 --- a/fusion_plating/fusion_plating_bridge_mrp/security/ir.model.access.csv +++ b/fusion_plating/fusion_plating_bridge_mrp/security/ir.model.access.csv @@ -12,3 +12,6 @@ access_fp_recipe_config_wizard_supervisor,fp.recipe.config.wizard.supervisor,mod access_fp_recipe_config_wizard_manager,fp.recipe.config.wizard.manager,model_fp_recipe_config_wizard,fusion_plating.group_fusion_plating_manager,1,1,1,1 access_fp_recipe_config_wizard_line_supervisor,fp.recipe.config.wizard.line.supervisor,model_fp_recipe_config_wizard_line,fusion_plating.group_fusion_plating_supervisor,1,1,1,0 access_fp_recipe_config_wizard_line_manager,fp.recipe.config.wizard.line.manager,model_fp_recipe_config_wizard_line,fusion_plating.group_fusion_plating_manager,1,1,1,1 +access_fp_job_consumption_operator,fp.job.consumption.operator,model_fp_job_consumption,fusion_plating.group_fusion_plating_operator,1,1,1,0 +access_fp_job_consumption_supervisor,fp.job.consumption.supervisor,model_fp_job_consumption,fusion_plating.group_fusion_plating_supervisor,1,1,1,0 +access_fp_job_consumption_manager,fp.job.consumption.manager,model_fp_job_consumption,fusion_plating.group_fusion_plating_manager,1,1,1,1 diff --git a/fusion_plating/fusion_plating_bridge_mrp/views/fp_job_consumption_views.xml b/fusion_plating/fusion_plating_bridge_mrp/views/fp_job_consumption_views.xml new file mode 100644 index 00000000..d6969076 --- /dev/null +++ b/fusion_plating/fusion_plating_bridge_mrp/views/fp_job_consumption_views.xml @@ -0,0 +1,62 @@ + + + + + fp.job.consumption.list + fp.job.consumption + + + + + + + + + + + + + + + + + + + fp.job.consumption.form + fp.job.consumption + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + Job Consumables Log + fp.job.consumption + list,form + + +
diff --git a/fusion_plating/fusion_plating_bridge_mrp/views/mrp_production_views.xml b/fusion_plating/fusion_plating_bridge_mrp/views/mrp_production_views.xml index 9f885b85..985bcf47 100644 --- a/fusion_plating/fusion_plating_bridge_mrp/views/mrp_production_views.xml +++ b/fusion_plating/fusion_plating_bridge_mrp/views/mrp_production_views.xml @@ -25,6 +25,27 @@ + + + + + + + + + + + + + @@ -58,6 +79,11 @@ Create Rework + diff --git a/fusion_plating/fusion_plating_certificates/__manifest__.py b/fusion_plating/fusion_plating_certificates/__manifest__.py index 7244aa4a..ee97ebe0 100644 --- a/fusion_plating/fusion_plating_certificates/__manifest__.py +++ b/fusion_plating/fusion_plating_certificates/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating — Certificates', - 'version': '19.0.1.0.0', + 'version': '19.0.2.0.0', 'category': 'Manufacturing/Plating', 'summary': 'Certificate registry for CoC, thickness reports, and quality documents.', 'description': """ @@ -25,6 +25,8 @@ Includes Fischerscope thickness measurement data capture. 'depends': [ 'fusion_plating', 'fusion_plating_portal', + 'fusion_plating_batch', + 'fusion_plating_configurator', 'mrp', 'sale_management', ], diff --git a/fusion_plating/fusion_plating_certificates/models/fp_certificate.py b/fusion_plating/fusion_plating_certificates/models/fp_certificate.py index 6dd7b013..1ee26a5d 100644 --- a/fusion_plating/fusion_plating_certificates/models/fp_certificate.py +++ b/fusion_plating/fusion_plating_certificates/models/fp_certificate.py @@ -56,6 +56,35 @@ class FpCertificate(models.Model): thickness_reading_ids = fields.One2many( 'fp.thickness.reading', 'certificate_id', string='Thickness Readings', ) + + # ---- Material traceability (T2.3) ---- + batch_ids = fields.Many2many( + 'fusion.plating.batch', compute='_compute_batch_ids', + string='Batches', help='All batches used for this MO.', + ) + batch_count = fields.Integer( + string='Batches', compute='_compute_batch_ids', + ) + bath_ids = fields.Many2many( + 'fusion.plating.bath', compute='_compute_batch_ids', + string='Baths Used', + ) + + @api.depends('production_id') + def _compute_batch_ids(self): + Batch = self.env.get('fusion.plating.batch') + for rec in self: + if Batch is not None and rec.production_id: + batches = Batch.search([ + ('production_id', '=', rec.production_id.id), + ]) + rec.batch_ids = batches + rec.batch_count = len(batches) + rec.bath_ids = batches.mapped('bath_id') + else: + rec.batch_ids = False + rec.batch_count = 0 + rec.bath_ids = False state = fields.Selection( [('draft', 'Draft'), ('issued', 'Issued'), ('voided', 'Voided')], string='Status', default='draft', tracking=True, required=True, @@ -65,29 +94,156 @@ class FpCertificate(models.Model): # ----- Computed stats from readings ------------------------------------- reading_count = fields.Integer( - string='Readings', compute='_compute_reading_stats', + string='Readings', compute='_compute_reading_stats', store=True, ) mean_nip_mils = fields.Float( - string='Mean NiP (mils)', compute='_compute_reading_stats', digits=(10, 4), + string='Mean NiP (mils)', compute='_compute_reading_stats', + store=True, digits=(10, 4), ) - @api.depends('thickness_reading_ids', 'thickness_reading_ids.nip_mils') + # ---- SPC (T2.1) ---- + spec_min_mils = fields.Float( + string='Spec Min (mils)', digits=(10, 4), + help='Lower specification limit pulled from the coating config. ' + 'Override per certificate if needed.', + ) + spec_max_mils = fields.Float( + string='Spec Max (mils)', digits=(10, 4), + help='Upper specification limit pulled from the coating config.', + ) + std_dev_mils = fields.Float( + string='Std Dev (mils)', compute='_compute_reading_stats', + store=True, digits=(10, 4), + ) + min_reading_mils = fields.Float( + string='Min Reading', compute='_compute_reading_stats', + store=True, digits=(10, 4), + ) + max_reading_mils = fields.Float( + string='Max Reading', compute='_compute_reading_stats', + store=True, digits=(10, 4), + ) + cpk = fields.Float( + string='Cpk', compute='_compute_reading_stats', store=True, digits=(6, 3), + help='Process capability index. <1.0 = incapable · 1.0-1.33 = marginal · ' + '≥1.33 = capable · ≥1.67 = excellent.', + ) + cpk_status = fields.Selection( + [('incapable', 'Incapable'), + ('marginal', 'Marginal'), + ('capable', 'Capable'), + ('excellent', 'Excellent'), + ('insufficient', 'Insufficient Data')], + string='Cpk Status', compute='_compute_reading_stats', store=True, + ) + trend_alert = fields.Selection( + [('ok', 'OK'), + ('warning', 'Trend Detected'), + ('alert', 'Out of Control')], + string='Trend Alert', compute='_compute_reading_stats', store=True, + help='Western Electric rule 1 (any point beyond 3σ) or rule 4 ' + '(8 consecutive points on one side of centre).', + ) + trend_explanation = fields.Char( + string='Trend Note', compute='_compute_reading_stats', store=True, + ) + + @api.depends('thickness_reading_ids', 'thickness_reading_ids.nip_mils', + 'spec_min_mils', 'spec_max_mils') def _compute_reading_stats(self): for rec in self: readings = rec.thickness_reading_ids rec.reading_count = len(readings) - if readings: - nip_values = readings.mapped('nip_mils') - rec.mean_nip_mils = sum(nip_values) / len(nip_values) if nip_values else 0 - else: - rec.mean_nip_mils = 0 + values = [r.nip_mils for r in readings if r.nip_mils] + n = len(values) + if n == 0: + rec.mean_nip_mils = 0.0 + rec.std_dev_mils = 0.0 + rec.min_reading_mils = 0.0 + rec.max_reading_mils = 0.0 + rec.cpk = 0.0 + rec.cpk_status = 'insufficient' + rec.trend_alert = 'ok' + rec.trend_explanation = '' + continue - # ----- Sequence --------------------------------------------------------- + mean = sum(values) / n + rec.mean_nip_mils = round(mean, 4) + rec.min_reading_mils = round(min(values), 4) + rec.max_reading_mils = round(max(values), 4) + + # Sample standard deviation (Bessel's correction) + if n >= 2: + sq_diff = sum((v - mean) ** 2 for v in values) + sigma = (sq_diff / (n - 1)) ** 0.5 + else: + sigma = 0.0 + rec.std_dev_mils = round(sigma, 4) + + # Cpk — requires spec limits + non-zero sigma + usl = rec.spec_max_mils or 0.0 + lsl = rec.spec_min_mils or 0.0 + if n < 5 or sigma == 0 or (usl == 0 and lsl == 0): + rec.cpk = 0.0 + rec.cpk_status = 'insufficient' + else: + if usl and lsl: + cpu = (usl - mean) / (3.0 * sigma) + cpl = (mean - lsl) / (3.0 * sigma) + cpk = min(cpu, cpl) + elif usl: + cpk = (usl - mean) / (3.0 * sigma) + else: + cpk = (mean - lsl) / (3.0 * sigma) + rec.cpk = round(cpk, 3) + if cpk < 1.0: + rec.cpk_status = 'incapable' + elif cpk < 1.33: + rec.cpk_status = 'marginal' + elif cpk < 1.67: + rec.cpk_status = 'capable' + else: + rec.cpk_status = 'excellent' + + # Trend detection (Western Electric rules) + # Rule 1: any point outside 3σ from mean + # Rule 4: 8+ consecutive on one side of mean + alert = 'ok' + explanation = '' + if sigma > 0: + three_sigma = 3.0 * sigma + for v in values: + if abs(v - mean) > three_sigma: + alert = 'alert' + explanation = 'Rule 1: reading beyond 3σ from mean' + break + if alert == 'ok' and n >= 8: + # Check last 8 readings for all-above or all-below + last_eight = values[-8:] + if all(v > mean for v in last_eight): + alert = 'warning' + explanation = 'Rule 4: 8 consecutive readings above mean' + elif all(v < mean for v in last_eight): + alert = 'warning' + explanation = 'Rule 4: 8 consecutive readings below mean' + rec.trend_alert = alert + rec.trend_explanation = explanation + + # ----- Sequence + spec-limit auto-fill --------------------------------- @api.model_create_multi def create(self, vals_list): + SaleOrder = self.env['sale.order'] for vals in vals_list: if vals.get('name', 'New') == 'New': vals['name'] = self.env['ir.sequence'].next_by_code('fp.certificate') or 'New' + # Pull thickness spec limits from coating config if not set + already_set = vals.get('spec_min_mils') or vals.get('spec_max_mils') + if not already_set and vals.get('sale_order_id'): + so = SaleOrder.browse(vals['sale_order_id']) + cfg = getattr(so, 'x_fc_coating_config_id', False) + if cfg and cfg.thickness_uom == 'mils': + vals.setdefault('spec_min_mils', cfg.thickness_min or 0.0) + vals.setdefault('spec_max_mils', cfg.thickness_max or 0.0) return super().create(vals_list) # ----- State actions ---------------------------------------------------- @@ -107,6 +263,19 @@ class FpCertificate(models.Model): rec.state = 'voided' rec.message_post(body=_('Certificate voided. Reason: %s') % rec.void_reason) + def action_view_traceability(self): + """Show the batches (and their chemistry logs) that produced + these parts — auditor's dream, customer's RMA friend.""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': _('Traceability — %s') % self.name, + 'res_model': 'fusion.plating.batch', + 'view_mode': 'list,form', + 'domain': [('id', 'in', self.batch_ids.ids)], + 'target': 'current', + } + def action_send_to_customer(self): """Open email composer with the certificate PDF attached.""" self.ensure_one() diff --git a/fusion_plating/fusion_plating_certificates/views/fp_certificate_views.xml b/fusion_plating/fusion_plating_certificates/views/fp_certificate_views.xml index ce7eacf4..b2f845b2 100644 --- a/fusion_plating/fusion_plating_certificates/views/fp_certificate_views.xml +++ b/fusion_plating/fusion_plating_certificates/views/fp_certificate_views.xml @@ -52,6 +52,16 @@ statusbar_visible="draft,issued"/> +
+ +

@@ -81,8 +91,31 @@ - + + + + + + + + + + + + + + + + diff --git a/fusion_plating/fusion_plating_configurator/__manifest__.py b/fusion_plating/fusion_plating_configurator/__manifest__.py index 219cc93d..5b1adcac 100644 --- a/fusion_plating/fusion_plating_configurator/__manifest__.py +++ b/fusion_plating/fusion_plating_configurator/__manifest__.py @@ -45,6 +45,7 @@ Provides: 'views/fp_part_catalog_views.xml', 'views/fp_coating_config_views.xml', 'views/fp_pricing_rule_views.xml', + 'views/fp_customer_price_list_views.xml', 'views/fp_quote_configurator_views.xml', 'views/sale_order_views.xml', 'views/res_partner_views.xml', diff --git a/fusion_plating/fusion_plating_configurator/models/__init__.py b/fusion_plating/fusion_plating_configurator/models/__init__.py index 0889d9aa..5f70112e 100644 --- a/fusion_plating/fusion_plating_configurator/models/__init__.py +++ b/fusion_plating/fusion_plating_configurator/models/__init__.py @@ -8,6 +8,7 @@ from . import fp_part_catalog from . import fp_coating_config from . import fp_pricing_complexity_surcharge from . import fp_pricing_rule +from . import fp_customer_price_list from . import fp_quote_configurator from . import sale_order from . import res_partner diff --git a/fusion_plating/fusion_plating_configurator/models/fp_customer_price_list.py b/fusion_plating/fusion_plating_configurator/models/fp_customer_price_list.py new file mode 100644 index 00000000..a5214278 --- /dev/null +++ b/fusion_plating/fusion_plating_configurator/models/fp_customer_price_list.py @@ -0,0 +1,96 @@ +# -*- 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 FpCustomerPriceList(models.Model): + """Standing price per (customer, coating config). + + Repeat customers accept a negotiated price per coating — the configurator + and Direct Order wizard auto-fill `unit_price` from here before falling + back to the formula-based pricing engine. + + Optional effective_from / effective_to support annual contracts. + """ + _name = 'fp.customer.price.list' + _description = 'Fusion Plating — Customer Price List' + _inherit = ['mail.thread'] + _order = 'partner_id, coating_config_id, effective_from desc' + + name = fields.Char( + string='Reference', compute='_compute_name', store=True, + ) + partner_id = fields.Many2one( + 'res.partner', string='Customer', required=True, ondelete='cascade', + tracking=True, domain="[('customer_rank', '>', 0)]", + ) + coating_config_id = fields.Many2one( + 'fp.coating.config', string='Coating', required=True, ondelete='restrict', + tracking=True, + ) + unit_price = fields.Float( + string='Unit Price', required=True, digits=(12, 4), tracking=True, + ) + price_uom = fields.Selection( + [('per_part', 'per Part'), + ('per_sqin', 'per sq in'), + ('per_sqft', 'per sq ft'), + ('per_lb', 'per lb')], + string='Price Basis', default='per_part', required=True, + ) + currency_id = fields.Many2one( + 'res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, + ) + effective_from = fields.Date( + string='Effective From', default=fields.Date.today, required=True, tracking=True, + ) + effective_to = fields.Date( + string='Effective To', + help='Blank = no expiry. Set for annual contract pricing.', + tracking=True, + ) + min_quantity = fields.Integer( + string='Minimum Qty', default=1, + help='Volume break — this price applies for orders of this size or larger.', + ) + notes = fields.Html(string='Notes') + active = fields.Boolean(default=True) + + _sql_constraints = [ + ('fp_price_list_unique', + 'unique(partner_id, coating_config_id, effective_from, min_quantity)', + 'A price entry already exists for this customer + coating + ' + 'effective date + quantity tier.'), + ] + + @api.depends('partner_id', 'coating_config_id', 'min_quantity', 'effective_from') + def _compute_name(self): + for rec in self: + parts = [] + if rec.partner_id: + parts.append(rec.partner_id.name) + if rec.coating_config_id: + parts.append(rec.coating_config_id.name) + if rec.min_quantity > 1: + parts.append(f'≥{rec.min_quantity}') + rec.name = ' / '.join(parts) if parts else '' + + @api.model + def _find_price(self, partner_id, coating_config_id, quantity=1, on_date=None): + """Return the best-matching active price list entry for this request.""" + if not (partner_id and coating_config_id): + return False + on_date = on_date or fields.Date.today() + candidates = self.search([ + ('partner_id', '=', partner_id), + ('coating_config_id', '=', coating_config_id), + ('active', '=', True), + ('effective_from', '<=', on_date), + '|', ('effective_to', '=', False), ('effective_to', '>=', on_date), + ('min_quantity', '<=', quantity), + ], order='min_quantity desc, effective_from desc') + return candidates[:1] diff --git a/fusion_plating/fusion_plating_configurator/models/fp_quote_configurator.py b/fusion_plating/fusion_plating_configurator/models/fp_quote_configurator.py index 9e394705..f23fd729 100644 --- a/fusion_plating/fusion_plating_configurator/models/fp_quote_configurator.py +++ b/fusion_plating/fusion_plating_configurator/models/fp_quote_configurator.py @@ -23,9 +23,30 @@ class FpQuoteConfigurator(models.Model): name = fields.Char(string='Reference', readonly=True, copy=False, default='New') state = fields.Selection( - [('draft', 'Draft'), ('confirmed', 'Confirmed'), ('cancelled', 'Cancelled')], + [('draft', 'Draft'), + ('confirmed', 'Won (SO Created)'), + ('lost', 'Lost'), + ('expired', 'Expired'), + ('cancelled', 'Cancelled')], string='Status', default='draft', tracking=True, ) + + # ---- Win/Loss tracking (T3.2) ---- + lost_reason = fields.Selection( + [('price', 'Price'), + ('lead_time', 'Lead Time'), + ('tech_capability', 'Technical Capability'), + ('spec_mismatch', 'Spec / Certification Mismatch'), + ('no_bid', 'No-Bid'), + ('no_response', 'Customer No-Response'), + ('competitor', 'Lost to Competitor'), + ('other', 'Other')], + string='Lost Reason', tracking=True, + ) + lost_competitor_name = fields.Char(string='Competitor', tracking=True) + lost_details = fields.Text(string='Loss Notes') + won_date = fields.Date(string='Won Date', readonly=True) + lost_date = fields.Date(string='Lost Date', readonly=True) partner_id = fields.Many2one( 'res.partner', string='Customer', required=True, domain="[('customer_rank', '>', 0)]", @@ -520,6 +541,7 @@ class FpQuoteConfigurator(models.Model): self.write({ 'sale_order_id': so.id, 'state': 'confirmed', + 'won_date': fields.Date.today(), }) self.message_post( body=_('Sale Order %s created.') % (so.id, so.name), @@ -732,7 +754,30 @@ class FpQuoteConfigurator(models.Model): self.write({'state': 'cancelled'}) def action_reset_draft(self): - self.write({'state': 'draft'}) + self.write({'state': 'draft', 'won_date': False, 'lost_date': False}) + + def action_mark_lost(self): + """Move this quote to 'lost' state. Caller should populate + `lost_reason` first — a simple validation enforces that.""" + for rec in self: + if not rec.lost_reason: + from odoo.exceptions import UserError + raise UserError(_( + 'Please set a Lost Reason before marking this quote lost.' + )) + rec.write({ + 'state': 'lost', + 'lost_date': fields.Date.today(), + }) + rec.message_post( + body=_('Quote marked lost — reason: %s') % dict( + rec._fields['lost_reason'].selection + ).get(rec.lost_reason, rec.lost_reason), + ) + + def action_mark_expired(self): + for rec in self: + rec.write({'state': 'expired', 'lost_date': fields.Date.today()}) def action_open_3d_fullscreen(self): """Open the 3D model viewer in a full-screen dialog (same window).""" diff --git a/fusion_plating/fusion_plating_configurator/security/ir.model.access.csv b/fusion_plating/fusion_plating_configurator/security/ir.model.access.csv index b6cc8694..81a87923 100644 --- a/fusion_plating/fusion_plating_configurator/security/ir.model.access.csv +++ b/fusion_plating/fusion_plating_configurator/security/ir.model.access.csv @@ -21,3 +21,6 @@ access_fp_direct_order_wizard_estimator,fp.direct.order.wizard.estimator,model_f access_fp_direct_order_wizard_manager,fp.direct.order.wizard.manager,model_fp_direct_order_wizard,fusion_plating.group_fusion_plating_manager,1,1,1,1 access_fp_part_import_wizard_estimator,fp.part.catalog.import.wizard.estimator,model_fp_part_catalog_import_wizard,fusion_plating_configurator.group_fp_estimator,1,1,1,1 access_fp_part_import_wizard_manager,fp.part.catalog.import.wizard.manager,model_fp_part_catalog_import_wizard,fusion_plating.group_fusion_plating_manager,1,1,1,1 +access_fp_customer_price_list_operator,fp.customer.price.list.operator,model_fp_customer_price_list,fusion_plating.group_fusion_plating_operator,1,0,0,0 +access_fp_customer_price_list_estimator,fp.customer.price.list.estimator,model_fp_customer_price_list,fusion_plating_configurator.group_fp_estimator,1,1,1,0 +access_fp_customer_price_list_manager,fp.customer.price.list.manager,model_fp_customer_price_list,fusion_plating.group_fusion_plating_manager,1,1,1,1 diff --git a/fusion_plating/fusion_plating_configurator/views/fp_configurator_menu.xml b/fusion_plating/fusion_plating_configurator/views/fp_configurator_menu.xml index 684c44f2..f152afb2 100644 --- a/fusion_plating/fusion_plating_configurator/views/fp_configurator_menu.xml +++ b/fusion_plating/fusion_plating_configurator/views/fp_configurator_menu.xml @@ -83,6 +83,12 @@ action="action_fp_pricing_rule" sequence="30"/> + + + + + + fp.customer.price.list.list + fp.customer.price.list + + + + + + + + + + + + + + + + + fp.customer.price.list.form + fp.customer.price.list + +
+ +
+

+
+ + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + fp.customer.price.list.search + fp.customer.price.list + + + + + + + + + + + + + + + + + Customer Price Lists + fp.customer.price.list + list,form + + {'search_default_active': 1} + + +
diff --git a/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml b/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml index 7a2b6c21..81a882d3 100644 --- a/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml +++ b/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml @@ -29,6 +29,16 @@ class="btn-secondary" confirm="This will overwrite the part catalog's geometry, substrate, masking area, and complexity with values from this quote. Continue?" invisible="not part_catalog_id"/> +