mis-builder icon indicating copy to clipboard operation
mis-builder copied to clipboard

[18.0][MIG] mis_builder_budget: Migration to 18.0

Open chaule97 opened this issue 1 year ago • 3 comments

  • Depends on: https://github.com/OCA/mis-builder/pull/652

chaule97 avatar Dec 03 '24 03:12 chaule97

Hi, I tried to install BOTH the mis_builder_budget end mis_builder

and MERGE them. The process FAILED and got a CONFLICT trying to merge the two different PC

Considering the two PR are two autonomous and distinct, how can I install and test them together ?

(venv18) odoo@Apollo11:~/18.0/addons/custom/chaule97$ git clone https://github.com/chaule97/mis-builder.git
Clone in 'mis-builder' in corso...
remote: Enumerating objects: 12829, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 12829 (delta 9), reused 7 (delta 7), pack-reused 12814 (from 2)
Ricezione degli oggetti: 100% (12829/12829), 5.93 MiB | 8.55 MiB/s, fatto.
Risoluzione dei delta: 100% (9227/9227), fatto.
(venv18) odoo@Apollo11:~/18.0/addons/custom/chaule97$ cd mis-builder/
(venv18) odoo@Apollo11:~/18.0/addons/custom/chaule97/mis-builder$ git checkout 18.0-mig-mis_builder
ramo '18.0-mig-mis_builder' impostato per tracciare 'origin/18.0-mig-mis_builder'.
Si è passati a un nuovo branch '18.0-mig-mis_builder'
(venv18) odoo@Apollo11:~/18.0/addons/custom/chaule97/mis-builder$ git merge origin/18.0-mig-mis_builder_budget 
Merge automatico di .pre-commit-config.yaml in corso
CONFLITTO (contenuto): conflitto di merge in .pre-commit-config.yaml
Merge automatico di mis_builder_budget/models/mis_budget_item_abstract.py in corso
CONFLITTO (contenuto): conflitto di merge in mis_builder_budget/models/mis_budget_item_abstract.py
Merge automatico fallito; risolvi i conflitti ed esegui il commit
del risultato.

Giuliano69 avatar Apr 27 '25 16:04 Giuliano69

you just clone origin repo and fetch into your local branch:

step 1: git clone https://github.com/OCA/mis-builder.git step 2: git fetch origin pull/653/head:your_local_branch

chaule97 avatar Apr 27 '25 17:04 chaule97

/ocabot migration mis_builder_budget

sbidoul avatar May 09 '25 06:05 sbidoul

@chaule97: Can you please make runboat available so I can review it? As we need to use this module in a productive environment.

BhaveshHeliconia avatar May 14 '25 07:05 BhaveshHeliconia

I've created a migration for the mis_builder_budget module to make it compatible with Odoo 18, and it's working properly. How can I submit this migration? https://github.com/z69426/mis_builder_budget.git

z69426 avatar May 15 '25 03:05 z69426

Thanks for the quick reaction @chaule97

A computed stored field cannot depend on the context, though.

I suggest the following

  • make company_id a regular non computed field with a default value
  • make it visible in the budget items views
  • add a constraint on company_id so it is one of the companies of the account_id
  • add a company consistency check on account_id

sbidoul avatar Jun 02 '25 14:06 sbidoul

in direct from Cartagena, Spain, during the Spanish OCA Days

Tested MIS Builder Budget on v18 runboat in database with all modules installed.

There was no demo data because the demo data module was not migrated yet.

Steps:

  • created a super basic template with one line with the expression: crd[4%]

  • created a MIS report with the date range 2025 that I created on the fly, using the template from previous step

  • displayed the report: the report shows the right amount based on the accounting items

  • created a new budget (based on accounts)

  • [bug] created a new item for this budget. Here, the Date range field doesn't show the already existing 2025 date range.

  • Once a line is created and date range is set, it is then possible to find all the date ranges previously created.

  • [bug2] created the 2025 date range from there, which opened a pop up showing "archived" on the right (see image). Why archived? When selecting a value on the "type" field, the archived word disappeared. I created 2025 again but couldn't save it because it must be unique per company (which is logical) but could not find it from the budget item line. So created a quarter instead. Sélection_107

  • adapted the mis report to have 2 columns in comparison mode, one with actuals, the other with the budget created previously. It works (actuals shows 127k, budget shows 500k) for the whole 2025 year.

  • adapted the report to get a view on half a year only for the budget column by changing the date ranges to 31st May. The report displays now 206 849€, which is different from the 5/12 of 500 000€, I suppose the prorata temporis is based on days of the year.

==> CCL: bug with the date range selection to investigate. The rest seems to work alright from a general perspective for the budget by accounts; Budget by KPI's not tested.

vdewulf avatar Jun 02 '25 14:06 vdewulf

@chaule97 thanks for the PR! Could you please remove the test-requirements.txt file? The dependency of mis_builder has already been merged. Thanks!

rov-adhoc avatar Jun 02 '25 17:06 rov-adhoc

I'll finish this in #690

Thanks for this work!

sbidoul avatar Jun 03 '25 13:06 sbidoul