~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to stock_override/stock_view.xml

  • Committer: Olivier DOSSMANN
  • Date: 2012-09-10 12:47:41 UTC
  • mfrom: (1122 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: olivier@tempo-laptop-20120910124741-jwl0z433kaszn1ob
UF-1285 [MERGE] Last trunk lp:unifield-wm

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
                    </group>
309
309
                    <notebook colspan="4">
310
310
                        <page string="Products">
 
311
                            <field name="from_wkf" invisible="1"/>
311
312
                            <field name="move_lines"
312
313
                                colspan="4"
313
314
                                nolabel="1"
314
315
                                widget="one2many_list"
315
316
                                default_get="{'move_line':move_lines}"
316
 
                                context="{'reason_type_id': reason_type_id}" 
 
317
                                context="{'reason_type_id': reason_type_id, 'from_wkf': from_wkf}"
317
318
                                on_change="onchange_move()"
318
 
                                attrs="{'readonly': [('from_wkf', '=', True),('state','in',['draft','confirmed','assigned'])]}"
319
319
                                >
320
 
                                <tree colors="grey:scrapped == True" string="Stock Moves">
 
320
                                <tree colors="grey:scrapped == True" string="Stock Moves" noteditable="fake_state=='assigned'" hide_new_button="context.get('from_wkf')" hide_delete_button="context.get('from_wkf')">
321
321
                                    <field name="line_number"/>
322
322
                                    <field name="product_id"/>
323
323
                                    <field name="composition_list_id"/>
334
334
                                    <field name="location_dest_id"/>
335
335
                                    <field name="date" string="Actual Move Date"/>
336
336
                                    <field name="state"/>
 
337
                                    <field name="fake_state" invisible="1"/>
337
338
                                    <button name="cancel_assign" string="Cancel Availability" type="object" icon="gtk-undo" states="assigned" />
338
339
                                    <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
339
340
                                    <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
349
350
                                    <group colspan="2" col="4">
350
351
                                        <separator colspan="4" string="Move Information"/>
351
352
                                        <field name="name" invisible="1" colspan="4"/>
 
353
                                        <field name="from_wkf_line" invisible="1" />
352
354
                                        <field name="product_id"
 
355
                                            domain="[('type', 'not in', ('service', 'service_recep'))]"
353
356
                                            on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id, parent.type)"
354
357
                                            context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}"
355
358
                                            colspan="4"
 
359
                                            attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
356
360
                                            />
357
361
                                        <field name="product_qty"
358
362
                                            on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
359
363
                                            colspan="2"
360
 
                                            />
361
 
                                        <field name="product_uom" string="Unit Of Measure" colspan="2"/>
 
364
                                            attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
 
365
                                            />
 
366
                                        <field name="product_uom"
 
367
                                            string="Unit Of Measure"
 
368
                                            colspan="2"
 
369
                                            attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
 
370
                                            />
362
371
                                        <field name="product_uos_qty"
363
372
                                            on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)"
364
373
                                            colspan="4"
375
384
                                    <group colspan="2" col="2">
376
385
                                        <separator string="Locations" colspan="2"/>
377
386
                                        <field name="location_id" 
378
 
                                            domain="[('usage','in',('internal', 'procurement', 'production'))]"
 
387
                                            attrs="{'readonly': [('state', '=', 'assigned')]}"
 
388
                                            domain="[('internal_src', '=', product_id), ('usage', '!=', 'view')]"
379
389
                                            context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" 
380
390
                                            />
381
391
                                       <field name="location_dest_id"
382
 
                                            domain="[('usage','in',('internal', 'inventory', 'procurement', 'production'))]" 
 
392
                                            domain="[('internal_dest', '=', product_id), ('usage', '!=', 'view')]" 
383
393
                                            on_change="location_dest_change(location_dest_id)"
384
394
                                            />
385
395
                                    </group>
428
438
                            <group col="10" colspan="4">
429
439
                                <field name="state" readonly="1"/>
430
440
                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
431
 
                                <button name="draft_force_assign" states="draft" string="Validate" type="object" icon="gtk-apply"/>
 
441
                                <button name="draft_force_assign" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
432
442
                                <button name="action_assign" states="confirmed,assigned" string="Check Availability" type="object" icon="gtk-find"/>
433
443
                                <button name="force_assign" states="confirmed,assigned" string="Force Availability" type="object" icon="gtk-jump-to"/>
434
444
                                <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
446
456
                        </page>
447
457
                        <page string="Notes">
448
458
                            <field colspan="4" name="note" nolabel="1"/>
449
 
                            <field name="from_wkf" invisible="1"/>
450
459
                        </page>
451
460
                    </notebook>
452
461
                </form>
488
497
                            <field name="name" readonly="1"/>
489
498
                            <field name="origin" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
490
499
                            <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)" required="0" attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}"/>
 
500
                            <field name="address_id" invisible="1" />
491
501
                            <field name="backorder_id" readonly="1"/>
492
502
                            <field name="reason_type_id" widget="selection" attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
493
 
                                <field name="order_category"/>
494
 
                                <field name="change_reason"/>
 
503
                            <field name="order_category"/>
 
504
                            <field name="change_reason"/>
495
505
                        </group>
496
506
                        <group colspan="2" col="2">
497
507
                            <field name="date" string="Actual Receipt Date" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
501
511
                    </group>
502
512
                    <notebook colspan="4">
503
513
                        <page string="General Information">
 
514
                            <field name="from_wkf" invisible="1"/>
504
515
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"
505
516
                                default_get="{'purchase_id': purchase_id, 'reason_type_id': reason_type_id, 'warehouse_id': warehouse_id}"
506
 
                                context="{'reason_type_id': reason_type_id, 'warehouse_id': warehouse_id}"
 
517
                                context="{'subtype': subtype, 'type': 'out', 'reason_type_id': reason_type_id, 'move_line':move_lines, 'address_in_id': address_id, 'warehouse_id': warehouse_id, 'from_wkf': from_wkf}"
507
518
                                on_change="onchange_move()"
508
 
                                attrs="{'readonly': [('from_wkf', '=', True),('state','in',['draft','confirmed','assigned'])]}"
509
519
                                >
510
 
                                <tree colors="grey:scrapped==True" string="Stock Moves">
 
520
                                <tree
 
521
                                    colors="grey:scrapped==True"
 
522
                                    string="Stock Moves"
 
523
                                    hide_new_button="context.get('from_wkf')"
 
524
                                    hide_delete_button="context.get('from_wkf')"
 
525
                                    >
511
526
                                    <field name="line_number"/>
512
 
                                                                        <field name="product_id"/>
 
527
                                    <field name="product_id"/>
513
528
                                    <field name="product_qty"/>
514
529
                                    <field name="product_uom" string="UoM"/>
515
530
                                    <field name="scrapped" invisible="1"/>
518
533
                                    <field name="expired_date"/>
519
534
                                    <field name="location_dest_id"/>
520
535
                                    <field name="date" string="Actual Receipt Date"/>
521
 
                                                                        <field name="state"/>
522
 
                                                                        <field name="kit_check" invisible="True"/>
523
 
                                                                <button name="create_composition_list" type="object" string="Create Composition List" icon="gtk-justify-fill" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('kit_check', '=', False)]}"/>
524
 
                                                                        <field name="lot_check"/>
525
 
                                                                        <field name="exp_check"/>
526
 
                                                                        <field name="kc_check"/>
527
 
                                                                        <field name="ssl_check" invisible="True"/>
528
 
                                                                        <field name="dg_check"/>
529
 
                                                                        <field name="np_check"/>
530
 
                                </tree>   
531
 
                                                                <form string="Stock Moves">
 
536
                                    <field name="state"/>
 
537
                                    <field name="fake_state" invisible="1"/>
 
538
                                    <field name="kit_check" invisible="True"/>
 
539
                                    <button name="create_composition_list" type="object" string="Create Composition List" icon="gtk-justify-fill" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('kit_check', '=', False)]}"/>
 
540
                                    <button name="in_action_confirm" states="draft,confirmed" string="Confirm" type="object" icon="gtk-apply"/>
 
541
                                    <field name="lot_check"/>
 
542
                                    <field name="exp_check"/>
 
543
                                    <field name="kc_check"/>
 
544
                                    <field name="ssl_check" invisible="True"/>
 
545
                                    <field name="dg_check"/>
 
546
                                    <field name="np_check"/>
 
547
                                </tree>
 
548
                                <form string="Stock Moves">
532
549
                                    <group colspan="2" col="4">
533
550
                                        <separator colspan="4" string="Move Information"/>
 
551
                                        <field name="from_wkf_line" invisible="1" />
534
552
                                        <field name="name" invisible="1" colspan="4"/>
535
 
                                        <field name="product_id" context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id, parent.type)" colspan="4"/>
 
553
                                        <field name="product_id"
 
554
                                                context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}"
 
555
                                                on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id, parent.type, purchase_line_id)"
 
556
                                                colspan="4"
 
557
                                                attrs="{'readonly': [('from_wkf_line', '=', True)]}"
 
558
                                                 />
 
559
                                        <field name="purchase_line_id" invisible="1"/>
536
560
                                                                <field name="change_reason" colspan="4"/>
537
 
                                                                                <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="2"/>
538
 
                                        <field name="product_uom" string="Unit Of Measure" colspan="2"/>
 
561
                                                                                <field name="product_qty"
 
562
                                                                                        on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
 
563
                                                                                        attrs="{'readonly': [('from_wkf_line', '=', True)]}"
 
564
                                                                                        colspan="2"
 
565
                                                                                         />
 
566
                                        <field name="product_uom"
 
567
                                                string="Unit Of Measure"
 
568
                                                attrs="{'readonly': [('from_wkf_line', '=', True)]}"
 
569
                                                colspan="2"/>
539
570
                                        <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" colspan="4" invisible="1"/>
540
571
                                        <field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" invisible="1"/>
541
572
                                        <field name="product_packaging" domain="[('product_id','=',product_id)]" colspan="4" invisible="1" />
543
574
 
544
575
                                    <group colspan="2" col="2">
545
576
                                        <separator string="Locations" colspan="2"/>
546
 
                                        <field name="location_id" domain="[('usage', '=', 'supplier')]" context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}"/>
 
577
                                        <field name="location_id"
 
578
                                                domain="[('usage', '!=', 'view'), ('usage', '=', 'supplier')]"
 
579
                                                context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}"
 
580
                                                attrs="{'readonly': [('from_wkf_line', '=', True)]}"
 
581
                                                 />
547
582
                                                                <field name="product_type" invisible="1"/>
548
 
                                                        <field name="location_dest_id" domain="[('usage', '=', product_type=='service_recep' and 'inventory' or 'internal'), ('service_location', '=', product_type=='service_recep' and True or False)]" on_change="location_dest_change(location_dest_id)"/>
 
583
                                        <field name="location_dest_id"
 
584
                                            domain="[('usage', '!=', 'view'), ('incoming_dest', '=', product_id)]"
 
585
                                            on_change="location_dest_change(location_dest_id)"
 
586
                                            />
 
587
                                    <field name="move_cross_docking_ok" invisible="1"/>
549
588
                                                        </group>
550
589
                                                        
551
590
                                                        <group colspan="2" col="4">
553
592
                                        <field name="asset_id" colspan="4" />
554
593
                                        <field name="prodlot_id" context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}" domain="[('product_id','=?',product_id), ('check_type','=', True)]" on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="2" attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}"/>
555
594
                                        <field name="expired_date"/>
556
 
                                                        <field name="kit_check" invisible="True"/>
557
 
                                                                                <button name="create_composition_list" type="object" string="Create Composition List" icon="gtk-justify-fill" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('kit_check', '=', False)]}"/>
558
 
                                                                                <field name="hidden_batch_management_mandatory" invisible="True"/>
559
 
                                                        <field name="hidden_perishable_mandatory" invisible="True"/>
560
 
                                                        <group colspan="4" col="10">
561
 
                                                                                        <field name="lot_check"/>
562
 
                                                                        <field name="exp_check"/>
563
 
                                                                        <field name="kc_check"/>
564
 
                                                                                <field name="ssl_check" invisible="True"/>
565
 
                                                                                <field name="dg_check"/>
566
 
                                                                                <field name="np_check"/>
567
 
                                                                        </group>
568
 
                                                                        <field name="reason_type_id" widget="selection" attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
 
595
                                        <field name="kit_check" invisible="True"/>
 
596
                                        <button name="create_composition_list" type="object" string="Create Composition List" icon="gtk-justify-fill" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('kit_check', '=', False)]}"/>
 
597
                                        <field name="hidden_batch_management_mandatory" invisible="True"/>
 
598
                                        <field name="hidden_perishable_mandatory" invisible="True"/>
 
599
                                        <group colspan="4" col="10">
 
600
                                            <field name="lot_check"/>
 
601
                                            <field name="exp_check"/>
 
602
                                            <field name="kc_check"/>
 
603
                                            <field name="ssl_check" invisible="True"/>
 
604
                                            <field name="dg_check"/>
 
605
                                            <field name="np_check"/>
 
606
                                        </group>
 
607
                                        <field name="reason_type_id" widget="selection" attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
569
608
                                    </group>
570
609
 
571
610
                                    <group colspan="2" col="2">
579
618
                                    <field name="state"/>
580
619
                                    <group col="4" colspan="2">
581
620
                                        <button name="action_cancel" states="assigned" string="Cancel" type="object" icon="gtk-cancel"/>
582
 
                                        <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
 
621
                                        <button name="in_action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
583
622
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
584
623
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
585
624
                                    </group>
603
642
                                    confirm="Warning, you are going to Cancel and Resource!"
604
643
                                    />
605
644
 
606
 
                                <button name="draft_force_assign" states="draft" string="Validate" type="object" icon="gtk-apply"/>
 
645
                                <button name="draft_force_assign" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
607
646
                                <button name="action_assign" states="" string="Check Availability" type="object" icon="gtk-find"/>
608
647
                                <button name="force_assign" states="" string="Force Availability" type="object" icon="gtk-jump-to"/>
609
648
                                <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
620
659
                        </page>
621
660
                        <page string="Notes">
622
661
                            <field colspan="4" name="note" nolabel="1"/>
623
 
                            <field name="from_wkf" invisible="1"/>
624
662
                        </page>
625
663
                    </notebook>
626
664
                </form>
627
 
                </field>
 
665
            </field>
628
666
        </record>
629
 
        
 
667
 
630
668
        <record id="stock.view_move_search" model="ir.ui.view">
631
669
            <field name="name">stock.move.search</field>
632
670
            <field name="model">stock.move</field>
736
774
                    </group>
737
775
                    <notebook colspan="4">
738
776
                        <page string="Products">
 
777
                            <field name="from_wkf" invisible="1"/>
739
778
                            <field name="move_lines"
740
779
                                colspan="4"
741
780
                                nolabel="1"
742
781
                                widget="one2many_list"
743
782
                                default_get="{'move_line':move_lines, 'address_out_id': address_id}"
744
 
                                context="{'subtype': 'standard', 'type': 'out', 'reason_type_id': reason_type_id}" 
745
 
                                on_change="onchange_move()"
746
 
                                attrs="{'readonly': [('from_wkf', '=', True), ('state', 'in', ['draft', 'confirmed', 'assigned'])]}"
 
783
                                context="{'subtype': subtype, 'type': 'out', 'reason_type_id': reason_type_id, 'move_line':move_lines, 'address_out_id': address_id, 'warehouse_id': warehouse_id, 'from_wkf': from_wkf}"
747
784
                                >
748
 
                                <tree colors="grey:scrapped==True" string="Stock Moves">
 
785
                                <tree colors="grey:scrapped==True" string="Stock Moves" noteditable="fake_state=='assigned'" hide_new_button="context.get('from_wkf')" hide_delete_button="context.get('from_wkf')">
749
786
                                    <field name="line_number"/>
750
787
                                    <field name="product_id"/>
751
788
                                    <field name="composition_list_id"/>
759
796
                                    <button name="%(stock.track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}" states="draft,assigned,confirmed"/>
760
797
                                    <field name="tracking_id" />
761
798
                                    <field name="location_id"/>
762
 
                                    <field name="move_cross_docking_ok" invisible="1"/>
763
799
                                    <field name="date" string="Actual Shipped Date"/>
764
800
                                    <field name="state"/>
 
801
                                    <field name="fake_state" invisible="1"/>
765
802
                                    <button name="cancel_assign" string="Cancel Availability" type="object" icon="gtk-undo" states="assigned"/>
766
803
                                    <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
767
804
                                    <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
777
814
                                    <group colspan="2" col="4">
778
815
                                        <separator colspan="4" string="Move Information"/>
779
816
                                        <field name="name" invisible="1" colspan="4"/>
780
 
                                        <field name="product_id" context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id,parent.type)" colspan="4"/>
781
 
                                        <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="2"/>
782
 
                                        <field name="product_uom" string="Unit Of Measure" colspan="2"/>
 
817
                                        <field name="from_wkf_line" invisible="1" />
 
818
                                        <field name="product_id"
 
819
                                            domain="[('type', 'not in', ('service', 'service_recep'))]"
 
820
                                            context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}" 
 
821
                                            on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id,parent.type, purchase_line_id, True)"
 
822
                                            attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
 
823
                                            colspan="4"
 
824
                                             />
 
825
                                        <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
 
826
                                                attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
 
827
                                                colspan="2"
 
828
                                                 />
 
829
                                        <field name="product_uom"
 
830
                                                string="Unit Of Measure"
 
831
                                                attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
 
832
                                                colspan="2"
 
833
                                                 />
783
834
                                        <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" colspan="4" invisible="1"/>
784
835
                                        <field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" invisible="1"/>
785
836
                                        <field name="product_packaging" domain="[('product_id','=',product_id)]" colspan="4"  invisible="1"/>
 
837
                                        <field name="purchase_line_id" invisible="1"/>
786
838
                                    </group>
787
839
 
788
840
                                    <group colspan="2" col="2">
789
841
                                        <separator string="Locations" colspan="2"/>
790
842
                                        <field name="location_virtual_id" invisible="1"/>
791
843
                                        <field name="location_output_id" invisible="1"/>
792
 
                                        <field name="location_id" domain="[('standard_out_ok', '=', 'src')]" context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}"/>
793
 
                                        <field name="location_dest_id" domain="[('standard_out_ok', '=', 'dest')]" on_change="location_dest_change(location_dest_id)"/>
 
844
                                        <field name="location_id"
 
845
                                            domain="[('outgoing_src', '=', product_id), ('usage', '!=', 'view')]"
 
846
                                            attrs="{'readonly': [('state', '=', 'assigned')]}"
 
847
                                            context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}"/>
 
848
                                        <field name="move_cross_docking_ok" invisible="1"/>
 
849
                                        <field name="location_dest_id"
 
850
                                                domain="[('usage', '!=', 'view'), '|', ('output_ok', '=', True), ('usage', '=', 'customer')]"
 
851
                                                on_change="location_dest_change(location_dest_id)"
 
852
                                                attrs="{'readonly': [('from_wkf_line', '=', True)]}"
 
853
                                                 />
794
854
                                    </group>
795
855
                                    
796
856
                                    <group colspan="2" col="4">
833
893
                                <field name="subtype" invisible="True"/>
834
894
                                <field name="delivered" invisible="True"/>
835
895
                                <field name="state_hidden"/>
836
 
                                <button name="set_delivered" icon="gtk-apply" type="object" string="Validate Delivery" attrs="{'invisible': ['|', '|', '|', ('type', '!=', 'out'), ('subtype', '!=', 'standard'), ('state', '!=', 'done'), ('delivered', '=', True)]}"/>
 
896
                                <button name="set_delivered" icon="gtk-apply" type="object" string="Confirm Delivery" attrs="{'invisible': ['|', '|', '|', ('type', '!=', 'out'), ('subtype', '!=', 'standard'), ('state', '!=', 'done'), ('delivered', '=', True)]}"/>
837
897
                                <field name="cross_docking_ok" invisible="1"/>
838
898
                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
839
 
                                <button name="draft_force_assign" states="draft" string="Validate" type="object" icon="gtk-apply"/>
 
899
                                <button name="draft_force_assign" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
840
900
                                <button name="action_assign" states="confirmed,assigned" string="Check Availability" type="object" icon="gtk-find"/>
841
901
                                <button name="force_assign" states="confirmed,assigned" string="Force Availability" type="object" icon="gtk-jump-to"/>
842
902
                                <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
856
916
                        </page>
857
917
                        <page string="Notes">
858
918
                            <field colspan="4" name="note" nolabel="1"/>
859
 
                            <field name="from_wkf" readonly="1"/>
860
919
                        </page>
861
920
                    </notebook>
862
921
                </form>
874
933
                </field>
875
934
            </field>
876
935
        </record>
 
936
        
 
937
        <!-- Stock inventory -->
 
938
        <record id="stock.view_inventory_form" model="ir.ui.view">
 
939
            <field name="name">stock.inventory.form</field>
 
940
            <field name="model">stock.inventory</field>
 
941
            <field name="type">form</field>
 
942
            <field name="arch" type="xml">
 
943
                <form string="Physical Inventory" hide_delete_button="1">
 
944
                    <field name="name" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
 
945
                    <field name="date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
 
946
                    <notebook colspan="4">
 
947
                    <page string="General Informations">
 
948
                        <field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list"  attrs="{'readonly': [('state', '!=', 'draft')]}">
 
949
                            <tree string="Products" editable="bottom" hide_delete_button="1">
 
950
                                <field colspan="4" domain="[('usage','=','internal')]" name="location_id"
 
951
                                    on_change="on_change_location_id(location_id,product_id,prod_lot_id,product_uom,parent.date)"
 
952
                                    context="{'product_id': product_id, 'prodlot_id': prod_lot_id, 'specific_rules_tree_view': True, 'compute_child': False}" />
 
953
                                <field context="location=location_id,uom=product_uom,to_date=parent.date,compute_child=False" name="product_id" on_change="on_change_product_id_specific_rules(location_id,product_id,prod_lot_id,product_uom,parent.date)"  domain="[('type','not in',('service','service_recep'))]" />
 
954
                                <field name="reason_type_id" widget="selection" domain="[('is_inventory', '=', True)]" />
 
955
                                <field name="prod_lot_id"
 
956
                                    on_change="change_lot(location_id,product_id,prod_lot_id,product_uom,parent.date)"
 
957
                                    groups="base.group_extended"
 
958
                                    context="{'location_id':location_id, 'product_id': product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory, 'search_default_real': True}"
 
959
                                    domain="[('check_type','=', True), ('product_id', '=?', product_id)]"
 
960
                                    attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
 
961
                                <field name="expiry_date"
 
962
                                    on_change="change_expiry(expiry_date, product_id, type_check)"
 
963
                                    attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
 
964
                                <field name="product_qty"/>
 
965
                                <field name="product_uom"/>
 
966
                                <field name="hidden_perishable_mandatory" invisible="True" />
 
967
                                <field name="hidden_batch_management_mandatory" invisible="True" />
 
968
                                <field name="type_check" invisible="True" />
 
969
                                <field name="lot_check" />
 
970
                                <field name="exp_check" />
 
971
                                <field name="kc_check" />
 
972
                                <field name="ssl_check" invisible="True" />
 
973
                                <field name="dg_check" />
 
974
                                <field name="np_check" />
 
975
                                <field name="comment" />
 
976
                                <button name="%(stock.action_view_stock_inventory_line_split)d"
 
977
                                    string="Split inventory lines" groups="base.group_extended"
 
978
                                    type="action" icon="terp-stock_effects-object-colorize" states="draft,confirm"/>
 
979
                                <field name="state" invisible="True"/>
 
980
                            </tree>
 
981
                            <form string="Products ">
 
982
                                <field domain="[('usage','=','internal')]" name="location_id"/>
 
983
                                <newline/>
 
984
                                <field context="location=location_id,uom=product_uom,to_date=parent.date" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)"  domain="[('type','&lt;&gt;','service')]"/>
 
985
                                <field name="product_qty"/>
 
986
                                <field name="product_uom"/>
 
987
                                <group colspan="2" col="4">
 
988
                                <field name="prod_lot_id" groups="base.group_extended"/>
 
989
                                    <button name="%(stock.action_view_stock_inventory_line_split)d"
 
990
                                        string="Split inventory lines" groups="base.group_extended"
 
991
                                        type="action" icon="terp-stock_effects-object-colorize"/>
 
992
                                </group>
 
993
                            </form>
 
994
                        </field>
 
995
                    </page>
 
996
                    <page string="Posted Inventory" groups="base.group_extended">
 
997
                             <field colspan="2" name="move_ids" nolabel="1" widget="one2many_list" context="{'inventory_id':active_id}"  attrs="{'readonly': [('state', '!=', 'draft')]}">
 
998
                                <tree string="Stock Moves">
 
999
                                    <field name="product_id"/>
 
1000
                                    <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
 
1001
                                    <field name="product_uom" string="UoM"/>
 
1002
                                    <field name="prodlot_id" groups="base.group_extended"/>
 
1003
                                    <field name="reason_type_id" widget="selection" domain="[('is_inventory', '=', True)]" />
 
1004
                                     <button name="%(stock.track_line)d" string="Split in production lots" type="action"
 
1005
                                        icon="terp-stock_effects-object-colorize"
 
1006
                                        attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
 
1007
                                        states="draft,done,cancel"
 
1008
                                        context="{'inventory_id':parent.id}"
 
1009
                                        groups="base.group_extended"/>
 
1010
                                     <field groups="base.group_extended" name="tracking_id"/>
 
1011
                                     <button name="%(stock.split_into)d" string="Put in a new pack" type="action"
 
1012
                                        groups="base.group_extended"
 
1013
                                        icon="terp-stock_effects-object-colorize"
 
1014
                                        context="{'inventory_id':parent.id}"
 
1015
                                        states="draft,done,cancel"/>
 
1016
                                    <field name="location_id"/>
 
1017
                                    <field name="location_dest_id"/>
 
1018
                                    <field name="date" string="Date"/>
 
1019
                                    <field name="state"  invisible="True"/>
 
1020
                                </tree>
 
1021
                             </field>
 
1022
                    </page>
 
1023
                    </notebook>
 
1024
                    <group col="2" colspan="2">
 
1025
                     <field name="state"/>
 
1026
                    </group>
 
1027
                    <group col="3" colspan="2">
 
1028
                        <button name="action_cancel_inventary" states="draft,confirm,done" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
 
1029
                        <button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
 
1030
                        <button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to"/>
 
1031
                        <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
 
1032
                    </group>
 
1033
                </form>
 
1034
            </field>
 
1035
        </record>
877
1036
 
878
1037
    </data>
879
1038
</openerp>