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

« back to all changes in this revision

Viewing changes to sourcing/sourcing_view.xml

  • Committer: Olivier DOSSMANN
  • Date: 2011-12-28 15:38:17 UTC
  • mto: This revision was merged to the branch mainline in revision 492.
  • Revision ID: olivier@tempo-laptop-20111228153817-rd119phuevo66e3y
UF-675 [FIX] Engagement lines deletion when a PO is cancelled.

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" />
59
60
                                        <field name="available_stock" />
60
61
                                        <field name="virtual_stock" />
61
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" />
62
64
                                        <field name="supplier" colspan="2"
 
65
                                                domain="[('id', '!=', company_id)]"
63
66
                                                context="{'product_id': product_id, 'choose_supplier': True}"
64
67
                                                attrs="{'readonly': ['|', ('type', '=', 'make_to_stock'), ('state', '!=', 'draft')]}"
65
68
                                                on_change="onChangeSupplier(supplier)" />
66
69
                                        <field name="estimated_delivery_date" />
67
 
                                        <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)]}" />
68
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')]}" />--> 
69
72
 
70
73
                                </tree>
77
80
                        <field name="type">search</field>
78
81
                        <field name="arch" type="xml">
79
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"/>
80
88
                                        <field name="sale_order_id" />
81
89
                                        <field name="priority" />
82
90
                                        <field name="categ" />
107
115
                        <field name="view_type">form</field>
108
116
                        <field name="view_mode">tree,form</field>
109
117
                        <field name="domain">[('sale_order_state','!=','procurement')]</field>
110
 
                        <field name="context">{'search_default_sale_order_state': 'draft'}</field>
 
118
                        <field name="context">{'search_default_need_sourcing': True}</field>
111
119
                        <field name="search_view_id" ref="sourcing_line_search_form_view" />
112
120
                </record>
113
121