1 <?xml version="1.0" encoding="UTF-8"?>
5 <!-- Stock Landed Cost Form View -->
6 <record id='view_stock_landed_cost_form' model='ir.ui.view'>
7 <field name="name">stock.landed.cost.form</field>
8 <field name="model">stock.landed.cost</field>
9 <field name="arch" type="xml">
10 <form string="Landed Costs">
12 <button name="button_validate" string="Validate" states="draft" class="oe_highlight" type="object"/>
13 <button name="button_cancel" string="Cancel" states="draft" type="object"/>
14 <field name="state" widget="statusbar" statusbar_visible="draft,done"/>
17 <div class="oe_title">
18 <label for="name" class="oe_edit_only"/>
20 <field name="name" class="oe_inline"/>
26 <field name="picking_ids" widget="many2many_tags" domain="[('state', '=', 'done')]"/>
29 <field name="account_journal_id"/>
30 <field name="account_move_id"/>
34 <separator string="Cost Lines" colspan="4"/>
36 <field name="cost_lines" nolabel="1">
37 <form string="Cost Lines">
40 <field name="product_id"
41 on_change="onchange_product_id(product_id)" domain="[('landed_cost_ok', '=', True)]" context="{'default_landed_cost_ok': True}"/>
42 <field name="price_unit"/>
45 <field name="split_method"/>
46 <field name="account_id"/>
52 <tree string="Cost Lines" editable="bottom">
53 <field name="product_id" on_change="onchange_product_id(product_id)" domain="[('landed_cost_ok', '=', True)]" context="{'default_landed_cost_ok': True}"/>
55 <field name="account_id"/>
56 <field name="split_method"/>
57 <field name="price_unit"/>
62 <group class="oe_subtotal_footer oe_right">
63 <field name="amount_total"/>
67 <separator string="Valuation Adjustments"/>
70 <button name="compute_landed_cost" string="Compute" type="object" class="oe_right"/>
75 <field name="valuation_adjustment_lines" nolabel="1">
76 <form string="Valuation Adjustments">
79 <field name="product_id"/>
80 <field name="quantity"/>
83 <field name="former_cost"/>
84 <field name="additional_landed_cost"/>
88 <tree string="Valuation Adjustments" editable="bottom" create="0">
89 <field name="cost_line_id" readonly="1"/>
90 <field name="product_id" readonly="1"/>
91 <field name="weight" readonly="1"/>
92 <field name="volume" readonly="1"/>
93 <field name="quantity" readonly="1"/>
94 <field name="former_cost_per_unit" readonly="1"/>
95 <field name="former_cost" readonly="1"/>
96 <field name="additional_landed_cost"/>
102 <div class="oe_chatter">
103 <field name="message_follower_ids" widget="mail_followers"/>
104 <field name="message_ids" widget="mail_thread"/>
110 <!-- Stock Landed Cost Tree View -->
111 <record id='view_stock_landed_cost_tree' model='ir.ui.view'>
112 <field name="name">stock.landed.cost.tree</field>
113 <field name="model">stock.landed.cost</field>
114 <field name="arch" type="xml">
115 <tree string="Landed Costs">
118 <field name="state"/>
123 <!-- Stock Landed Cost Search View -->
124 <record id="view_stock_landed_cost_search" model="ir.ui.view">
125 <field name="name">stock.landed.cost.search</field>
126 <field name="model">stock.landed.cost</field>
127 <field name="arch" type="xml">
128 <search string="Landed Costs">
129 <field name="name" string="Name"/>
132 <filter string="Draft" name="draft" domain="[('state','=','draft')]"/>
133 <filter string="Done" name="done" domain="[('state','=','done')]"/>
134 <group expand="0" string="Group By">
135 <filter string="Month" context="{'group_by': 'date'}"/>
136 <filter string="Status" context="{'group_by': 'state'}"/>
142 <!-- Stock Landed Cost Action -->
143 <record id='action_stock_landed_cost' model='ir.actions.act_window'>
144 <field name="name">Landed Costs</field>
145 <field name="res_model">stock.landed.cost</field>
146 <field name="view_type">form</field>
147 <field name="view_mode">tree,form</field>
148 <field name="context">{}</field>
149 <field name="help" type="html">
150 <p class="oe_view_nocontent_create">
151 Click to create a new landed cost.
156 <!-- Stock Landed Cost Menu -->
157 <menuitem name="Landed Costs" parent="stock.menu_stock_root" id="menu_stock_landed_cost_main" sequence="1"/>
158 <menuitem action="action_stock_landed_cost" name="Landed Costs" parent="menu_stock_landed_cost_main" id="menu_stock_landed_cost" sequence="1"/>
160 <!-- Stock Landed Cost Type View -->
161 <record id="view_stock_landed_cost_type_form" model="ir.ui.view">
162 <field name="name">stock.landed.cost.type.form</field>
163 <field name="model">product.product</field>
164 <field name="arch" type="xml">
165 <form string="Landed Costs">
167 <field name="image_medium" widget="image" class="oe_avatar oe_left"/>
168 <div class="oe_title">
169 <div class="oe_edit_only">
170 <label for="name" name='label_name' string="Product Name"/>
173 <field name="name" class="oe_inline"/>
175 <label for="categ_id" class="oe_edit_only"/>
176 <h2><field name="categ_id"/></h2>
177 <div name="options" groups="base.group_user">
178 <field name="landed_cost_ok" readonly="1"/>
179 <label for="landed_cost_ok"/>
180 <field name="active" />
181 <label for="active"/>
185 <page string="Information">
188 <field name="split_method"/>
189 <field name="standard_price"/>
190 <field name="property_account_expense"/>
193 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
197 <field name="description" placeholder="describe the product characteristics..."/>
201 <div class="oe_chatter">
202 <field name="message_follower_ids" widget="mail_followers"/>
203 <field name="message_ids" widget="mail_thread"/>
209 <!-- Stock Landed Cost Type Tree View -->
210 <record id="stock_landed_cost_tree_view" model="ir.ui.view">
211 <field name="name">product.product.tree</field>
212 <field name="model">product.product</field>
213 <field name="arch" type="xml">
214 <tree string="Products">
216 <field name="split_method"/>
217 <field name="standard_price"/>
221 <record id="stock_landed_cost_type_action" model="ir.actions.act_window">
222 <field name="name">Products</field>
223 <field name="type">ir.actions.act_window</field>
224 <field name="res_model">product.product</field>
225 <field name="domain">[('landed_cost_ok','=',True)]</field>
226 <field name="view_type">form</field>
227 <field name="view_mode">tree,form</field>
228 <field name="context">{'default_landed_cost_ok': True}</field>
229 <field name="search_view_id" ref="product.product_search_form_view"/>
230 <field name="help" type="html">
231 <p class="oe_view_nocontent_create">
232 Click to define a new kind of landed cost.
237 <record id="stock_landed_cost_type_action1" model="ir.actions.act_window.view">
238 <field eval="1" name="sequence"/>
239 <field name="view_mode">tree</field>
240 <field name="view_id" ref="stock_landed_cost_tree_view"/>
241 <field name="act_window_id" ref="stock_landed_cost_type_action"/>
244 <record id="stock_landed_cost_type_action2" model="ir.actions.act_window.view">
245 <field eval="2" name="sequence"/>
246 <field name="view_mode">form</field>
247 <field name="view_id" ref="view_stock_landed_cost_type_form"/>
248 <field name="act_window_id" ref="stock_landed_cost_type_action"/>
251 <menuitem action="stock_landed_cost_type_action" name="Landed Cost Type" parent="stock.menu_warehouse_config" id="menu_stock_landed_cost_type" sequence="5"/>