| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<data> |
| 4 |
<record id="product_template_tree_view" model="ir.ui.view"> |
| 5 |
<field name="name">product.template.list.inherit.stock.account</field> |
| 6 |
<field name="model">product.template</field> |
| 7 |
<field name="inherit_id" ref="product.product_template_tree_view"/> |
| 8 |
<field name="arch" type="xml"> |
| 9 |
<field name="standard_price" position="attributes"> |
| 10 |
<attribute name="readonly">1</attribute> |
| 11 |
</field> |
| 12 |
</field> |
| 13 |
</record> |
| 14 |
|
| 15 |
<record id="view_category_property_form_stock" model="ir.ui.view"> |
| 16 |
<field name="name">product.category.stock.property.form.inherit.stock</field> |
| 17 |
<field name="model">product.category</field> |
| 18 |
<field name="inherit_id" ref="stock.product_category_form_view_inherit"/> |
| 19 |
<field name="arch" type="xml"> |
| 20 |
<group name="logistics" position="after"> |
| 21 |
<group string="Inventory Valuation"> |
| 22 |
<field name="property_cost_method" required="True"/> |
| 23 |
<field name="property_valuation" groups="account.group_account_readonly,stock.group_stock_manager"/> |
| 24 |
</group> |
| 25 |
</group> |
| 26 |
</field> |
| 27 |
</record> |
| 28 |
|
| 29 |
<record id="view_category_property_form" model="ir.ui.view"> |
| 30 |
<field name="name">product.category.stock.property.form.inherit</field> |
| 31 |
<field name="model">product.category</field> |
| 32 |
<field name="inherit_id" ref="account.view_category_property_form"/> |
| 33 |
<field name="arch" type="xml"> |
| 34 |
<field name="property_account_expense_categ_id" position="after"> |
| 35 |
<field name="property_stock_valuation_account_id" string="Stock Account" options="{'no_create': True}"/> |
| 36 |
<field name="account_stock_variation_id" string="Stock Variation" options="{'no_create': True}"/> |
| 37 |
<field name="property_price_difference_account_id" options="{'no_create': True}" invisible="not (property_cost_method == 'standard' and property_valuation == 'real_time')"/> |
| 38 |
</field> |
| 39 |
</field> |
| 40 |
</record> |
| 41 |
|
| 42 |
<!-- Stock Report View --> |
| 43 |
<record model="ir.ui.view" id="view_template_property_form_stock_account"> |
| 44 |
<field name="name">view.template.property.form.stock.account</field> |
| 45 |
<field name="model">product.template</field> |
| 46 |
<field name="inherit_id" ref="stock.view_template_property_form"/> |
| 47 |
<field name="arch" type="xml"> |
| 48 |
<xpath expr="//label[@for='serial_prefix_format']" position="before"> |
| 49 |
<field name="lot_valuated" widget="confirm_boolean" invisible="tracking == 'none'"/> |
| 50 |
</xpath> |
| 51 |
</field> |
| 52 |
</record> |
| 53 |
|
| 54 |
<record model="ir.ui.view" id="product_product_stock_tree_inherit_stock_account"> |
| 55 |
<field name="name">product.product.stock.list.inherit.stock.account</field> |
| 56 |
<field name="model">product.product</field> |
| 57 |
<field name="inherit_id" ref="stock.product_product_stock_tree"/> |
| 58 |
<field name="arch" type="xml"> |
| 59 |
<field name="qty_available" position="before"> |
| 60 |
<field name="company_currency_id" column_invisible="True"/> |
| 61 |
<field name="cost_method" optional="hide"/> |
| 62 |
<field name="avg_cost" |
| 63 |
string="Unit Cost" optional="show" widget='stock_action_field' |
| 64 |
options="{ |
| 65 |
'currency_field': 'company_currency_id', |
| 66 |
'action_name': 'stock_account.stock_avco_report_action', |
| 67 |
'disabled': 'cost_method == \'fifo\'', |
| 68 |
}" context="{ |
| 69 |
'active_id': id, |
| 70 |
'cost_method': cost_method, |
| 71 |
}"/> |
| 72 |
<field |
| 73 |
name="total_value" string="Total Value" optional="show" |
| 74 |
widget='stock_action_field' options="{ |
| 75 |
'currency_field': 'company_currency_id', |
| 76 |
'action_name': 'stock_account.stock_move_valuation_action', |
| 77 |
}" context=" { |
| 78 |
'search_default_product_id': id, |
| 79 |
'search_default_incoming': 1, |
| 80 |
'search_default_remaining': 1, |
| 81 |
'cost_method': cost_method, |
| 82 |
'tracking': tracking, |
| 83 |
}" |
| 84 |
sum="Total Value"/> |
| 85 |
</field> |
| 86 |
</field> |
| 87 |
</record> |
| 88 |
|
| 89 |
<record model="ir.ui.view" id="product_product_view_list_at_date"> |
| 90 |
<field name="name">product.product.list.inherit.stock.account.at.date</field> |
| 91 |
<field name="model">product.product</field> |
| 92 |
<field name="inherit_id" ref="stock.view_stock_product_tree"/> |
| 93 |
<field name="arch" type="xml"> |
| 94 |
<field name="standard_price" position="after"> |
| 95 |
<field name="avg_cost" string="Unit Cost" optional="hide" options="{ |
| 96 |
'currency_field': 'company_currency_id', |
| 97 |
}"/> |
| 98 |
<field name="total_value" string="Total Value" optional="hide" options="{ |
| 99 |
'currency_field': 'company_currency_id', |
| 100 |
}"/> |
| 101 |
</field> |
| 102 |
</field> |
| 103 |
</record> |
| 104 |
</data> |
| 105 |
</odoo> |