<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
       <record id="stock_move_purchase" model="ir.ui.view">
            <field name="name">stock.move.form</field>
            <field name="model">stock.move</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_move_form"/>
            <field name="arch" type="xml">
                 <xpath expr="/form/group/field[@name='tracking_id']" position="before">
                    <field name="purchase_line_id" colspan="2" />
                </xpath>
            </field>
        </record>      
        <record id="stock_picking_inherit_purchase" model="ir.ui.view">
            <field name="name">Picking list</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_picking_form"/>
            <field name="arch" type="xml">
                <field name="auto_picking" position="after">
                    <field name="purchase_id"/>
                </field>
            </field>
        </record>

        <act_window
            domain="[('purchase_id', '=', active_id)]"
            id="act_purchase_order_2_stock_picking"
            name="Receptions"
            res_model="stock.picking"
	    groups="base.group_extended"
            src_model="purchase.order"
            context="{'contact_display': 'partner'}" />
       
       <record id="action_picking_in_tree_view" model="ir.actions.act_window.view">
            <field eval="1" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="stock.view_picking_in_tree"/>
            <field name="act_window_id" ref="act_purchase_order_2_stock_picking"/>
        </record>
        <record id="action_picking_in_form_view" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="stock.view_picking_in_form"/>
            <field name="act_window_id" ref="act_purchase_order_2_stock_picking"/>
        </record>
        
        <record id="stock_picking_in_inherit_purchase" model="ir.ui.view">
            <field name="name">Incoming Picking Inherited</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_picking_in_form"/>
            <field name="arch" type="xml">
                <field name="backorder_id" position="after">
                    <field name="purchase_id"/>
                </field>
            </field>
        </record>
    </data>
</openerp>
<commit_msg>[MERGE] purchase improvement, add picking to invoice<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="stock_move_purchase" model="ir.ui.view">
            <field name="name">stock.move.form</field>
            <field name="model">stock.move</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_move_form"/>
            <field name="arch" type="xml">
                 <xpath expr="/form/group/field[@name='tracking_id']" position="before">
                    <field name="purchase_line_id" colspan="2" />
                </xpath>
            </field>
        </record>      
        <record id="stock_picking_inherit_purchase" model="ir.ui.view">
            <field name="name">Picking list</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_picking_form"/>
            <field name="arch" type="xml">
                <field name="auto_picking" position="after">
                    <field name="purchase_id"/>
                </field>
            </field>
        </record>

        <act_window
            domain="[('purchase_id', '=', active_id)]"
            id="act_purchase_order_2_stock_picking"
            name="Receptions"
            res_model="stock.picking"
            groups="base.group_extended"
            src_model="purchase.order"
            context="{'contact_display': 'partner'}" />
       
        <record id="action_picking_in_tree_view" model="ir.actions.act_window.view">
            <field eval="1" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="stock.view_picking_in_tree"/>
            <field name="act_window_id" ref="act_purchase_order_2_stock_picking"/>
        </record>
        <record id="action_picking_in_form_view" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="stock.view_picking_in_form"/>
            <field name="act_window_id" ref="act_purchase_order_2_stock_picking"/>
        </record>
        
        <record id="stock_picking_in_inherit_purchase" model="ir.ui.view">
            <field name="name">Incoming Picking Inherited</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_picking_in_form"/>
            <field name="arch" type="xml">
                <field name="backorder_id" position="after">
                    <field name="purchase_id"/>
                </field>
            </field>
        </record>
        
        <!-- Picking to Invoice -->
        <record id="view_picking_in_search_picking_to_invoice" model="ir.ui.view">
            <field name="name">stock.picking.in.search</field>
            <field name="model">stock.picking</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Picking to Invoice">
                    <group col="8" colspan="4">
                        <filter icon="terp-check" name="available" string="Available"
                            domain="[('state','=','assigned')]" help="Incoming Shipments Available"/>
                        <filter icon="terp-dialog-close" name="done" string="Done"
                            domain="[('state','=','done')]" help="Incoming Shipments already processed"/>
                        <filter string="To invoice" name="to_invoice" icon="terp-dolar"
                            domain="[('invoice_state', '=', '2binvoiced')]"/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-accessories-archiver-minus" string="Back Orders"
                            domain="[('backorder_id', '!=', False)]" help="Is a Back Order" groups="base.group_extended"/>
                        <separator orientation="vertical"/>
                        <field name="name"/>
                        <field name="partner_id"/>
                        <field name="origin"/>
                        <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                    </group>                    
                    <newline/>
                    <group expand="0" string="Group By..." colspan="4" col="8">
                        <filter string="Partner" icon="terp-partner"
                            domain="[]" context="{'group_by':'partner_id'}"/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-stock_effects-object-colorize" name="state" string="State"
                            domain="[]" context="{'group_by':'state'}"/>
                        <separator orientation="vertical"/>
                        <filter string="Order Date" icon="terp-go-month"
                            domain="[]"  context="{'group_by':'date'}"/>
                        <filter string="Expected Date" icon="terp-go-month"
                            domain="[]"  context="{'group_by':'min_date'}"/>
                        <separator orientation="vertical"/>
                        <filter string="Journal" icon="terp-folder-orange"
                            domain="[]" context="{'group_by':'stock_journal_id'}"  groups="base.group_extended"/>
                    </group>
                </search>
            </field>
        </record>
 
        <record id="action_picking_tree4_picking_to_invoice" model="ir.actions.act_window">
            <field name="name">Picking to Invoice</field>
            <field name="res_model">stock.picking</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar</field>
            <field name="domain">[('type','=','in')]</field>
            <field name="context">{'search_default_done':1,'search_default_to_invoice':1}</field>
            <field name="search_view_id" ref="view_picking_in_search_picking_to_invoice"/>
            <field name="help">Create invoice from picking.  If you selected this invoice method in the purchase order, all reception done are available here to be invoiced.</field>
       </record>

        <menuitem action="action_picking_tree4_picking_to_invoice"
            id="menu_action_picking_tree4_picking_to_invoice"
            parent="purchase.menu_procurement_management_invoice" sequence="90"/>
    </data>
</openerp>

{'fraction_non_alphanumeric': 0.14790146949994715, 'fraction_numerical': 0.0032773020403848185, 'mean_word_length': 2.053582956746288, 'pattern_counts': {'":': 0, '<': 184, '<?xml version=': 2, '>': 184, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 9}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7563744', 'n_tokens_mistral': 2696, 'n_tokens_neox': 2610, 'n_words': 420}