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}"
359
attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
357
361
<field name="product_qty"
358
362
on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
361
<field name="product_uom" string="Unit Of Measure" colspan="2"/>
364
attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
366
<field name="product_uom"
367
string="Unit Of Measure"
369
attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
362
371
<field name="product_uos_qty"
363
372
on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)"
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}"
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)"
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"/>
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'])]}"/>
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'])]}"
510
<tree colors="grey:scrapped==True" string="Stock Moves">
521
colors="grey:scrapped==True"
523
hide_new_button="context.get('from_wkf')"
524
hide_delete_button="context.get('from_wkf')"
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"/>
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"/>
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)"
557
attrs="{'readonly': [('from_wkf_line', '=', True)]}"
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)]}"
566
<field name="product_uom"
567
string="Unit Of Measure"
568
attrs="{'readonly': [('from_wkf_line', '=', True)]}"
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" />
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)]}"
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)"
587
<field name="move_cross_docking_ok" invisible="1"/>
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"/>
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"/>
607
<field name="reason_type_id" widget="selection" attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
571
610
<group colspan="2" col="2">
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')]}"
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')]}"
829
<field name="product_uom"
830
string="Unit Of Measure"
831
attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
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"/>
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)]}"
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"/>
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"/>
981
<form string="Products ">
982
<field domain="[('usage','=','internal')]" name="location_id"/>
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','<>','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"/>
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','<>',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"/>
1024
<group col="2" colspan="2">
1025
<field name="state"/>
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"/>