chore: session housekeeping — tank UX, plating menu defaults, WO label
- fusion_plating: tank field labels (Code → Tank Number, Tank → Tank Name) + state-control header buttons (Mark Empty/Filled/In Use/Draining/ Maintenance/Out of Service) with chatter audit logging. - fusion_plating_configurator: Plating app default landing screen = Sale Orders, while keeping menu name as 'Plating'. - fusion_plating_jobs: SO smart-button label 'Plating Jobs' → 'WO'. Already deployed and verified on entech earlier in the session. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Fusion Plating',
|
'name': 'Fusion Plating',
|
||||||
'version': '19.0.9.2.0',
|
'version': '19.0.9.3.0',
|
||||||
'category': 'Manufacturing/Plating',
|
'category': 'Manufacturing/Plating',
|
||||||
'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.',
|
'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.',
|
||||||
'description': """
|
'description': """
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ class FpTank(models.Model):
|
|||||||
_order = 'facility_id, work_center_id, sequence, code'
|
_order = 'facility_id, work_center_id, sequence, code'
|
||||||
|
|
||||||
name = fields.Char(
|
name = fields.Char(
|
||||||
string='Tank',
|
string='Tank Name',
|
||||||
required=True,
|
required=True,
|
||||||
tracking=True,
|
tracking=True,
|
||||||
)
|
)
|
||||||
code = fields.Char(
|
code = fields.Char(
|
||||||
string='Code',
|
string='Tank Number',
|
||||||
required=True,
|
required=True,
|
||||||
tracking=True,
|
tracking=True,
|
||||||
help='Short unique tank identifier (e.g. "T-01", "EN-A1").',
|
help='Short unique tank identifier (e.g. "T-01", "EN-A1").',
|
||||||
@@ -174,3 +174,30 @@ class FpTank(models.Model):
|
|||||||
if not vals.get('qr_code') and vals.get('code'):
|
if not vals.get('qr_code') and vals.get('code'):
|
||||||
vals['qr_code'] = f"FP-TANK:{vals['code']}"
|
vals['qr_code'] = f"FP-TANK:{vals['code']}"
|
||||||
return super().create(vals_list)
|
return super().create(vals_list)
|
||||||
|
|
||||||
|
# ----- State transition actions ---------------------------------------
|
||||||
|
def _set_state(self, new_state, message):
|
||||||
|
for rec in self:
|
||||||
|
old = dict(rec._fields['state'].selection).get(rec.state, rec.state)
|
||||||
|
new = dict(rec._fields['state'].selection).get(new_state, new_state)
|
||||||
|
rec.state = new_state
|
||||||
|
rec.message_post(body=f"{message} ({old} → {new}) by {self.env.user.name}")
|
||||||
|
return True
|
||||||
|
|
||||||
|
def action_set_empty(self):
|
||||||
|
return self._set_state('empty', 'Tank marked Empty')
|
||||||
|
|
||||||
|
def action_set_filled(self):
|
||||||
|
return self._set_state('filled', 'Tank marked Filled')
|
||||||
|
|
||||||
|
def action_set_in_use(self):
|
||||||
|
return self._set_state('in_use', 'Tank marked In Use')
|
||||||
|
|
||||||
|
def action_set_draining(self):
|
||||||
|
return self._set_state('draining', 'Tank marked Draining')
|
||||||
|
|
||||||
|
def action_set_maintenance(self):
|
||||||
|
return self._set_state('maintenance', 'Tank marked for Maintenance')
|
||||||
|
|
||||||
|
def action_set_out_of_service(self):
|
||||||
|
return self._set_state('out_of_service', 'Tank marked Out of Service')
|
||||||
|
|||||||
@@ -35,6 +35,24 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Tank">
|
<form string="Tank">
|
||||||
<header>
|
<header>
|
||||||
|
<button name="action_set_empty" type="object"
|
||||||
|
string="Mark Empty" class="btn-secondary"
|
||||||
|
invisible="state == 'empty'"/>
|
||||||
|
<button name="action_set_filled" type="object"
|
||||||
|
string="Mark Filled" class="btn-primary"
|
||||||
|
invisible="state == 'filled'"/>
|
||||||
|
<button name="action_set_in_use" type="object"
|
||||||
|
string="Mark In Use" class="btn-success"
|
||||||
|
invisible="state == 'in_use'"/>
|
||||||
|
<button name="action_set_draining" type="object"
|
||||||
|
string="Mark Draining" class="btn-warning"
|
||||||
|
invisible="state == 'draining'"/>
|
||||||
|
<button name="action_set_maintenance" type="object"
|
||||||
|
string="Mark for Maintenance" class="btn-warning"
|
||||||
|
invisible="state == 'maintenance'"/>
|
||||||
|
<button name="action_set_out_of_service" type="object"
|
||||||
|
string="Mark Out of Service" class="btn-danger"
|
||||||
|
invisible="state == 'out_of_service'"/>
|
||||||
<field name="state" widget="statusbar"
|
<field name="state" widget="statusbar"
|
||||||
statusbar_visible="empty,filled,in_use,draining,maintenance"/>
|
statusbar_visible="empty,filled,in_use,draining,maintenance"/>
|
||||||
</header>
|
</header>
|
||||||
@@ -42,7 +60,7 @@
|
|||||||
<widget name="web_ribbon" title="Out of Service" bg_color="text-bg-danger"
|
<widget name="web_ribbon" title="Out of Service" bg_color="text-bg-danger"
|
||||||
invisible="state != 'out_of_service'"/>
|
invisible="state != 'out_of_service'"/>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name"/>
|
<label for="name" string="Tank Name"/>
|
||||||
<h1><field name="name" placeholder="e.g. EN Plating Tank A1"/></h1>
|
<h1><field name="name" placeholder="e.g. EN Plating Tank A1"/></h1>
|
||||||
<div class="text-muted">
|
<div class="text-muted">
|
||||||
<field name="code" placeholder="T-01"/>
|
<field name="code" placeholder="T-01"/>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Fusion Plating — Configurator',
|
'name': 'Fusion Plating — Configurator',
|
||||||
'version': '19.0.17.13.0',
|
'version': '19.0.17.15.0',
|
||||||
'category': 'Manufacturing/Plating',
|
'category': 'Manufacturing/Plating',
|
||||||
'summary': 'Quotation configurator with part catalog, coating configs, and formula-based pricing engine.',
|
'summary': 'Quotation configurator with part catalog, coating configs, and formula-based pricing engine.',
|
||||||
'description': """
|
'description': """
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
<field name="context">{'default_customer_rank': 1}</field>
|
<field name="context">{'default_customer_rank': 1}</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Default landing screen for the Plating app = Sale Orders -->
|
||||||
|
<menuitem id="fusion_plating.menu_fp_root"
|
||||||
|
name="Plating"
|
||||||
|
action="action_fp_sale_orders"/>
|
||||||
|
|
||||||
<!-- ===== SALES submenu under Fusion Plating root ===== -->
|
<!-- ===== SALES submenu under Fusion Plating root ===== -->
|
||||||
<menuitem id="menu_fp_sales"
|
<menuitem id="menu_fp_sales"
|
||||||
name="Sales"
|
name="Sales"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||||
{
|
{
|
||||||
'name': 'Fusion Plating — Native Jobs',
|
'name': 'Fusion Plating — Native Jobs',
|
||||||
'version': '19.0.6.22.0',
|
'version': '19.0.6.23.0',
|
||||||
'category': 'Manufacturing/Plating',
|
'category': 'Manufacturing/Plating',
|
||||||
'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.',
|
'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.',
|
||||||
'author': 'Nexa Systems Inc.',
|
'author': 'Nexa Systems Inc.',
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<button name="action_view_fp_jobs" type="object"
|
<button name="action_view_fp_jobs" type="object"
|
||||||
class="oe_stat_button" icon="fa-cogs">
|
class="oe_stat_button" icon="fa-cogs">
|
||||||
<field name="x_fc_fp_job_count" widget="statinfo"
|
<field name="x_fc_fp_job_count" widget="statinfo"
|
||||||
string="Plating Jobs"/>
|
string="WO"/>
|
||||||
</button>
|
</button>
|
||||||
<!-- Sarah/Tom path: SO → Certificates (one click instead -->
|
<!-- Sarah/Tom path: SO → Certificates (one click instead -->
|
||||||
<!-- of two via the job). Hidden until a cert exists. -->
|
<!-- of two via the job). Hidden until a cert exists. -->
|
||||||
|
|||||||
Reference in New Issue
Block a user