mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP] mrp_component_operation: add active field
This commit is contained in:
@@ -70,3 +70,4 @@ class MrpComponentOperation(models.Model):
|
||||
string="Sequence",
|
||||
help="Gives the sequence order when displaying the list of component operations",
|
||||
)
|
||||
active = fields.Boolean(default=True)
|
||||
|
||||
@@ -6,11 +6,18 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Component Operation">
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<h1>
|
||||
<field name="name" string="Reference" />
|
||||
</h1>
|
||||
<group name="picking_type" string="Operation Type">
|
||||
<field name="picking_type_id" />
|
||||
<field name="active" invisible="1" />
|
||||
</group>
|
||||
<group name="operations" string="Operations">
|
||||
<field name="outgoing_operation" />
|
||||
@@ -62,6 +69,23 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_component_operation_search" model="ir.ui.view">
|
||||
<field name="name">mrp.component.operation.search</field>
|
||||
<field name="model">mrp.component.operation</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" string="Reference" />
|
||||
<separator />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active','=',False)]"
|
||||
/>
|
||||
<separator />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_menu_mrp_component_operation" model="ir.actions.act_window">
|
||||
<field name="name">Component Operation</field>
|
||||
<field name="res_model">mrp.component.operation</field>
|
||||
|
||||
Reference in New Issue
Block a user