| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record model="ir.ui.view" id="stock_move_view_list"> |
| 4 |
<field name="name">stock.move.view.list.inherit.stock.account</field> |
| 5 |
<field name="inherit_id" ref="stock.view_move_tree"/> |
| 6 |
<field name="model">stock.move</field> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<field name="state" position="after"> |
| 9 |
<field name="value" optional="hide"/> |
| 10 |
<field name="remaining_qty" optional="hide"/> |
| 11 |
<field name="remaining_value" optional="hide"/> |
| 12 |
</field> |
| 13 |
</field> |
| 14 |
</record> |
| 15 |
|
| 16 |
<record model="ir.ui.view" id="view_move_search"> |
| 17 |
<field name="name">stock.move.search.inherit.stock.account</field> |
| 18 |
<field name="model">stock.move</field> |
| 19 |
<field name="inherit_id" ref="stock.view_move_search"/> |
| 20 |
<field name="arch" type="xml"> |
| 21 |
<filter name="inventory" position="after"> |
| 22 |
<separator/> |
| 23 |
<filter name="remaining" string="Remaining" domain="[('remaining_qty', '=', True)]"/> |
| 24 |
</filter> |
| 25 |
</field> |
| 26 |
</record> |
| 27 |
|
| 28 |
<record model="ir.ui.view" id="stock_move_view_list_valuation"> |
| 29 |
<field name="name">stock.move.view.list.valuation</field> |
| 30 |
<field name="model">stock.move</field> |
| 31 |
<field name="priority">1000</field> |
| 32 |
<field name="arch" type="xml"> |
| 33 |
<list default_order="date desc, id desc"> |
| 34 |
<field name="company_currency_id" column_invisible="1"/> |
| 35 |
<field name="reference" width="300px"/> |
| 36 |
<field name="date"/> |
| 37 |
<field name="quantity"/> |
| 38 |
<field name="product_uom" groups="uom.group_uom"/> |
| 39 |
<field name="lot_ids" widget="many2many_tags" column_invisible="context.get('tracking') == 'none'"/> |
| 40 |
<field name="value" widget="monetary" options="{'currency_field': 'company_currency_id'}" column_invisible="context.get('cost_method') != 'fifo'"/> |
| 41 |
<field name="standard_price" widget="monetary" options="{'currency_field': 'company_currency_id'}" string="Unit Cost" column_invisible="context.get('cost_method') == 'fifo'"/> |
| 42 |
<field name="remaining_qty" sum="Total Remaining Qty" width="200px"/> |
| 43 |
<field name="remaining_value" widget="monetary" options="{'currency_field': 'company_currency_id'}" sum="Total Remaining Value" width="200px"/> |
| 44 |
<field name="value_justification" column_invisible="context.get('cost_method') != 'fifo'" optional="hide"/> |
| 45 |
</list> |
| 46 |
</field> |
| 47 |
</record> |
| 48 |
|
| 49 |
<record model="ir.actions.act_window" id="stock_move_valuation_action"> |
| 50 |
<field name="name">Valuation</field> |
| 51 |
<field name="res_model">stock.move</field> |
| 52 |
<field name="view_mode">list</field> |
| 53 |
<field name="domain">['|', ('is_in', '=', True), ('is_out', '=', True)]</field> |
| 54 |
<field name="view_id" ref="stock_move_view_list_valuation"/> |
| 55 |
</record> |
| 56 |
|
| 57 |
<record model="ir.actions.server" id="stock_move_action_adjust_valuation"> |
| 58 |
<field name="name">Adjust Valuation</field> |
| 59 |
<field name="model_id" ref="model_stock_move"/> |
| 60 |
<field name="binding_model_id" ref="model_stock_move"/> |
| 61 |
<field name="state">code</field> |
| 62 |
<field name="code"> |
| 63 |
action = records.action_adjust_valuation() |
| 64 |
</field> |
| 65 |
</record> |
| 66 |
</odoo> |