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

[12.0][ADD] budget_management [WIP] #32

Closed
wants to merge 1 commit into from

Conversation

kittiu
Copy link
Member

@kittiu kittiu commented Aug 19, 2019

These module make use of module mis_buider_budget infrastructure for budget control, but add more features to

  • Tighten the control during document transaction (budget lock)
  • Simplify process for an organization to setup and make use of budget control and reporting especially in the context of cost/profit center (based on analytic_account)

This PR consist of 3 addons

  1. budget_management: this addon provide main models for configuration.
    • budget.management - setup a data range (i.e., yearly) configuration of how budget will be controlled (by which KPI, analytic account and whether invoice to be controlled by which budget allocated)
    • budget.control - provide easier way to allocated budget items for each analytic account, by kpi vs time period
  2. budget_management_purchase: to consider purchase confirmation as another source of budget consumption (budget moves), and also lock budget during purchase confirm.
  3. budget_management_expense: to consider expense approved as another source of budget consumption (budget moves), and also lock budget during expense approval.
  4. budget_management_sale: to consider sales approved as another source of budget consumption (budget moves), but not locking as sales is always OK.
  5. budget_management_purchase_request: to consider PR approved as another source of budget consumption (budget moves), and also lock budget during PR approval.

Pending task in this PR

  • readme
  • test on all modules
  • budget_management_purchase_request

@kittiu
Copy link
Member Author

kittiu commented Aug 24, 2019

Usage of budget_management

This module is the base of all the 3 addons in this PR. It targeted user who want to easily plan and strictly control budget at Analytic Account level.

For example, user want to control Project-A and Project-B on its expenses

Preparation

1. Create new Project-A and Project-B

> Invoicing > Configuration > Analytic Accounting > Analytic Account

image

2. Create KPIs (mis.report), i.e., for material expenses, and service expenses

> Invoicing > Configuration > MIS Report > MIS Report Template

Assume material expense and service expense refer to account code 5001 and 5002 respectively. As sample, I also create products that use those accounts for expense

Note: Make sure both KPI lines are budgetable

image

3. Create Budget Management for the control period, i.e., for fiscal 2019

> Budgeting > Budget Management > Budget Management

A Budget Management is used as configurator to manage budget for a set of KPI, of multiple projects (analytic account), for a set period of time.

Select the KPI Template form (2), and note that the new Budget (mis.budget) is auto created.

image

On budget management,

  • I check to control budget on On Account, to enable budget checking when confirm vendor bill.
  • I uncheck Control All Analytics, and select only the project I want to control.

As budget.management also inherits mis.report.instance, as such, a new MIS Report and its required Columns for budget reporting is also created automatically.

image

At this point, if user try to confirm a vendor bill for Project-A or Project-B, system should not allow, as a budget control sheet for each project is not set. We should allocate the amount for both project first, to use the budget.

4. Create Budget Control Sheet

> Budgeting > Budget Management > Budget Control Sheet

User will create budget control and allocate amount for each project (analytic account).

  • Choose the Budget created in previous step, and project name, i.e., Project-A
  • To plan by monthly, user may want to choose Plan Date Range as Monthly (date.range.type). System will prepare budget items (mis.budget.item) in tabular format for easy fill in.

From below picture, we have setup for Project-A to budget for material 6,000 and service 3,000. Repeat the same for Project-B.

image

Operation - Budget Check on Vendor Bill

1. Review current budget report

At this point, user can browse to MIS Report - FY2019, to see the overall budget report for both Project-A and Project-B as following,

image

But from the Budget Control - FY2019 for Project-A, click on Preview button will already show the current budget consumption report as follow, i.e., for Project-A, available amount for material and expense are 6,000 and 3,000 respectively.

image

2. Confirm vendor bill to test on budget check

Create a new Vendor Bill for Project-A and Project-B, and attempt to over budget for Project-A. The system will block user from validating document.

image

Fill in a reasonable amount and this document will pass the budget check. Now, go back to preview budget report again and see the actual amount being adjusted.

image

@kittiu
Copy link
Member Author

kittiu commented Aug 24, 2019

Usage of budget_management_purchase, budget_management_expense

These 2 modules is used to expand the budget control to cover purchase and expense document. When confirm the 2 document, system will also log the budget moves and consider them as budget commitment in budget report.

Once the addons are installed, user will see more options,

image

On each document, i.e., Purchase Order, will create budget moves,

image

Those budget moves from Purchase and Expense will also reflect in budget reports, i.e., for Project-A

image

@kittiu
Copy link
Member Author

kittiu commented Aug 24, 2019

Please feel free to leave your comment or feature request here. ;)

@kittiu kittiu force-pushed the 12.0-add-budget_management branch 2 times, most recently from 16189a3 to 6a69bc4 Compare September 9, 2019 12:23
@kittiu
Copy link
Member Author

kittiu commented Oct 9, 2019

Change module to budget_control, moved to #35

@lmignon
Copy link

lmignon commented Oct 18, 2019

@kittiu All this work looks really promising. Thank you for this work. We have to manage public accounting for some of our clients and upon reading the description I have the feeling that our approach could benefit greatly from these addons.
I will continue to investigate the code and see if I can find any areas of convergence. I am currently working on a proto in V13 which will not make things easy because mis-builder does not exist in v13...

@kittiu
Copy link
Member Author

kittiu commented Oct 18, 2019

@lmignon glad that you are interested. There are more to come, i..e, close year end budget commitment carry over, budget transfer between costcenter (analytic), more dimensions for more budget monitoring report, etc.
This PR will be deprecated, as I moved it here
https://github.com/ecosoft-odoo/account-budgeting/tree/12.0-add-budget_control
Sorry for no good document at the moment, but I plan to do it after I got the full picture. And will need a lot of comments.

We plan to use in v13 as well, but since no mis_builder, we also can't do. You can help expedite the v13 mis_buider, hehe.

@hitrosol
Copy link

Hi @kittiu, I'm interested to see this feature. I wonder if the budget management expense will consider the Approved / Paid Employee Advance as in https://github.com/OCA/hr/tree/12.0/hr_expense_advance_clearing
as commitment as well. I use the analytical account when I request the Employee Advance in this module to recognize the budget in each Analytic Account.
By considering this commitment, this will avoid over budget trap whenever the Employee clear the Advance.

@kittiu
Copy link
Member Author

kittiu commented Oct 27, 2019

Hi @hitrosol
In the previous organization we did (in v8), my customer said their old SAP do not consider advance as the commitment. Only expense does. They claim that, advance is just the amount being in employee pocket, not the real use. Accounting wise, we also agree it is correct that way.

BUT in the coming project we are doing, it seem that customer want to commit in Advance too.
So...we are considering (initially we think it will be wrong).
Do you have any reason behind your argument? especially on accounting basis.
cc @wipawii

@hitrosol
Copy link

Hi @kittiu
Thanks for considering this use case.
Requester will think that all the expense spent after s/he get advance will be approved whenever s/he clear the advance as long as the actual spending will be less than the advance per Analytic Account.
It will be surprise if s/he can't clear the advance because the commitment hans't consider this amount.

I also found some situation where the reallocation of the expense is conducted through the Journal Entries. Will you put the budget validation in Journal Entries whenever user Approve it ?

Good job for this module :)

@kittiu
Copy link
Member Author

kittiu commented Oct 28, 2019

Hi @hitrosol

Yes, we check on account.move - post(). So, it will cover the case.

For hr_expense_advance_clearing. We agree to make it work on hr advance also. It will cover both cases in the future.

You have project or experiences with public budgeting?

Thank you for your comment. As this progress, would love more comment from you.

@kittiu
Copy link
Member Author

kittiu commented Oct 28, 2019

By the way, this PR is closed, as I want to move discuss here to the issue. In future, let's discuss there :)
#36

@ecosoft-odoo ecosoft-odoo deleted the 12.0-add-budget_management branch December 4, 2019 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants