changes
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_job_consumption_list" model="ir.ui.view">
|
||||
<field name="name">fp.job.consumption.list</field>
|
||||
<field name="model">fp.job.consumption</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="bottom" default_order="logged_date desc">
|
||||
<field name="logged_date"/>
|
||||
<field name="job_id"/>
|
||||
<field name="step_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id"/>
|
||||
<field name="currency_id" column_invisible="1"/>
|
||||
<field name="unit_cost" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="total_cost" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}" sum="Total"/>
|
||||
<field name="source"/>
|
||||
<field name="logged_by_id" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_job_consumption_form" model="ir.ui.view">
|
||||
<field name="name">fp.job.consumption.form</field>
|
||||
<field name="model">fp.job.consumption</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="job_id"/>
|
||||
<field name="step_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_name"/>
|
||||
<field name="source"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="unit_cost" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="total_cost" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}" readonly="1"/>
|
||||
<field name="logged_date"/>
|
||||
<field name="logged_by_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Notes">
|
||||
<field name="notes" nolabel="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_job_consumption" model="ir.actions.act_window">
|
||||
<field name="name">Job Consumables Log</field>
|
||||
<field name="res_model">fp.job.consumption</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
|
||||
Phase 3 (Sub 11) — native Production Priorities kanban / list on
|
||||
fp.job.step. Replaces the bridge_mrp version that bound to
|
||||
mrp.workorder. Same UX (drag-drop ordering across work centres,
|
||||
list with handle, badges by state).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_step_priority_kanban" model="ir.ui.view">
|
||||
<field name="name">fp.job.step.priority.kanban</field>
|
||||
<field name="model">fp.job.step</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="work_centre_id" default_order="sequence, id">
|
||||
<field name="name"/>
|
||||
<field name="work_centre_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="state"/>
|
||||
<field name="sequence"/>
|
||||
<field name="duration_actual"/>
|
||||
<field name="duration_expected"/>
|
||||
<field name="assigned_user_id"/>
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="o_kanban_record_top mb-0">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<field name="job_id"/>
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_record_body">
|
||||
<div><strong><field name="name"/></strong></div>
|
||||
<div class="text-muted">
|
||||
<t t-if="record.assigned_user_id.raw_value">
|
||||
<field name="assigned_user_id"/>
|
||||
</t>
|
||||
<t t-if="record.duration_actual.raw_value">
|
||||
— <field name="duration_actual" widget="float_time"/> elapsed
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<div class="oe_kanban_bottom_left">
|
||||
<field name="state" widget="badge"
|
||||
decoration-info="state == 'ready'"
|
||||
decoration-warning="state == 'in_progress'"
|
||||
decoration-muted="state == 'paused'"
|
||||
decoration-success="state == 'done'"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_step_priority_list" model="ir.ui.view">
|
||||
<field name="name">fp.job.step.priority.list</field>
|
||||
<field name="model">fp.job.step</field>
|
||||
<field name="arch" type="xml">
|
||||
<list default_order="sequence, id">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="job_id"/>
|
||||
<field name="work_centre_id"/>
|
||||
<field name="assigned_user_id"/>
|
||||
<field name="duration_expected" widget="float_time"/>
|
||||
<field name="duration_actual" widget="float_time"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-info="state == 'ready'"
|
||||
decoration-warning="state == 'in_progress'"
|
||||
decoration-muted="state == 'paused'"
|
||||
decoration-success="state == 'done'"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_step_priority" model="ir.actions.act_window">
|
||||
<field name="name">Production Priorities</field>
|
||||
<field name="res_model">fp.job.step</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="domain">[('state', 'in', ['pending', 'ready', 'in_progress', 'paused'])]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('view_fp_step_priority_kanban')}),
|
||||
(0, 0, {'view_mode': 'list', 'view_id': ref('view_fp_step_priority_list')})]"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fp_step_priority"
|
||||
name="Production Priorities"
|
||||
parent="fusion_plating.menu_fp_operations"
|
||||
action="action_fp_step_priority"
|
||||
sequence="10"
|
||||
groups="fusion_plating.group_fusion_plating_supervisor"/>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
|
||||
Adds the SO → fp.job smart button so the SO form is a hub for the
|
||||
native job lifecycle (replaces the legacy MO smart button when the
|
||||
use_native_jobs flag is on).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_sale_order_form_fp_jobs" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.fp.jobs</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- After the legacy Manufacturing button (added by bridge_mrp).
|
||||
Always visible (no invisible-on-zero) so users can navigate
|
||||
from the SO even before jobs exist. -->
|
||||
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
||||
<button name="action_view_fp_jobs" type="object"
|
||||
class="oe_stat_button" icon="fa-cogs">
|
||||
<field name="x_fc_fp_job_count" widget="statinfo"
|
||||
string="Plating Jobs"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user