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

« back to all changes in this revision

Viewing changes to stock_override/stock_view.xml

  • Committer: jf
  • Date: 2012-11-29 13:00:27 UTC
  • mfrom: (1287.9.8 unifield-wm)
  • Revision ID: jfb@tempo-consulting.fr-20121129130027-564r4yns8t5d2v7d
UTP-368 [FIX] Shouldn't be possible to source a non-stockable product to stock in the order sourcing tool (fix unit test)
lp:~unifield-team/unifield-wm/utp-368

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
                <xpath expr="/form//field[@name='sale_id']" position="attributes">
50
50
                    <attribute name="attrs">{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}</attribute>
51
51
                </xpath>
52
 
                <xpath expr="/form//field[@name='partner_id2']" position="attributes">
53
 
                    <attribute name="domain">[('customer', '=', True)]</attribute>
54
 
                </xpath>
55
52
            </field>
56
53
        </record>
57
54
 
308
305
                        </group>
309
306
                        <group colspan="2" col="2">
310
307
                            <field name="date" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
311
 
                            <field name="min_date" string="Expected Move Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"
312
 
                                        on_change="change_min_date()" required="1"/>
313
 
                            <field name="min_date_manually" invisible="1" />
 
308
                            <field name="min_date" string="Expected Move Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"/>
314
309
                       </group>
315
310
                    </group>
316
311
                    <notebook colspan="4">
320
315
                                colspan="4"
321
316
                                nolabel="1"
322
317
                                widget="one2many_list"
323
 
                                default_get="{'move_line':move_lines and [move_lines[-1]] or [], 'date_expected': min_date, 'reason_type_id': reason_type_id}"
324
 
                                context="{'reason_type_id': reason_type_id, 'from_wkf': from_wkf, 'date_expected': min_date}"
 
318
                                default_get="{'move_line':move_lines and [move_lines[-1]] or []}"
 
319
                                context="{'reason_type_id': reason_type_id, 'from_wkf': from_wkf}"
325
320
                                on_change="onchange_move()"
326
321
                                >
327
 
                                <tree colors="grey:scrapped == True; red: inactive_product == True" string="Stock Moves" noteditable="fake_state=='assigned'" hide_new_button="context.get('from_wkf')" hide_delete_button="context.get('from_wkf')">
 
322
                                <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')">
328
323
                                    <field name="line_number"/>
329
324
                                    <field name="product_id"/>
330
325
                                    <field name="composition_list_id"/>
335
330
                                    <field name="asset_id"/>
336
331
                                    <field name="prodlot_id"/>
337
332
                                    <field name="expired_date"/>
338
 
 
339
 
                                    <!--<button name="%(stock.track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" states="draft,waiting,confirmed,assigned"/>-->
340
 
 
 
333
                                    <button name="%(stock.track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" states="draft,waiting,confirmed,assigned"/>
341
334
                                    <field name="tracking_id"/>
342
335
                                    <field name="location_id"/>
343
336
                                    <field name="location_dest_id"/>
353
346
                                    <field name="ssl_check" invisible="True"/>
354
347
                                    <field name="dg_check"/>
355
348
                                    <field name="np_check"/>
356
 
                                    <field name="inactive_product" invisible="1" />
357
 
                                                <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
358
349
                                </tree>
359
350
 
360
351
                                <form string="Stock Moves">
364
355
                                        <field name="from_wkf_line" invisible="1" />
365
356
                                        <field name="product_id"
366
357
                                            on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id, parent.type)"
367
 
                                            context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True}"
 
358
                                            context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}"
368
359
                                            colspan="4"
369
360
                                            attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
370
361
                                            />
441
432
                                    <field name="state"/>
442
433
                                    <group col="4" colspan="2">
443
434
                                        <button name="action_cancel" states="assigned" string="Cancel" type="object" icon="gtk-cancel"/>
 
435
                                        <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
444
436
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
445
437
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
446
438
                                    </group>
517
509
                            <field name="change_reason"/>
518
510
                        </group>
519
511
                        <group colspan="2" col="2">
520
 
                            <field name="date" string="Creation Date" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
521
 
                            <field name="min_date" string="Expected Receipt Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"
522
 
                            on_change="change_min_date()" required="1" />
523
 
                            <field name="min_date_manually" invisible="1" />
 
512
                            <field name="date" string="Actual Receipt Date" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
 
513
                            <field name="min_date" string="Expected Receipt Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"/>
524
514
                            <field name="warehouse_id" widget="selection" attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
525
515
                        </group>
526
516
                    </group>
534
524
                                on_change="onchange_move()"
535
525
                                >
536
526
                                <tree
537
 
                                    colors="grey:scrapped==True; red: inactive_product == True"
 
527
                                    colors="grey:scrapped==True"
538
528
                                    string="Stock Moves"
539
529
                                    hide_new_button="context.get('from_wkf')"
540
530
                                    hide_delete_button="context.get('from_wkf')"
541
531
                                    >
542
532
                                    <field name="line_number"/>
543
533
                                    <field name="product_id"/>
544
 
                                    <field name="inactive_product" invisible="1" />
545
534
                                    <field name="product_qty"/>
546
535
                                    <field name="product_uom" string="UoM"/>
547
536
                                    <field name="scrapped" invisible="1"/>
561
550
                                    <field name="ssl_check" invisible="True"/>
562
551
                                    <field name="dg_check"/>
563
552
                                    <field name="np_check"/>
564
 
                                                <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
565
553
                                </tree>
566
554
                                <form string="Stock Moves">
567
555
                                    <group colspan="2" col="4">
569
557
                                        <field name="from_wkf_line" invisible="1" />
570
558
                                        <field name="name" invisible="1" colspan="4"/>
571
559
                                        <field name="product_id"
572
 
                                                context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True}"
 
560
                                                context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}"
573
561
                                                on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id, parent.type, purchase_line_id)"
574
562
                                                colspan="4"
575
563
                                                attrs="{'readonly': [('from_wkf_line', '=', True)]}"
637
625
                                    <field name="state"/>
638
626
                                    <group col="4" colspan="2">
639
627
                                        <button name="action_cancel" states="assigned" string="Cancel" type="object" icon="gtk-cancel"/>
 
628
                                        <button name="in_action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
640
629
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
641
630
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
642
631
                                    </group>
671
660
                            </group>
672
661
                        </page>
673
662
                        <page string="Additional Info">
674
 
                            <field name="fake_type" readonly="1" />
675
 
                            <field name="type" invisible="1" />
 
663
                            <field name="type" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
676
664
                            <field name="attach_cert" readonly="1" attrs="{'invisible': [('certificate_donation', '=', False)]}"/>
677
665
                            <field name="company_id" widget="selection" invisible="1"/>
678
666
                        </page>
784
772
                        </group>
785
773
                        <group colspan="2" col="2">
786
774
                            <field name="date" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
787
 
                            <field name="min_date" string="Expected Shipped Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"
788
 
                            on_change="change_min_date()" required="1" />
789
 
                            <field name="min_date_manually" invisible="1" />    
 
775
                            <field name="min_date" string="Expected Shipped Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"/>
790
776
                            <field name="warehouse_id"
791
777
                                widget="selection"
792
778
                                attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}"
800
786
                                colspan="4"
801
787
                                nolabel="1"
802
788
                                widget="one2many_list"
803
 
                                default_get="{'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id, 'date_expected': min_date, 'reason_type_id': reason_type_id}"
804
 
                                context="{'subtype': subtype, 'type': 'out', 'reason_type_id': reason_type_id, 'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id, 'warehouse_id': warehouse_id, 'from_wkf': from_wkf, 'date_expected': min_date}"
805
 
                                on_change="onchange_move()"
 
789
                                default_get="{'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id}"
 
790
                                context="{'subtype': subtype, 'type': 'out', 'reason_type_id': reason_type_id, 'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id, 'warehouse_id': warehouse_id, 'from_wkf': from_wkf}"
806
791
                                >
807
 
                                <tree colors="grey:scrapped==True; red: inactive_product == True" string="Stock Moves" noteditable="fake_state=='assigned'" hide_new_button="context.get('from_wkf')" hide_delete_button="context.get('from_wkf')">
 
792
                                <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')">
808
793
                                    <field name="line_number"/>
809
794
                                    <field name="product_id"/>
810
795
                                    <field name="composition_list_id"/>
815
800
                                    <field name="scrapped" invisible="1"/>
816
801
                                    <field name="prodlot_id"/>
817
802
                                    <field name="expired_date"/>
818
 
 
819
 
 
820
 
                                    <!-- <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"/> -->
821
 
 
822
 
 
 
803
                                    <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"/>
823
804
                                    <field name="tracking_id" />
824
805
                                    <field name="location_id"/>
825
806
                                    <field name="date" string="Actual Shipped Date"/>
834
815
                                    <field name="ssl_check" invisible="True"/>
835
816
                                    <field name="dg_check"/>
836
817
                                    <field name="np_check"/>
837
 
                                    <field name="inactive_product" invisible="1" />
838
 
                                                <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
839
818
                                    <button name="%(stock.action_partial_move_server)d" string="Process" type="action" states="confirmed,assigned" icon="gtk-go-forward" invisible="1"/>
840
819
                                </tree>
841
820
                                <form string="Stock Moves">
844
823
                                        <field name="name" invisible="1" colspan="4"/>
845
824
                                        <field name="from_wkf_line" invisible="1" />
846
825
                                        <field name="product_id"
847
 
                                            context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True}" 
 
826
                                            context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}" 
848
827
                                            on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id,parent.type, purchase_line_id, True)"
849
828
                                            attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
850
829
                                            colspan="4"
911
890
                                    <field name="state"/>
912
891
                                    <group col="4" colspan="2">
913
892
                                        <button name="action_cancel" states="assigned" string="Cancel" type="object" icon="gtk-cancel"/>
 
893
                                        <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
914
894
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
915
895
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
916
896
                                    </group>
1029
1009
                                    <field name="product_uom" string="UoM"/>
1030
1010
                                    <field name="prodlot_id" />
1031
1011
                                    <field name="reason_type_id" widget="selection" domain="[('is_inventory', '=', True)]" />
1032
 
                                     <button name="%(stock.track_line)d" string="Split in production" type="action"
 
1012
                                     <button name="%(stock.track_line)d" string="Split in production lots" type="action"
1033
1013
                                        icon="terp-stock_effects-object-colorize"
1034
1014
                                        attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
1035
1015
                                        states="draft,done,cancel"