1
<?xml version="1.0" encoding="UTF-8"?>
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"/>
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"/>
41
<!-- ******************
42
Landed cost definition in product form
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">
52
<field name="landed_cost_type"/>
53
<field name="landed_cost"/>
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">
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"/>
72
<notebook position="inside">
73
<page string="Landing Costs" attrs="{'readonly':[('state','=','done')]}">
75
<field name="quantity_total"/>
76
<field name="landed_cost_base_quantity" />
77
<field name="landed_cost_base_value" />
80
<group colspan="2" col="2">
81
<field name="landing_cost_lines"/>
82
<field name="landed_cost"/>
86
name="landed_cost_line_ids"
89
widget="one2many_list"
90
attrs="{'readonly': [('state', 'in', ('approved', 'done'))]}" />
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"/>