[18.0][MIG] maintenance_plan: Another Migration to 18.0#520
[18.0][MIG] maintenance_plan: Another Migration to 18.0#520OCA-git-bot merged 135 commits intoOCA:18.0from
Conversation
a8a0100 to
afb91a1
Compare
2e54b3b to
4bbc30a
Compare
8443552 to
f66f452
Compare
|
I’m not sure if the best way to maintain the functionalities of the child modules is to migrate this module and make Odoo’s standard functionality invisible. Perhaps we should modify the child modules so that instead of inheriting from maintenance_plan, they inherit from base_maintenance, and then refactor their functionalities. What do you think @pedrobaeza ? |
|
Well, after some time struggling with the Odoo way and the maintenance plan way I think I can share my POV. 1- Odoo way is simpler, however, it works well only in controlled environments. For example, If I need to make a maintenance plan for reviews every 3 years, Odoo allows me to do it, but it creates some preventive tasks in advance that have no sense IMO. IMO, we should keep both options in the system and make maintenance_plan work in what makes sense, complex environments. It means that we shouldn't hide the odoo way, however, I would recommend to use maintenance plan if possible. About the migrations, we should need to do some stuff to avoid the execution of the migration scripts, but I have an idea of how to do it. |
|
You can explain that on the CONTEXT.md file of this module. |
Hi @etobella, have you been able to spend some time on the proposal for making this module’s functionalities coexist with the ones provided by Odoo? |
|
@ThiagoMForgeFlow I didn't, there were no more answer on the topic, however, it might have sense IMO to restore it |
|
I do agree with your approach |
|
I agree that the fields could easily be hidden using an option (company/equipment), but the biggest problem comes from the calendar. It uses a specific JavaScript implementation, and in fact, Odoo's entire recurring implementation is done in this calendar. Honestly, I don't know how this option could be implemented to disable "maintenance_plan" inherited views for a specific company/equipment. (I don't really see the point of having an option to hide or show this feature, since once you install the “maintenance_plan” module, you accept that Odoo's built-in recurrent features will not be visible.) |
|
I think both approaches have their own target, and might even have sense to have them together in some specific environments. I think we shouldn't remove odoo maintenance behavior by default. If that is a problem, we can have a second module for that. |
I'm Ok with that, I will extract every "hide/disable" view items to a specific module and add a |
|
Yes, it seems correct to me. |
… equipment maintenance team is not filled [ADD] icon.png
[UPD] Update maintenance_plan.pot
after this commit odoo/odoo@3bd8410 the maintenance request form view now has an independent page. This commit adapts the view to align with the new page structure.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: maintenance-17.0/maintenance-17.0-maintenance_plan Translate-URL: https://translation.odoo-community.org/projects/maintenance-17-0/maintenance-17-0-maintenance_plan/
f66f452 to
3087d57
Compare
- `maintenance.request` views are now set in their own file - `note` field replaced with existing combo `instruction_type,instruction_pdf,instruction_google_slide,instruction_text`
3087d57 to
5616445
Compare
| </button> | ||
| </div> | ||
| <xpath expr="//group[@name='statistics']" position="attributes"> | ||
| <attribute name="invisible">True</attribute> |
There was a problem hiding this comment.
Does anybody remember why the statistic data have been hidden ?
There was a problem hiding this comment.
Hi @cvinh, after checking the commit history I can see that it was originally added in version 12, replacing the group maintenance. Then, in the migrations for versions 13 and 17, the xpath was adjusted to match each Odoo version. However, looking at Odoo version 18, I’m not sure it still makes sense to hide these fields.
original implemenatation: 12_imp
Migration commit 13: 13_mig
Migration commit 17: 17_mig
|
Hi @etobella and @pedrobaeza What is your final opinion? |
|
I let @etobella to give his opinion, as we are going to the native feature. |
etobella
left a comment
There was a problem hiding this comment.
Let's proceed with it
/ocabot merge nobump
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 4b8a8af. Thanks a lot for contributing to OCA. ❤️ |


Continuation from #514, I'm reusing my comment from #514 (comment)
You can read that
maintenance_planis deprecated but merged in 17.0 #414Currently some other modules "depends" on it (from 14.0 to 17.0):
maintenance_inspection: https://github.com/OCA/maintenance/tree/14.0/maintenance_inspectionmaintenance_location: https://github.com/OCA/maintenance/tree/17.0/maintenance_locationmaintenance_plan_activity: https://github.com/OCA/maintenance/tree/16.0/maintenance_plan_activitymaintenance_project_plan: https://github.com/OCA/maintenance/tree/14.0/maintenance_project_planFor some of them (
maintenance_inspection,maintenance_location), it would only require to drop references tomaintenance_planitems to keep them in 18.0.But that's not the point: the "recurrent" implementation from Odoo is javascript-only ... and its behavior has nothing to do with
maintenance_plan. I think there has been a misunderstanding on this because the “advanced” features of themaintenance_planmodule are much closer and more realistic to the way a maintenance workshop operates and this module should be reintroduced, that's the point of this PR.Following are changes:
maintenance_planis installed_compute_recurring_maintenanceis alwaysFalsejs_class="calendar_with_recurrence"is removed.notefield frommaintenance.requesthas been dropped (use instructions fields instead)notefield frommaintenance.planhas been replaced with the same instructions fields existing inmaintenance_requestsince 17.0.Remaining things to do:
notefield content but how ?