<commit_before><?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <!-- Manufacturing Order -->
        <record id="mrp_production_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.tree</field>
            <field name="model">mrp.production</field>
            <field name="arch" type="xml">
                <tree decoration-bf="message_needaction==True" default_order="date_planned_start desc" decoration-info="state=='confirmed'" decoration-danger="date_planned_start&lt;current_date and state not in ('done','cancel')" decoration-muted="state in ('done','cancel')" string="Manufacturing Orders">
                    <field name="message_needaction" invisible="1"/>
                    <field name="name"/>
                    <field name="date_planned_start"/>
                    <field name="product_id"/>
                    <field name="product_qty" sum="Total Qty" string="Quantity"/>
                    <field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
                    <field name="availability"/>
                    <field name="routing_id" groups="mrp.group_mrp_routings"/>
                    <field name="origin"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

        <record id="production_order_server_action" model="ir.actions.server">
            <field name="name">Mrp: Plan Production Orders</field>
            <field name="model_id" ref="mrp.model_mrp_production"/>
            <field name="state">code</field>
            <field name="code">records.button_plan()</field>
        </record>

        <record id="run_procurement_order_action" model="ir.values">
            <field name="model_id" ref="mrp.model_mrp_production" />
            <field name="name">Plan Orders</field>
            <field name="key2">client_action_multi</field>
            <field name="key">action</field>
            <field name="model">mrp.production</field>
            <field name="value" eval="'ir.actions.server,' + str(ref('production_order_server_action'))" />
        </record>

        <record id="mrp_production_form_view" model="ir.ui.view">
            <field name="name">mrp.production.form</field>
            <field name="model">mrp.production</field>
            <field name="arch" type="xml">
                <form string="Manufacturing Orders">
                <header>
                    <button name="button_mark_done" attrs="{'invisible': [('check_to_done', '=', False)]}" string="Mark as Done" type="object" class="oe_highlight"/>
                    <button name="action_assign" attrs="{'invisible': [('availability', 'in', ('assigned', 'none'))]}" string="Check availability" type="object" class="oe_highlight"/>
                    <button name="button_plan" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('routing_id', '=', False)]}" type="object" string="Create Workorders" class="oe_highlight"/>
                    <button name="open_produce_product" attrs="{'invisible': ['|', '|', '|', ('check_to_done', '=', True), ('availability', 'not in', ['partially_available', 'assigned']), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="object" class="oe_highlight"/>
                    <button name="open_produce_product" attrs="{'invisible': ['|', '|', '|', ('check_to_done', '=', True), ('availability', '!=', 'waiting'), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="object"/>
                    <button name="post_inventory" string="Post Inventory" type="object" attrs="{'invisible': [('post_visible', '=', False)]}"/>
                    <button name="action_cancel" type="object" string="Cancel" attrs="{'invisible': ['|', ('state', 'in', ('done','cancel')), ('check_to_done', '=', True)]}"/>
                    <button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': ['|', ('availability', '=', 'none'), ('state', 'in', ('cancel'))]}"/>
                    <button name="button_unreserve" type="object" string="Unreserve" attrs="{'invisible': ['|', ('state', 'in', ['done', 'cancel']), ('availability', 'in', ['none', 'waiting'])]}"/>
                    <span class="label label-danger" attrs="{'invisible': ['|', ('availability', 'in', ('assigned', 'none')), ('state', 'not in', ('confirmed','progress'))]}">Raw materials not available!</span>
                    <field name="state" widget="statusbar" statusbar_visible="confirmed,progress,done"/>
                </header>
                <sheet>
                    <field name="post_visible" invisible="1"/>
                    <div class="oe_button_box" name="button_box">
                        <button name="%(action_mrp_workorder_production_specific)d" type="action" attrs="{'invisible': [('workorder_count', '=', 0)]}" class="oe_stat_button" icon="fa-play-circle-o">
                            <div class="o_form_field o_stat_info">
                                <span class="o_stat_value"><field name="workorder_done_count" widget="statinfo" nolabel="1"/> / <field name="workorder_count" widget="statinfo" nolabel="1"/></span>
                                <span class="o_stat_text">Work Orders</span>
                            </div>
                        </button>
                        <button name="%(action_mrp_production_moves)d" type="action" string="Inventory Moves" class="oe_stat_button" icon="fa-arrows-v" attrs="{'invisible': [('state', 'not in', ('progress', 'cancel', 'done'))]}"/>
                        <button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">
                            <div class="o_form_field o_stat_info">
                                <span class="o_stat_value"><field name="scrap_count"/></span>
                                <span class="o_stat_text">Scraps</span>
                            </div>
                        </button>
                        <field name="workorder_ids" invisible="1"/>
                    </div>
                    <div class="oe_title">
                        <h1><field name="name" placeholder="Manufacturing Reference" nolabel="1"/></h1>
                    </div>
                    <group>
                        <group>
                            <field name="has_moves" invisible="1"/>
                            <field name="check_to_done" invisible="1"/>
                            <field name="id" invisible="1"/>
                            <field name="product_id" attrs="{'readonly': [('has_moves', '=', True)]}" domain="[('bom_ids', '!=', False)]"/>
                            <field name="product_tmpl_id" invisible="1"/>
                            <label for="product_qty"/>
                            <div class="o_row">
                                <field name="product_qty" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                                <field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                                <button type="action"
                                    name="%(mrp.action_change_production_qty)d"
                                    string="Update" class="oe_link" attrs="{'invisible': ['|', ('state', 'in', ('done','cancel')), ('id', '=', False)]}"/>
                            </div>
                            <field name="bom_id"
                                domain="['&amp;', '|',
                                            ('product_id','=',product_id),
                                            '&amp;',
                                                ('product_tmpl_id.product_variant_ids','=',product_id),
                                                ('product_id','=',False),
                                                ('type', '=', 'normal')]"
                                context="{'default_product_tmpl_id': product_tmpl_id}" required="1" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                            <field name="routing_id" groups="mrp.group_mrp_routings"/>
                        </group>
                        <group>
                            <field name="date_planned_start"/>
                            <field name="date_planned_finished" invisible="1"/>
                            <field name="user_id"/>
                            <field name="origin"/>
                            <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Consumed Materials">
                            <field name="move_raw_ids" options="{'reload_on_button': True}" context="{'default_location_id': location_src_id, 'default_location_dest_id': location_dest_id}">
                                <tree editable="bottom" delete="0" default_order="is_done desc,sequence" decoration-muted="is_done" decoration-warning="quantity_done&gt;product_uom_qty" decoration-success="quantity_done==product_uom_qty" decoration-danger="quantity_available &lt; product_uom_qty" create="0">
                                    <field name="product_id" required="1"/>
                                    <field name="product_uom" groups="product.group_uom"/>
                                    <field name="has_tracking" invisible="1"/><commit_msg>[IMP] mrp: Hide `origin` field on MO in debut mode<commit_after><?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <!-- Manufacturing Order -->
        <record id="mrp_production_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.tree</field>
            <field name="model">mrp.production</field>
            <field name="arch" type="xml">
                <tree decoration-bf="message_needaction==True" default_order="date_planned_start desc" decoration-info="state=='confirmed'" decoration-danger="date_planned_start&lt;current_date and state not in ('done','cancel')" decoration-muted="state in ('done','cancel')" string="Manufacturing Orders">
                    <field name="message_needaction" invisible="1"/>
                    <field name="name"/>
                    <field name="date_planned_start"/>
                    <field name="product_id"/>
                    <field name="product_qty" sum="Total Qty" string="Quantity"/>
                    <field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
                    <field name="availability"/>
                    <field name="routing_id" groups="mrp.group_mrp_routings"/>
                    <field name="origin" groups="base.group_no_one"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

        <record id="production_order_server_action" model="ir.actions.server">
            <field name="name">Mrp: Plan Production Orders</field>
            <field name="model_id" ref="mrp.model_mrp_production"/>
            <field name="state">code</field>
            <field name="code">records.button_plan()</field>
        </record>

        <record id="run_procurement_order_action" model="ir.values">
            <field name="model_id" ref="mrp.model_mrp_production" />
            <field name="name">Plan Orders</field>
            <field name="key2">client_action_multi</field>
            <field name="key">action</field>
            <field name="model">mrp.production</field>
            <field name="value" eval="'ir.actions.server,' + str(ref('production_order_server_action'))" />
        </record>

        <record id="mrp_production_form_view" model="ir.ui.view">
            <field name="name">mrp.production.form</field>
            <field name="model">mrp.production</field>
            <field name="arch" type="xml">
                <form string="Manufacturing Orders">
                <header>
                    <button name="button_mark_done" attrs="{'invisible': [('check_to_done', '=', False)]}" string="Mark as Done" type="object" class="oe_highlight"/>
                    <button name="action_assign" attrs="{'invisible': [('availability', 'in', ('assigned', 'none'))]}" string="Check availability" type="object" class="oe_highlight"/>
                    <button name="button_plan" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('routing_id', '=', False)]}" type="object" string="Create Workorders" class="oe_highlight"/>
                    <button name="open_produce_product" attrs="{'invisible': ['|', '|', '|', ('check_to_done', '=', True), ('availability', 'not in', ['partially_available', 'assigned']), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="object" class="oe_highlight"/>
                    <button name="open_produce_product" attrs="{'invisible': ['|', '|', '|', ('check_to_done', '=', True), ('availability', '!=', 'waiting'), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="object"/>
                    <button name="post_inventory" string="Post Inventory" type="object" attrs="{'invisible': [('post_visible', '=', False)]}"/>
                    <button name="action_cancel" type="object" string="Cancel" attrs="{'invisible': ['|', ('state', 'in', ('done','cancel')), ('check_to_done', '=', True)]}"/>
                    <button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': ['|', ('availability', '=', 'none'), ('state', 'in', ('cancel'))]}"/>
                    <button name="button_unreserve" type="object" string="Unreserve" attrs="{'invisible': ['|', ('state', 'in', ['done', 'cancel']), ('availability', 'in', ['none', 'waiting'])]}"/>
                    <span class="label label-danger" attrs="{'invisible': ['|', ('availability', 'in', ('assigned', 'none')), ('state', 'not in', ('confirmed','progress'))]}">Raw materials not available!</span>
                    <field name="state" widget="statusbar" statusbar_visible="confirmed,progress,done"/>
                </header>
                <sheet>
                    <field name="post_visible" invisible="1"/>
                    <div class="oe_button_box" name="button_box">
                        <button name="%(action_mrp_workorder_production_specific)d" type="action" attrs="{'invisible': [('workorder_count', '=', 0)]}" class="oe_stat_button" icon="fa-play-circle-o">
                            <div class="o_form_field o_stat_info">
                                <span class="o_stat_value"><field name="workorder_done_count" widget="statinfo" nolabel="1"/> / <field name="workorder_count" widget="statinfo" nolabel="1"/></span>
                                <span class="o_stat_text">Work Orders</span>
                            </div>
                        </button>
                        <button name="%(action_mrp_production_moves)d" type="action" string="Inventory Moves" class="oe_stat_button" icon="fa-arrows-v" attrs="{'invisible': [('state', 'not in', ('progress', 'cancel', 'done'))]}"/>
                        <button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">
                            <div class="o_form_field o_stat_info">
                                <span class="o_stat_value"><field name="scrap_count"/></span>
                                <span class="o_stat_text">Scraps</span>
                            </div>
                        </button>
                        <field name="workorder_ids" invisible="1"/>
                    </div>
                    <div class="oe_title">
                        <h1><field name="name" placeholder="Manufacturing Reference" nolabel="1"/></h1>
                    </div>
                    <group>
                        <group>
                            <field name="has_moves" invisible="1"/>
                            <field name="check_to_done" invisible="1"/>
                            <field name="id" invisible="1"/>
                            <field name="product_id" attrs="{'readonly': [('has_moves', '=', True)]}" domain="[('bom_ids', '!=', False)]"/>
                            <field name="product_tmpl_id" invisible="1"/>
                            <label for="product_qty"/>
                            <div class="o_row">
                                <field name="product_qty" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                                <field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                                <button type="action"
                                    name="%(mrp.action_change_production_qty)d"
                                    string="Update" class="oe_link" attrs="{'invisible': ['|', ('state', 'in', ('done','cancel')), ('id', '=', False)]}"/>
                            </div>
                            <field name="bom_id"
                                domain="['&amp;', '|',
                                            ('product_id','=',product_id),
                                            '&amp;',
                                                ('product_tmpl_id.product_variant_ids','=',product_id),
                                                ('product_id','=',False),
                                                ('type', '=', 'normal')]"
                                context="{'default_product_tmpl_id': product_tmpl_id}" required="1" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                            <field name="routing_id" groups="mrp.group_mrp_routings"/>
                        </group>
                        <group>
                            <field name="date_planned_start"/>
                            <field name="date_planned_finished" invisible="1"/>
                            <field name="user_id"/>
                            <field name="origin" groups="base.group_no_one"/>
                            <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" attrs="{'readonly': [('has_moves', '=', True)]}"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Consumed Materials">
                            <field name="move_raw_ids" options="{'reload_on_button': True}" context="{'default_location_id': location_src_id, 'default_location_dest_id': location_dest_id}">
                                <tree editable="bottom" delete="0" default_order="is_done desc,sequence" decoration-muted="is_done" decoration-warning="quantity_done&gt;product_uom_qty" decoration-success="quantity_done==product_uom_qty" decoration-danger="quantity_available &lt; product_uom_qty" create="0">
                                    <field name="product_id" required="1"/>
                                    <field name="product_uom" groups="product.group_uom"/>
                                    <field name="has_tracking" invisible="1"/>
{'fraction_non_alphanumeric': 0.17581682531515308, 'fraction_numerical': 0.0024697710316439413, 'mean_word_length': 2.0860590663702765, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 2, '>': 257, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '239002', 'n_tokens_mistral': 5387, 'n_tokens_neox': 5172, 'n_words': 890}