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

« back to all changes in this revision

Viewing changes to sourcing/sourcing_view.xml

  • Committer: Quentin THEURET
  • Date: 2011-12-19 18:17:59 UTC
  • mto: (451.4.7 test_uf_631)
  • mto: This revision was merged to the branch mainline in revision 523.
  • Revision ID: qt@tempo-consulting.fr-20111219181759-coktzw4gwaygpfdx
UF-631 [ADD] Added documents_done module

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                        <field name="type">tree</field>
42
42
                        <field name="arch" type="xml">
43
43
                                <tree string="Sourcing Lines" editable="top" hide_new_button="1" hide_delete_button="1" colors="red:priority=='emergency';darkgreen:priority=='urgent';blue:priority=='medium'">
44
 
 
 
44
                                        <field name="display_confirm_button" invisible="True" />
 
45
                                        <field name="procurement_request" invisible="True" />
45
46
                                        <field name="name" invisible="True" />
46
47
                                        <field name="sale_order_id" />
47
48
                                        <field name="priority" />
58
59
                                        <field name="real_stock" />
59
60
                                        <field name="available_stock" />
60
61
                                        <field name="virtual_stock" />
61
 
                                        <field name="supplier" colspan="2" context="{'product_id': product_id, 'choose_supplier': True}" attrs="{'readonly': ['|', ('type', '=', 'make_to_stock'), ('state', '!=', 'draft')]}"
 
62
                                        <!-- do not work: attrs="{'readonly': ['|', '|', ('type', '=', 'make_to_stock'), '&amp;', ('type', '=', 'make_to_order'), ('po_cft', '=', 'cft'), ('state', '!=', 'draft')]}" -->
 
63
                                        <field name="company_id" invisible="1" />
 
64
                                        <field name="supplier" colspan="2"
 
65
                                                domain="[('id', '!=', company_id)]"
 
66
                                                context="{'product_id': product_id, 'choose_supplier': True}"
 
67
                                                attrs="{'readonly': ['|', ('type', '=', 'make_to_stock'), ('state', '!=', 'draft')]}"
62
68
                                                on_change="onChangeSupplier(supplier)" />
63
69
                                        <field name="estimated_delivery_date" />
64
 
                                        <button name="confirmLine" string="Confirm line" icon="gtk-go-forward" type="object" attrs="{'invisible':[('state', '!=', 'draft')]}" />
 
70
                                        <button name="confirmLine" string="Confirm line" icon="gtk-go-forward" type="object" attrs="{'invisible':[('display_confirm_button', '=', False)]}" />
65
71
                                        <!-- does not work. openerp bug ? <button name="unconfirmLine" string="Unconfirm Line" icon="gtk-cancel" type="object" attrs="{'invisible':['|', ('state', '!=', 'confirmed'), ('sale_order_state', '!=', 'draft')]}" />--> 
66
72
 
67
73
                                </tree>
74
80
                        <field name="type">search</field>
75
81
                        <field name="arch" type="xml">
76
82
                                <search string="Sourcing Line">
 
83
                                
 
84
                                        <!-- <filter name="need_sourcing" string="Need Sourcing" icon="gtk-indent" domain="[('display_confirm_button', '=', True)]" /> -->
 
85
                                        <filter name="need_sourcing" string="Need Sourcing" icon="terp-stock_zoom" domain="[('need_sourcing', '=', True)]" />
 
86
                                        <filter name="sourced" string="Sourced" icon="terp-camera_test" domain="['&amp;', '|', ('state', '!=', 'draft'), ('procurement_request', '=', True), '|', ('sale_order_state', '!=', 'progress'), ('procurement_request', '=', False)]" />
 
87
                                        <separator orientation="vertical"/>
77
88
                                        <field name="sale_order_id" />
78
89
                                        <field name="priority" />
79
90
                                        <field name="categ" />
104
115
                        <field name="view_type">form</field>
105
116
                        <field name="view_mode">tree,form</field>
106
117
                        <field name="domain">[('sale_order_state','!=','procurement')]</field>
 
118
                        <field name="context">{'search_default_need_sourcing': True}</field>
107
119
                        <field name="search_view_id" ref="sourcing_line_search_form_view" />
108
120
                </record>
109
121