Initial commit: Accounting packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:47 +02:00
commit 4ef34c2317
2661 changed files with 1709616 additions and 0 deletions

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_analytic_account_view_form_mrp" model="ir.ui.view">
<field name="name">account.analytic.account.form.mrp</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field eval="14" name="priority"/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button class="oe_stat_button" type="object" name="action_view_mrp_production"
groups="mrp.group_mrp_user"
icon="fa-wrench" attrs="{'invisible': [('production_count', '=', 0)]}">
<field string="Manufacturing Orders" name="production_count" widget="statinfo"/>
</button>
<button class="oe_stat_button" type="object" name="action_view_mrp_bom"
groups="mrp.group_mrp_user"
icon="fa-flask" attrs="{'invisible': [('bom_count', '=', 0)]}">
<field string="Bills of Materials" name="bom_count" widget="statinfo"/>
</button>
</div>
</field>
</record>
</odoo>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mrp_bom_form_view_inherited" model="ir.ui.view">
<field name="name">mrp.bom.form.inherited</field>
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='picking_type_id']" position="after">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,52 @@
<odoo>
<record id="view_production_tree_view_inherit" model="ir.ui.view">
<field name="name">mrp.production.tree.view.inherit</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_tree_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" optional="hide"/>
</field>
</field>
</record>
<record id="mrp_production_form_view_inherited" model="ir.ui.view">
<field name="name">mrp.production.view.inherited</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<xpath expr="//field[@name='product_id']" position="before">
<field name="show_valuation" invisible="1" groups="stock.group_stock_manager"/>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<t groups="stock.group_stock_manager">
<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': [('show_valuation', '=', False)]}" />
<button class="oe_stat_button" type="object"
name="action_view_analytic_account"
string="Analytic Account" icon="fa-bar-chart-o"
attrs="{'invisible': ['|', ('analytic_account_id', '=', False), ('state', 'in', ['draft', 'cancel'])]}"
groups="analytic.group_analytic_accounting"/>
</t>
</xpath>
<xpath expr="//page[@name='miscellaneous']//field[@name='date_deadline']" position="after">
<t groups="stock.group_stock_manager">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
</t>
</xpath>
</field>
</record>
<record id="view_production_graph_inherit_mrp_account" model="ir.ui.view">
<field name="name">mrp.production.graph.inherited.mrp.account</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.view_production_graph"/>
<field name="arch" type="xml">
<xpath expr="//graph" position="inside">
<field name="extra_cost" invisible="1"/>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,92 @@
<?xml version="1.0"?>
<odoo>
<record id="product_product_ext_form_view2" model="ir.ui.view">
<field name="name">product_extended.product.form.view</field>
<field name="model">product.template</field>
<field name="priority">3</field>
<field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="arch" type="xml">
<xpath expr="//div[@name='standard_price_uom']" position="inside">
<t groups="mrp.group_mrp_manager">
<field name="bom_count" invisible="1"/>
<field name="cost_method" invisible="1"/>
<field name="valuation" invisible="1"/>
<button name="button_bom_cost"
string="Compute Price from BoM" type="object"
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&amp;', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
class="oe_link pt-0"/>
</t>
</xpath>
</field>
</record>
<record id="product_product_view_form_normal_inherit_extended" model="ir.ui.view">
<field name="name">product.product.view.form.normal.inherit.extended</field>
<field name="model">product.product</field>
<field name="priority">4</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='standard_price_uom']" position="inside">
<t groups="mrp.group_mrp_manager">
<field name="bom_count" invisible="1"/>
<field name="cost_method" invisible="1"/>
<field name="valuation" invisible="1"/>
<button name="button_bom_cost"
string="Compute Price from BoM" type="object"
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&amp;', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
class="oe_link pt-0"
colspan="2"/>
</t>
</xpath>
</field>
</record>
<record id="product_variant_easy_edit_view_bom_inherit" model="ir.ui.view">
<field name="name">product.product.product.view.form.easy.bom.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_variant_easy_edit_view"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='standard_price']" position="after">
<t groups="mrp.group_mrp_manager">
<field name="bom_count" invisible="1"/>
<field name="cost_method" invisible="1"/>
<field name="valuation" invisible="1"/>
<button name="button_bom_cost"
string="Compute Price from BoM"
type="object"
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&amp;', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
class="oe_link pt-0"/>
</t>
</xpath>
</data>
</field>
</record>
<record id="action_compute_price_bom_template" model="ir.actions.server">
<field name="name">Compute Price from BoM</field>
<field name="model_id" ref="product.model_product_template"/>
<field name="binding_model_id" ref="product.model_product_template"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
records.action_bom_cost()
</field>
</record>
<record id="action_compute_price_bom_product" model="ir.actions.server">
<field name="name">Compute Price from BoM</field>
<field name="model_id" ref="product.model_product_product"/>
<field name="binding_model_id" ref="product.model_product_product"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
records.action_bom_cost()
</field>
</record>
</odoo>