[FIX] mrp: views improvement
This commit makes some changes in the production order views
as well as in the workorders one. This commits make sure there
is now only one form view left for the mrp.workorder model.
This commit take part of the MRP refactoring
(69c48add32)
Task : 2278147
X-original-commit: 8b389ab3601cf5ed9328b7ce55ee91d54aa70150
This commit is contained in:
@@ -261,6 +261,8 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Operations" name="operations" groups="mrp.group_mrp_routings">
|
||||
<field name="workorder_ids" attrs="{'readonly': [('state', 'in', ['cancel', 'done'])]}" context="{'tree_view_ref': 'mrp.mrp_production_workorder_tree_editable_view', 'default_production_id': id, 'default_product_uom_id': product_uom_id, 'default_consumption': consumption, 'default_company_id': company_id}"/> </page>
|
||||
<page string="By-Products" name="finished_products" groups="mrp.group_mrp_byproducts">
|
||||
<field name="move_byproduct_ids" context="{'default_location_id': production_location_id, 'default_location_dest_id': location_src_id, 'default_state': 'draft', 'default_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id}" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}">
|
||||
<tree delete="0" default_order="is_done,sequence" decoration-muted="is_done" editable="bottom">
|
||||
@@ -313,8 +315,6 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Operations" name="operations" groups="mrp.group_mrp_routings">
|
||||
<field name="workorder_ids" attrs="{'readonly': [('state', 'in', ['cancel', 'done'])]}" context="{'tree_view_ref': 'mrp.mrp_production_workorder_tree_editable_view', 'default_production_id': id, 'default_product_uom_id': product_uom_id, 'default_consumption': consumption, 'default_company_id': company_id}"/> </page>
|
||||
<page string="Miscellaneous" name="miscellaneous" groups="stock.group_stock_multi_locations">
|
||||
<group>
|
||||
<group>
|
||||
|
||||
@@ -87,8 +87,6 @@
|
||||
<field name="duration_expected" widget="float_time"/>
|
||||
<field name="duration" widget="mrp_time_counter"
|
||||
attrs="{'invisible': ['|', ('production_state','=', 'draft'), ('time_ids', '=', [])]}"/>
|
||||
<button name="action_open_wizard" type="object" icon="fa-external-link" class="oe_edit_only"
|
||||
context="{'default_workcenter_id': workcenter_id}"/>
|
||||
<field name="state" widget="badge" decoration-success="state == 'done'" decoration-info="state not in ('done', 'cancel')"/>
|
||||
<button name="button_start" type="object" string="Start" class="btn-success"
|
||||
attrs="{'invisible': ['|', '|', '|', ('production_state','in', ('draft', 'done')), ('working_state', '=', 'blocked'), ('state', '=', 'done'), ('is_user_working', '!=', False)]}"/>
|
||||
@@ -100,6 +98,8 @@
|
||||
attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done')), ('working_state', '=', 'blocked')]}"/>
|
||||
<button name="button_unblock" type="object" string="Unblock" context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
||||
attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done')), ('working_state', '!=', 'blocked')]}"/>
|
||||
<button name="action_open_wizard" type="object" icon="fa-external-link" class="oe_edit_only"
|
||||
context="{'default_workcenter_id': workcenter_id}"/>
|
||||
<field name="show_json_popover" invisible="1"/>
|
||||
<field name="json_popover" widget="mrp_workorder_popover" string=" " attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
|
||||
</tree>
|
||||
@@ -146,15 +146,18 @@
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="finished_lot_id" invisible="1"/>
|
||||
<field name="qty_producing" invisible="1"/>
|
||||
<group attrs="{'invisible': [('date_planned_start', '=', False)]}">
|
||||
<label for="date_planned_start" string="Planned Date"/>
|
||||
<div class="oe_inline">
|
||||
<field name="date_planned_start" class="mr8 oe_inline" required="True"/>
|
||||
<strong class="mr8 oe_inline">to</strong>
|
||||
<field name="date_planned_finished" class="oe_inline" required="True"/>
|
||||
<field name="show_json_popover" invisible="1"/>
|
||||
<field name="json_popover" widget="mrp_workorder_popover" class="oe_inline mx-2" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
|
||||
</div>
|
||||
<group>
|
||||
<group attrs="{'invisible': [('date_planned_start', '=', False)]}">
|
||||
<label for="date_planned_start" string="Planned Date"/>
|
||||
<div class="oe_inline">
|
||||
<field name="date_planned_start" class="mr8 oe_inline" required="True"/>
|
||||
<strong class="mr8 oe_inline">to</strong>
|
||||
<field name="date_planned_finished" class="oe_inline" required="True"/>
|
||||
<field name="show_json_popover" invisible="1"/>
|
||||
<field name="json_popover" widget="mrp_workorder_popover" class="oe_inline mx-2" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
|
||||
</div>
|
||||
<field name="duration_expected" widget="float_time"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Time Tracking" name="time_tracking" groups="mrp.group_mrp_manager">
|
||||
@@ -196,25 +199,10 @@
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter" groups="mrp.group_mrp_manager">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="mrp_production_workorder_form_view_inherit_gantt">
|
||||
<field name="name">mrp.production.work.order.form.gantt</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="time_ids" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_production_workorder_form_view_filter" model="ir.ui.view">
|
||||
<field name="name">mrp.production.work.order.select</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
@@ -295,7 +283,7 @@
|
||||
decoration-warning="state == 'cancel' or 'text-warning' in json_popover"
|
||||
color="workcenter_id"
|
||||
display_unavailability="1"
|
||||
form_view_id="%(mrp_production_workorder_form_view_inherit_gantt)d">
|
||||
form_view_id="%(mrp_production_workorder_form_view_inherit)d">
|
||||
|
||||
<field name="date_planned_start"/>
|
||||
<field name="state"/>
|
||||
|
||||
Reference in New Issue
Block a user