Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] account_analytic_wip 15.0 #480

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
88fe0d9
[ADD] account_analytic_wip: Analytic Accounting support for WIP and V…
dreispt May 22, 2021
d77f61a
[FIX] account_analytic_wip: tracking items Post button was not working
dreispt May 22, 2021
37308d4
[FIX] account_analytic_wip: refactored, based on field tests
dreispt May 24, 2021
e422ce9
[REF] account_analytic_wip: merge analytic_activity_based_cost featur…
dreispt Jun 22, 2021
6a5c038
account_analytic_wip 14.0.2.0.0
OCA-git-bot Jul 28, 2021
4f8c92f
[REF] account_analytic_wip: simplify dependencies
dreispt Jul 30, 2021
d3905c7
account_analytic_wip 14.0.2.1.0
OCA-git-bot Sep 8, 2021
986f9f2
[CHG] account_analytic_wip: use actuals to post WIP, dont post varian…
dreispt Oct 5, 2021
585d28d
[IMP] account_analytic_wip: UI improvements
dreispt Oct 14, 2021
abf23d1
[FIX] account_analytic_wip: bad demo data, reintroduce WIP account co…
dreispt Oct 19, 2021
54c52d6
[FIX] account_analytic_wip: fix clear WIP logic
dreispt Oct 20, 2021
27d6ad7
[WIP][FIX] account_analytic_wip: fix clear WIP logic
dreispt Oct 21, 2021
49a773c
[IMP] account_analytic_wip: Tracking Items list improved UI
dreispt Oct 26, 2021
473f2e4
[FIX] account_analytic_wip: fix clear WIP logic
dreispt Oct 27, 2021
6eca686
[REF] account_analytic_wip: remove unused code
dreispt Nov 3, 2021
86e364c
[FIX] account_analytic_wip: round the tracking item values
dreispt Nov 8, 2021
fca4827
[REF] account_analytic_wip: remove unused code
dreispt Nov 8, 2021
fea5671
[FIX] account_analytic_wip: fix tests
dreispt Nov 8, 2021
74f9c4d
[IMP] account_analytic_wip: better errors for missing configs
dreispt Nov 11, 2021
fb24965
[IMP] account_analytic_wip: error when using a Work Center with no Co…
dreispt Nov 11, 2021
c00028c
Added translation using Weblate (French)
Yvesldff Dec 8, 2021
9834d68
Added translation using Weblate (French (France))
Yvesldff Dec 8, 2021
c3ebf26
Translated using Weblate (French)
Yvesldff Dec 8, 2021
acab161
Translated using Weblate (French (France))
Yvesldff Dec 8, 2021
1ce22c8
[FIX] account_analytic_wip: TypeError on upgrade
RLeeOSI Dec 27, 2021
d541d01
Added translation using Weblate (Swedish)
simonstromb Jan 26, 2022
c4119e1
Translated using Weblate (Swedish)
simonstromb Jan 26, 2022
b3740e9
Translated using Weblate (Swedish)
simonstromb Jan 27, 2022
478d209
Translated using Weblate (Swedish)
simonstromb Jan 27, 2022
ef6e6bc
account_analytic_wip 14.0.3.0.0
OCA-git-bot May 17, 2022
9bc13f3
[FIX] account_analytic_wip: fix cron error
dreispt May 31, 2022
82df6ff
account_analytic_wip 14.0.3.0.1
OCA-git-bot May 31, 2022
f758770
[FIX] account_analytic_wip: Analytic Account was not carried to WIP J…
dreispt Aug 30, 2022
43b567c
account_analytic_wip 14.0.3.0.2
OCA-git-bot Aug 30, 2022
5c88d8d
[IMP] account_analytic_wip: black, isort, prettier
flagreenice Sep 18, 2022
dda8f74
[MIG] account_analytic_wip 15.0
flagreenice Sep 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions account_analytic_wip/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
=================================================
Analytic Accounting support for WIP and Variances
=================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
:target: https://github.com/OCA/account-analytic/tree/14.0/account_analytic_wip
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-account_analytic_wip
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/87/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This feature proposes a strategy to track and report work in progress and variances.
The work in progress can be split in subitems, such as Labour and Overhead.

The base components are implemented here, a minimum viable process is working,
but the process is best leveraged by other apps, such as Projects or Manufacturing.

Resource consumption is to be recorded as Analytic Items
when operations are logged in the system of resources.

These Analytic Items are then used to calculate WIP and variances
versus the original expected amounts.
An "Analytic Tracking Items" object is used to hold the expected amount,
and calculate the WIP and variances to record.

A regular scheduled job uses that information
to generate the corresponding accounting moves.

Products can be seen as cost drivers, driving consumption of other items.
For example a machine work time can drive consumptions of Labor and Overhead.

When an Analytic Item is created for a cost driver,
additional Analytic Items are generated for the corresponding indirect costs.
For example, each timesheet hour logged could generate a overhead amount related to that activity.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Usage
=====

The "Analytic Tracking Items" holds planned amounts, and tracks their WIP and variances.
These must be automatically created by specific logic in the Apps supporting them.

With this module alone the Tracking Item creation can be done manually:

* Navigate to ''Invoicing/Accounting > Reporting > Management > Analytic Tracking''
* Create an Analytic Tracking Item:

* Set the Analytic Account.
* Set the Product, use one that has a non-zero cost
and belongs to a category with the "Costing" section configured.
* Set the Planned Amount.


Analytic Items are used to record the actual costs:

* Navigate to *Invoicing/Accounting > Configuration
> Analytic Accounting > Analytic Items*.

* Create an Analytic Item:

* Set the Analytic Account, Description and Date.
* Set the Product, use one that has a non-zero cost
and belongs to a category with the "Costing" section configured.
* Set the quantity consumed.
* The Amount field should be automatically computed, with a negative amount.


Analytic Tracking Items are used to follow the costs incurred
and the comparison with the planned amounts. This can be used for analysis:

* Navigate to ''Invoicing/Accounting > Reporting > Management > Analytic Tracking''

* The list presents lines being tracked, and displays columns with Actual Amount,
Expected Amount, WIP Amount, Variance Amount, etc.


WIP and variances journal entries are generated by a scheduled job:

* Navigate to *Setting > Technical > Automation > Scheduled Actions*.
* Locate and open the *Account: Process WIP and Variances* record, and click on the RUN MANUALLY button.
* Check the generated journal entries, at *Accounting > Miscellaneous > Journal Entries*.


When creating Analytic Items, if a configuration is in place, the corresponding Analytic Items for indirect cost are generated.

* When an Analytic Item is created, an automatic process checks the Activity Based Cost Rules to identify the ones that apply.
* Each triggered rule created a new Analytic Item, with a copy of the original one, and:

* Product: is the rule Cost Type Product. A validation error prevents this from being the same as the source Analytic Item Product, to avoid infinite loops.
* Quantity: is the original quantity multiplied by the rule's Factor
* Amount: is -1 * Quantity * Product Standard Price
* Parent Analytic Item (new field): set with the original Analytic Item

* An update on the Quantity triggers a recalculation of the quantity and amount of the child Analytic Items.
* A delete cascades to the child Analytic Items, causing them to also be deleted.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20account_analytic_wip%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Open Source Integrators

Contributors
~~~~~~~~~~~~

* `Open Source Integrators <https://opensourceintegrators.com>`:

* Daniel Reis <dreis@opensourceintegrators.com>
* Chandresh Thakkar <cthakkar@opensourceintegrators.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-dreispt| image:: https://github.com/dreispt.png?size=40px
:target: https://github.com/dreispt
:alt: dreispt

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-dreispt|

This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/14.0/account_analytic_wip>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions account_analytic_wip/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
28 changes: 28 additions & 0 deletions account_analytic_wip/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Analytic Accounting support for WIP and Variances",
"version": "15.0.1.0.0",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"summary": "Track and report WIP and Variances based on Analytic Items",
"website": "https://github.com/OCA/account-analytic",
"license": "AGPL-3",
"depends": ["stock_account", "analytic_activity_based_cost"],
"category": "Accounting/Accounting",
"data": [
"security/ir.model.access.csv",
"data/ir_config_parameter_data.xml",
"data/ir_cron_data.xml",
"views/account_move.xml",
"views/account_analytic_line.xml",
"views/account_analytic_tracking.xml",
"views/product_category_view.xml",
],
"demo": [
"demo/product_demo.xml",
],
"development_status": "Alpha",
"maintainers": ["dreispt"],
"installable": True,
}
7 changes: 7 additions & 0 deletions account_analytic_wip/data/ir_config_parameter_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<odoo noupdate="1">
<record id="wip_default_product_category" model="ir.config_parameter">
<!-- Used for Work Center with no Cost Driver product -->
<field name="key">wip_default_product_category</field>
<field name="value">product.product_category_all</field>
</record>
</odoo>
18 changes: 18 additions & 0 deletions account_analytic_wip/data/ir_cron_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<odoo>
<record id="ir_cron_post_wip" model="ir.cron">
<field
name="name"
>Account Analytic: post WIP and Variances journal entries</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field
name="nextcall"
eval="(DateTime.now().replace(hour=1, minute=0) + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"
/>
<field name="doall" eval="False" />
<field name="model_id" ref="model_account_analytic_tracking_item" />
<field name="code">model._cron_process_wip_and_variance()</field>
<field name="state">code</field>
</record>
</odoo>
36 changes: 36 additions & 0 deletions account_analytic_wip/demo/product_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="consume_account" model="account.account">
<field name="name">Costing Consumed</field>
<field name="code">600010</field>
<field name="user_type_id" ref="account.data_account_type_expenses" />
</record>
<record id="wip_account" model="account.account">
<field name="name">Costing WIP</field>
<field name="code">600011</field>
<field name="user_type_id" ref="account.data_account_type_expenses" />
</record>
<record id="variance_account" model="account.account">
<field name="name">Costing Variance</field>
<field name="code">600012</field>
<field name="user_type_id" ref="account.data_account_type_expenses" />
</record>
<record id="clear_account" model="account.account">
<field name="name">Costing WIP Clear</field>
<field name="code">600020</field>
<field name="user_type_id" ref="account.data_account_type_expenses" />
</record>

<record
id="analytic_activity_based_cost.product_category_driven_costs"
model="product.category"
>
<field name="property_cost_method">standard</field>
<field name="property_valuation">real_time</field>
<field name="property_stock_account_output_categ_id" ref="clear_account" />
<field name="property_wip_account_id" ref="wip_account" />
<field name="property_variance_account_id" ref="variance_account" />
</record>

</odoo>
Loading