diff options
Diffstat (limited to 'addons/stock_account/views')
| -rw-r--r-- | addons/stock_account/views/product_views.xml | 42 | ||||
| -rw-r--r-- | addons/stock_account/views/res_config_settings_views.xml | 34 | ||||
| -rw-r--r-- | addons/stock_account/views/stock_account_views.xml | 70 | ||||
| -rw-r--r-- | addons/stock_account/views/stock_quant_views.xml | 27 | ||||
| -rw-r--r-- | addons/stock_account/views/stock_valuation_layer_views.xml | 110 |
5 files changed, 283 insertions, 0 deletions
diff --git a/addons/stock_account/views/product_views.xml b/addons/stock_account/views/product_views.xml new file mode 100644 index 00000000..f4c47e58 --- /dev/null +++ b/addons/stock_account/views/product_views.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <record id="product_template_tree_view" model="ir.ui.view"> + <field name="name">product.template.tree.inherit.stock.account</field> + <field name="model">product.template</field> + <field name="inherit_id" ref="product.product_template_tree_view"/> + <field name="arch" type="xml"> + <field name="standard_price" position="attributes"> + <attribute name="readonly">1</attribute> + </field> + </field> + </record> + + <record id="view_category_property_form" model="ir.ui.view"> + <field name="name">product.category.stock.property.form.inherit</field> + <field name="model">product.category</field> + <field name="inherit_id" ref="account.view_category_property_form"/> + <field name="arch" type="xml"> + <group name="account_property" position="inside"> + <group name="account_stock_property" string="Account Stock Properties" groups="account.group_account_readonly" attrs="{'invisible':[('property_valuation', '=', 'manual_periodic')]}"> + <field name="property_stock_valuation_account_id" options="{'no_create': True}" attrs="{'required':[('property_valuation', '=', 'real_time')]}"/> + <field name="property_stock_journal" attrs="{'required':[('property_valuation', '=', 'real_time')]}" /> + <field name="property_stock_account_input_categ_id" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}" /> + <field name="property_stock_account_output_categ_id" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}" /> + <div colspan="2" class="alert alert-info mt16" role="status"> + <b>Set other input/output accounts on specific </b><button name="%(stock.action_prod_inv_location_form)d" role="button" type="action" class="btn-link" style="padding: 0;vertical-align: baseline;" string="locations"/>. + </div> + </group> + </group> + <group name="account_property" position="before"> + <group> + <group string="Inventory Valuation"> + <field name="property_cost_method"/> + <field name="property_valuation" groups="account.group_account_readonly,stock.group_stock_manager"/> + </group> + </group> + </group> + </field> + </record> + </data> +</odoo> diff --git a/addons/stock_account/views/res_config_settings_views.xml b/addons/stock_account/views/res_config_settings_views.xml new file mode 100644 index 00000000..138461b8 --- /dev/null +++ b/addons/stock_account/views/res_config_settings_views.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <record id="res_config_settings_view_form" model="ir.ui.view"> + <field name="name">res.config.settings.view.form.inherit.stock.account</field> + <field name="model">res.config.settings</field> + <field name="inherit_id" ref="stock.res_config_settings_view_form"/> + <field name="arch" type="xml"> + <div id="production_lot_info" position="after"> + <h2>Valuation</h2> + <div class="row mt16 o_settings_container" name="valuation_setting_container"> + <div class="col-12 col-lg-6 o_setting_box" + id="additional_cost_setting" + title="Affect landed costs on reception operations and split them among products to update their cost price."> + <div class="o_setting_left_pane"> + <field name="module_stock_landed_costs"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_stock_landed_costs"/> + <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/reporting/integrating_landed_costs.html" title="Documentation" class="o_doc_link" target="_blank"></a> + <div class="text-muted"> + Add additional cost (transport, customs, ...) in the value of the product. + </div> + <div class="content-group"> + <div name="landed_cost_info"/> + </div> + </div> + </div> + </div> + </div> + </field> + </record> + </data> +</odoo> diff --git a/addons/stock_account/views/stock_account_views.xml b/addons/stock_account/views/stock_account_views.xml new file mode 100644 index 00000000..62c8cdc5 --- /dev/null +++ b/addons/stock_account/views/stock_account_views.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_move_form_inherit" model="ir.ui.view"> + <field name="name">stock.move.form.inherit</field> + <field name="model">stock.move</field> + <field name="inherit_id" ref="stock.view_move_form"/> + <field name="arch" type="xml"> + <xpath expr="//div[@name='button_box']" position="inside" > + <button name="action_get_account_moves" icon="fa-usd" class="oe_stat_button" string="Accounting Entries" type="object" groups="account.group_account_readonly"/> + </xpath> + </field> + </record> + + <record id="view_inventory_form_inherit" model="ir.ui.view"> + <field name="name">stock.inventory.form.inherit</field> + <field name="model">stock.inventory</field> + <field name="inherit_id" ref="stock.view_inventory_form"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='company_id']" position="before"> + <field name="accounting_date" attrs="{'readonly':[('state','=', 'done')]}"/> + </xpath> + <xpath expr="//div[@name='button_box']" position="inside"> + <field name="has_account_moves" invisible="1"/> + <button name="action_get_account_moves" type="object" + string="Accounting Entries" icon="fa-usd" class="oe_stat_button" + attrs="{'invisible': [('has_account_moves', '=', False)]}"/> + </xpath> + </field> + </record> + + <record id="view_inventory_tree" model="ir.ui.view"> + <field name="name">stock.inventory.tree.inherit.stock.account</field> + <field name="model">stock.inventory</field> + <field name="inherit_id" ref="stock.view_inventory_tree"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='date']" position="after"> + <field name="accounting_date" optional="hide"/> + </xpath> + </field> + </record> + + <record id="view_location_form_inherit" model="ir.ui.view"> + <field name="name">stock.location.form.inherit</field> + <field name="model">stock.location</field> + <field name="inherit_id" ref="stock.view_location_form"/> + <field name="arch" type="xml"> + <xpath expr="//group[@name='additional_info']" position="after"> + <group string="Accounting Information" attrs="{'invisible':[('usage','not in',('inventory','production'))]}"> + <field name="valuation_in_account_id" options="{'no_create': True}"/> + <field name="valuation_out_account_id" options="{'no_create': True}"/> + </group> + </xpath> + </field> + </record> + + <record id="view_stock_return_picking_form_inherit_stock_account" model="ir.ui.view"> + <field name="name">stock.return.picking.stock.account.form</field> + <field name="inherit_id" ref="stock.view_stock_return_picking_form"/> + <field name="model">stock.return.picking</field> + <field name="arch" type="xml"> + <xpath expr="//field[@name='product_return_moves']/tree" position="inside"> + <field name="to_refund" groups="base.group_no_one"/> + </xpath> + </field> + </record> + + </data> +</odoo> diff --git a/addons/stock_account/views/stock_quant_views.xml b/addons/stock_account/views/stock_quant_views.xml new file mode 100644 index 00000000..576140d0 --- /dev/null +++ b/addons/stock_account/views/stock_quant_views.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record model="ir.ui.view" id="view_stock_quant_tree_inherit"> + <field name="name">stock.quant.tree.inherit</field> + <field name="model">stock.quant</field> + <field name="inherit_id" ref="stock.view_stock_quant_tree"></field> + <field name="arch" type="xml"> + <xpath expr="//field[@name='product_uom_id']" position="after"> + <field name="currency_id" invisible="1"/> + <field name="value"/> + </xpath> + </field> + </record> + + <record model="ir.ui.view" id="view_stock_quant_tree_editable_inherit"> + <field name="name">stock.quant.tree.editable.inherit</field> + <field name="model">stock.quant</field> + <field name="inherit_id" ref="stock.view_stock_quant_tree_editable"></field> + <field name="arch" type="xml"> + <xpath expr="//field[@name='product_uom_id']" position="after"> + <field name="currency_id" invisible="1"/> + <field name="value"/> + </xpath> + </field> + </record> + +</odoo> diff --git a/addons/stock_account/views/stock_valuation_layer_views.xml b/addons/stock_account/views/stock_valuation_layer_views.xml new file mode 100644 index 00000000..567859e5 --- /dev/null +++ b/addons/stock_account/views/stock_valuation_layer_views.xml @@ -0,0 +1,110 @@ +<odoo> + <record id="stock_valuation_layer_form" model="ir.ui.view"> + <field name="name">stock.valuation.layer.form</field> + <field name="model">stock.valuation.layer</field> + <field name="arch" type="xml"> + <form edit="0" create="0"> + <sheet> + <group> + <group> + <field name="create_date" string="Date" /> + <field name="product_id" /> + <field name="stock_move_id" attrs="{'invisible': [('stock_move_id', '=', False)]}" /> + </group> + </group> + <notebook> + <page string="Valuation" name="valuation"> + <group> + <field name="quantity" /> + <field name="uom_id" groups="uom.group_uom" /> + <field name="currency_id" invisible="1" /> + <field name="unit_cost" /> + <field name="value" /> + <field name="remaining_qty" /> + </group> + </page> + <page string="Other Info" name="other_info"> + <group> + <field name="description" /> + <field name="account_move_id" groups="account.group_account_invoice" attrs="{'invisible': [('account_move_id', '=', False)]}" /> + <field name="company_id" groups="base.group_multi_company" /> + <field name="stock_valuation_layer_id" attrs="{'invisible': [('stock_valuation_layer_id', '=', False)]}" /> + </group> + </page> + </notebook> + </sheet> + </form> + </field> + </record> + + <record id="stock_valuation_layer_tree" model="ir.ui.view"> + <field name="name">stock.valuation.layer.tree</field> + <field name="model">stock.valuation.layer</field> + <field name="arch" type="xml"> + <tree default_order="create_date desc, id desc" create="0" + import="0" js_class="inventory_report_list"> + <field name="create_date" string="Date" /> + <field name="product_id" /> + <field name="quantity" /> + <field name="uom_id" groups="uom.group_uom" /> + <field name="currency_id" invisible="1" /> + <field name="value" sum="Total Value"/> + <field name="company_id" groups="base.group_multi_company" /> + <groupby name="product_id"> + <field name="cost_method" invisible="1"/> + <field name="quantity_svl" invisible="1"/> + <button name="action_revaluation" icon="fa-plus" title="Add Manual Valuation" type="object" attrs="{'invisible':['|', ('cost_method', '=', 'standard'), ('quantity_svl', '<=', 0)]}" /> + </groupby> + </tree> + </field> + </record> + + <record id="stock_valuation_layer_action" model="ir.actions.act_window"> + <field name="name">Stock Valuation</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">stock.valuation.layer</field> + <field name="view_mode">tree,form</field> + <field name="view_id" ref="stock_valuation_layer_tree"/> + <field name="domain">[('product_id.type', '=', 'product')]</field> + <field name="context">{'search_default_group_by_product_id': 1}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"/> + <p> + There is no valuation layers. Valuation layers are created when some product moves should impact the valuation of the stock. + </p> + </field> + </record> + + <record id="view_inventory_valuation_search" model="ir.ui.view"> + <field name="name">Inventory Valuation</field> + <field name="model">stock.valuation.layer</field> + <field name="arch" type="xml"> + <search string="Inventory Valuation"> + <field name="product_id"/> + <field name="categ_id" /> + <field name="product_tmpl_id" /> + <separator/> + <group expand='0' string='Group by...'> + <filter string='Product' name="group_by_product_id" context="{'group_by': 'product_id'}"/> + </group> + </search> + </field> + </record> + + <menuitem id="menu_valuation" name="Inventory Valuation" parent="stock.menu_warehouse_report" sequence="110" action="stock_valuation_layer_action"/> + + <record id="stock_valuation_layer_picking" model="ir.ui.view"> + <field name="name">stock.valuation.layer.picking</field> + <field name="model">stock.picking</field> + <field name="inherit_id" ref="stock.view_picking_form" /> + <field name="arch" type="xml"> + <xpath expr="//div[@name='button_box']" position="inside"> + <button string="Valuation" type="object" + name="action_view_stock_valuation_layers" + class="oe_stat_button" icon="fa-dollar" groups="base.group_no_one" + attrs="{'invisible': [('state', 'not in', ['done'])]}" /> + </xpath> + </field> + </record> + +</odoo> |
