~savoirfairelinux-openerp/c2c-rd-addons/c2c-rd-addons

« back to all changes in this revision

Viewing changes to purchase_landed_costs/purchase_view.xml

  • Committer: Joao Alfredo Gama Batista
  • Date: 2014-12-16 20:39:45 UTC
  • Revision ID: joao.gama@savoirfairelinux.com-20141216203945-otq3ftpa0b0dyc8v
[FIX] Remove module purchase_landed_costs to avoid duplication with the purchase-workflow version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<openerp>
3
 
  <data>
4
 
 
5
 
     <record model="ir.ui.view" id="c2c_landed_cost_tree">
6
 
      <field name="name">c2clanded.cost.tree</field>
7
 
      <field name="model">landed.cost.position</field>
8
 
      <field name="priority">1</field>
9
 
      <field name="type">tree</field>
10
 
      <field name="arch" type="xml">
11
 
        <tree string="Landing Costs" editable="bottom">
12
 
              <field name="product_id" context="{'landed_cost_type':'per_unit'}" on_change="onchange_product_id(product_id)"/>
13
 
              <field name="partner_id"/>
14
 
              <field name="amount"/>
15
 
              <field name="price_type"/>
16
 
              <field name="amount_currency"/>
17
 
              <field name="currency_id"/>
18
 
        </tree>
19
 
      </field>
20
 
    </record>
21
 
 
22
 
     <record model="ir.ui.view" id="c2c_landed_cost_form">
23
 
      <field name="name">c2clanded.cost.form</field>
24
 
      <field name="model">landed.cost.position</field>
25
 
      <field name="priority">1</field>
26
 
      <field name="type">form</field>
27
 
      <field name="arch" type="xml">
28
 
        <form string="Landing Costs">
29
 
              <field name="product_id" on_change="onchange_product_id(product_id)"/>
30
 
              <field name="partner_id"/>
31
 
              <field name="amount"/>
32
 
              <field name="price_type"/>
33
 
              <field name="amount_currency"/>
34
 
              <field name="currency_id"/>
35
 
        </form>
36
 
      </field>
37
 
    </record>
38
 
    
39
 
 
40
 
              
41
 
        <!-- ******************
42
 
         Landed cost definition in product form
43
 
         ******************-->
44
 
    <record model="ir.ui.view" id="c2c_product_landed_cost_view">
45
 
      <field name="name">c2c_product.landed.cost.view</field>
46
 
      <field name="model">product.product</field>
47
 
      <field name="inherit_id" ref="product.product_normal_form_view"/>
48
 
      <field name="type">form</field>
49
 
      <field name="arch" type="xml">
50
 
        <field name="description" position="before">
51
 
           <group>
52
 
             <field name="landed_cost_type"/>
53
 
             <field name="landed_cost"/>
54
 
           </group>
55
 
        </field>
56
 
      </field>
57
 
    </record>
58
 
    
59
 
    <!-- Landed costs Purchase Form-->
60
 
    <record model="ir.ui.view" id="c2c_purchase_order_landed_cost_view">
61
 
      <field name="name">c2c_purchase.order.landed.cost.form.view</field>
62
 
      <field name="model">purchase.order</field>
63
 
      <field name="inherit_id" ref="purchase.purchase_order_form"/>
64
 
      <field name="arch" type="xml">
65
 
        <data>
66
 
          <field name="price_subtotal" position="after">
67
 
            <field name="landing_costs" invisible="1"/>
68
 
            <field name="landing_costs_order"/>
69
 
            <field name="landed_costs"/>
70
 
          </field> 
71
 
 
72
 
          <notebook position="inside">
73
 
            <page string="Landing Costs" attrs="{'readonly':[('state','=','done')]}">
74
 
              <group>
75
 
                <field name="quantity_total"/>
76
 
                <field name="landed_cost_base_quantity" />
77
 
                <field name="landed_cost_base_value" />
78
 
              </group>
79
 
 
80
 
              <group colspan="2" col="2"> 
81
 
                <field name="landing_cost_lines"/>
82
 
                <field name="landed_cost"/>
83
 
              </group>
84
 
 
85
 
              <field
86
 
                name="landed_cost_line_ids"
87
 
                colspan="4"
88
 
                nolabel="1"
89
 
                widget="one2many_list"
90
 
                attrs="{'readonly': [('state', 'in', ('approved', 'done'))]}" />
91
 
            </page>
92
 
          </notebook>
93
 
        </data>
94
 
      </field>
95
 
    </record>
96
 
    
97
 
    <!-- Landed costs Purchase Line Form-->
98
 
    <record model="ir.ui.view" id="purchase_oder_line_landed_cost_view">
99
 
      <field name="name">purchase.oder.line.landed.cost.view</field>
100
 
      <field name="model">purchase.order.line</field>
101
 
      <field name="inherit_id" ref="purchase.purchase_order_line_form"/>
102
 
      <field name="type">form</field>
103
 
      <field name="arch" type="xml">
104
 
        <notebook position="inside">
105
 
             <page string="Landing Costs" >
106
 
                <group colspan="2" col="2"> 
107
 
                  <field name="landing_costs"/>
108
 
                  <field name="landing_costs_order"/>
109
 
                  <field name="landed_costs"/>
110
 
                  <field name="landed_cost_line_ids" colspan="4" nolabel="1"  widget="one2many_list"/>
111
 
                </group>  
112
 
             </page>     
113
 
        </notebook>
114
 
      </field>
115
 
    </record>
116
 
 
117
 
  </data>
118
 
</openerp>