Skip to content

[V18/V19] splitting module in many more little modules #726

@legalsylvain

Description

@legalsylvain

Hi all,

First thanks for this great module !
I just discovered mis_builder during the last OCA days (in the training courses), and it is very powerful tool. It is super easy, super fast and super simple. As Odoo.

However I have a question, regarding the design. When I discovered the code, I was surprised to see that the base module mis_builder, is depending on account :

  • In fact MIS mean "Management Information System", that is not related to account.
  • after all, it's totally possible to want the MIS feature out of accounting context. (with sub queries, on any model). In fact, we could imagine some people wanting to use this tools in a framework project, without any product / account module installed.
  • in very practical terms, I have an instance, where accounting data are not complete / correct. (account moves are exported in EBP, with other account moves that comes from other softwares). As a result, the "bal" features will not works, as Odoo doesn't have all the accounting data (or sometime, moves are changed in EBP, but not in Odoo). In that context, having a lot of useless code installed is not optimal.

As a result,

  • the "main" mis_builder module is quite big.
  • Users that don't have accounting access right can not see MIS reports.

I have so the idea to split modules into many ones.

Structure changes

mis_builder changes : split into :

  • mis_builder_base, depends = "base"
  • mis_builder_board, depends = ["mis_builder_base", "board"], auto_install = True
  • mis_builder_report_xlsx, depends = ["mis_builder_base", "report_xlsx"], auto_install = True
  • mis_builder_date_range, depends = ["mis_builder_base", "date_range"], auto_install = True
  • mis_builder_account, depends = ["mis_builder_base", "account"]

mis_builder_budget changes :

  • now depends on ["mis_builder_account"] (before ["mis_builder", "account"]``)

Optionally

  • keep an empty module mis_builder, depends = ["mis_builder_base", "mis_builder_board", "mis_builder_report_xlsx", "mis_builder_date_range", "mis_builder_account"], application=True, so for functional people, no changes, when making demo, etc.

Main UX changes :

Important note :

  • in a previous thread, I faced some difficulties with other contributors, when I was in favor to refactor a module that was deployed in production, changing dependencies. (adding new ones in fact). mass_editing refactoring + discussion about stability
    As a result, my question here is ONLY "in an ideal world, Do you think it's better to split modules, or to keep a single big one ?".
    Once this first question answered, and if refactor is desired by PSC, we could focus on the next question : "on which version we are applying this refactor ? (current V18 version, or new V19 release).

Below the Pro / Cons list :
(I will update this list with your pro / cons items you will eventually mention in this issue)

Pro

  • Lighter and smaller modules
  • Easier migration of modules for each release
  • Earlier migration. (as we don't have to wait for extra OCA migration like report_xlsx or date_range, to begin to work on the migration)
  • better modularity, allow new usage of MIS buider as a framework tool, out of the account concept.
  • Allow non accounting people to access MIS report (and optionaly MIS template & style configuration)
  • Perhaps the module will be easier for new comers (developers) to understand. (For now, mis_builder is still a big thing.)
  • Others points ?

Cons

  • This will make more difficult to port bug fixes from a "all in one version" (like v16) to "a splitted version" (like 20).
  • a less "product" vision. For the time being, mis_builder depends on many modules, and there is only 1 main module. (well 2 with the budget module).
  • others points ?

Pending Questions

  • I'm not sure how long such refactoring will take. (but if there is validation from mis_builder's PSCs, I'm willing to do a PoC in the coming weeks,at least on one split. )

Thanks for your attention !

CC : @sbidoul.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions