Initial commit: OCA Mrp packages (117 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:05 +02:00
commit 277e84fd7a
4403 changed files with 395154 additions and 0 deletions

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.actions.act_window" id="mrp.mrp_bom_form_action">
<field name="domain">['|',('active','=',True),('active','=',False)]</field>
</record>
<record model="ir.ui.view" id="mrp_bom_version_tree_view">
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_tree_view" />
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="decoration-muted">not active</attribute>
</tree>
<field name="code" position="after">
<field name="version" />
<field name="state" />
<field name="historical_date" />
<button
name="button_draft"
type="object"
title="Draft"
groups="mrp_bom_version.group_mrp_bom_version"
attrs="{'invisible':[('state','!=','active')]}"
icon="fa-plus-square"
/>
<button
name="button_activate"
type="object"
title="Activate"
attrs="{'invisible':[('state','not in',(False, 'draft'))]}"
icon="fa-check-square"
confirm="You will activate the BoM, then you won't be able to edit it after this. Are you sure you want to proceed?"
/>
<button
name="button_new_version"
type="object"
title="New version"
attrs="{'invisible':[('state','==','historical')]}"
icon="fa-gears"
confirm="You are going to create a new version of this BoM. Are you sure?"
/>
<button
name="button_historical"
type="object"
title="Historical"
attrs="{'invisible':[('state','!=','active')]}"
icon="fa-history"
confirm="You are going to historize an BoM. Doing, not be able to unlock it unless you make a copy. Are you sure you want to proceed?"
/>
</field>
</field>
</record>
<record model="ir.ui.view" id="mrp_bom_version_form_view">
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
<field name="arch" type="xml">
<sheet position="before">
<header>
<button
name="button_draft"
type="object"
string="Draft"
groups="mrp_bom_version.group_mrp_bom_version"
attrs="{'invisible':[('state','!=','active')]}"
class="oe_highlight"
/>
<button
name="button_activate"
type="object"
string="Activate"
attrs="{'invisible':[('state','not in',(False, 'draft'))]}"
class="oe_highlight"
confirm="You will activate the BoM, then you won't be able to edit it after this. Are you sure you want to proceed?"
/>
<button
name="button_new_version"
type="object"
string="New version"
attrs="{'invisible':[('state','=','historical')]}"
class="oe_highlight"
confirm="You are going to create a new version of this BoM. Are you sure?"
/>
<button
name="button_historical"
type="object"
string="Historical"
attrs="{'invisible':[('state','!=','active')]}"
class="oe_highlight"
confirm="You are going to historize an BoM. Doing, not be able to unlock it unless you make a copy. Are you sure you want to proceed?"
/>
<field
name="state"
widget="statusbar"
statusbar_visible="draft,active,historical"
/>
</header>
</sheet>
<field name="company_id" position="before">
<field name="version" />
<field
name="historical_date"
attrs="{'invisible': [('state','!=','historical')]}"
/>
</field>
<notebook position="inside">
<page string="Versions">
<field name="old_versions" />
</page>
</notebook>
</field>
</record>
<record model="ir.ui.view" id="mrp_bom_version_search_view">
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.view_mrp_bom_filter" />
<field name="arch" type="xml">
<filter name="normal" position="before">
<field name="state" />
</filter>
<filter name="inactive" position="before">
<filter
string="Active"
domain="[('active','=',True)]"
name="is_active_filter"
/>
</filter>
<filter name="default_unit_of_measure" position="after">
<filter
string="Active"
name="group_active"
domain="[]"
context="{'group_by':'active'}"
/>
<filter
string="Status"
name="group_state"
domain="[]"
context="{'group_by':'state'}"
/>
</filter>
</field>
</record>
</odoo>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record model="ir.ui.view" id="mrp_config_settings_versioning">
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="mrp.res_config_settings_view_form" />
<field name="arch" type="xml">
<div id="mrp_reception_report" position="after">
<div class="col-12 col-lg-6 o_setting_box" id="mrp_bom_version">
<div class="o_setting_left_pane">
<field name="group_mrp_bom_version" />
</div>
<div class="o_setting_right_pane">
<label for="group_mrp_bom_version" />
<div class="text-muted">
Allow to re-edit BoMs
</div>
<div
class="row mt-2"
attrs="{'invisible': [('group_mrp_bom_version','=',False)]}"
>
<field
name="active_draft"
class="col flex-grow-0 ml16 mr0 pe-2"
/>
<div class="col ps-0">
<label for="active_draft" />
<div class="text-muted">
Keep re-editing BoM active
</div>
</div>
</div>
</div>
</div>
</div>
</field>
</record>
</odoo>