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,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mrp_bom_see_attachments_form_view" model="ir.ui.view">
<field name="name">mrp.bom.attachments.mrp.bom.form.view</field>
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
<field name="arch" type="xml">
<xpath
expr="//button[@name='%(mrp.action_report_mrp_bom)d']"
position="after"
>
<button
class="oe_stat_button"
name="action_see_bom_documents"
type="object"
icon="fa-files-o"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Components<br />Attachments</span>
</div>
</button>
<button
class="oe_stat_button"
name="action_show_product_attachments"
type="object"
icon="fa-files-o"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Product<br />Attachments</span>
</div>
</button>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="name">mrp.production.form - Add attachments smart-button</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<xpath expr="///button[@name='action_see_move_scrap']" position="after">
<button
class="oe_stat_button"
name="action_show_attachments"
type="object"
icon="fa-files-o"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Product<br />Attachments</span>
</div>
</button>
<button
class="oe_stat_button"
name="action_show_bom_attachments"
type="object"
icon="fa-files-o"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">BoM<br />Attachments</span>
</div>
</button>
</xpath>
</field>
</record>
<record id="action_show_production_attachments" model="ir.actions.server">
<field name="name">Product Attachments</field>
<field name="model_id" ref="mrp.model_mrp_production" />
<field name="binding_model_id" ref="mrp.model_mrp_production" />
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_show_attachments()
</field>
</record>
<record id="action_show_production_bom_attachments" model="ir.actions.server">
<field name="name">BoM Attachments</field>
<field name="model_id" ref="mrp.model_mrp_production" />
<field name="binding_model_id" ref="mrp.model_mrp_production" />
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_show_bom_attachments()
</field>
</record>
</odoo>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mrp_bom_see_attachments_product_template_form_view" model="ir.ui.view">
<field name="name">mrp.bom.attachments.product.template.form.view</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="mrp.product_template_form_view_bom_button" />
<field name="arch" type="xml">
<xpath expr="///button[@name='action_used_in_bom']" position="after">
<button
class="oe_stat_button"
name="action_see_bom_documents"
type="object"
icon="fa-files-o"
groups="mrp.group_mrp_user"
attrs="{'invisible': [('bom_count','!=',1)]}"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Components<br />Attachments</span>
</div>
</button>
<button
class="oe_stat_button"
name="action_see_bom_attachments"
type="object"
icon="fa-files-o"
groups="mrp.group_mrp_user"
attrs="{'invisible': [('bom_count','=',0)]}"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">BoMs<br />Attachments</span>
</div>
</button>
</xpath>
</field>
</record>
<record id="mrp_bom_see_attachments_product_product_form_view" model="ir.ui.view">
<field name="name">mrp.bom.attachments.product.product.form.view</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="mrp.product_product_form_view_bom_button" />
<field name="arch" type="xml">
<xpath expr="///button[@name='action_used_in_bom']" position="after">
<button
class="oe_stat_button"
name="action_see_bom_documents"
type="object"
icon="fa-files-o"
groups="mrp.group_mrp_user"
attrs="{'invisible': [('bom_count','!=',1)]}"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Components<br />Attachments</span>
</div>
</button>
<button
class="oe_stat_button"
name="action_see_bom_attachments"
type="object"
icon="fa-files-o"
groups="mrp.group_mrp_user"
attrs="{'invisible': [('bom_count','=',0)]}"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">BoMs<br />Attachments</span>
</div>
</button>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="workorder_attachments_mrp_workorder_form_view" model="ir.ui.view">
<field name="name">workorder.attachments.mrp.workorder.form.view</field>
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit" />
<field name="arch" type="xml">
<xpath expr="///button[@name='action_see_move_scrap']" position="after">
<button
class="oe_stat_button"
name="action_see_workorder_attachments"
type="object"
icon="fa-files-o"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Product<br />Attachments</span>
</div>
</button>
<button
class="oe_stat_button"
name="action_see_workorder_bom_attachments"
type="object"
icon="fa-files-o"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">BoM<br />Attachments</span>
</div>
</button>
</xpath>
</field>
</record>
<record id="action_see_workorder_attachments" model="ir.actions.server">
<field name="name">Product Attachments</field>
<field name="model_id" ref="model_mrp_workorder" />
<field name="binding_model_id" ref="model_mrp_workorder" />
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_see_workorder_attachments()
</field>
</record>
<record id="action_see_workorder_bom_attachments" model="ir.actions.server">
<field name="name">BoM Attachments</field>
<field name="model_id" ref="model_mrp_workorder" />
<field name="binding_model_id" ref="model_mrp_workorder" />
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_see_workorder_bom_attachments()
</field>
</record>
</odoo>