Maintenance Request button box
Closed this issue · 6 comments
I'm working in several modules where it would be nice to have a button box in maintenance.request
's form.
The thing is that I dont want to add it in one of this modules since then all modules that want to use the button box will depend on it, which doesn't make sense.
The other solution is to create a module that adds the button box to it, but creating a module just for that... Which would be the best solution? Maybe creating a base_maintenance
module and include this kind of things there.
I think that could be achieved by extending def fields_view_get()
in each of your modules. The def fields_view_get()
method should first check whether the button box is already present in the view and if not, create one. Then it should add the button.
Disadvantages: button added by python code instead of xml view inheritance.
Advantages: no need of extra module dependency.
My vote 🗳️ : I prefer a new module with a explicit view that adds the button box than the python workaround.
I thinks this is kind of related with the discussion here: #40. Maintenance app is missing many basic fields/views that are standard in any other Odoo app, so I'm starting to think that a base_maintance is the best way to fill this gap.
Additionally, when the module is ready and we are good with it, we could propose a PR to Odoo master to add those little fixes.
+1 to this. It will be very hard to get this merged to Odoo but anyways I think it's the best we can do.
How do we proceed? Do we make another PR or rename #40 and work there?
All you need is the button box in the maintenance request? I can update my PR with my needs and that empty button box in the maintenance.request form view. Dos this work for you?
Yes for now
@jarroyomorales I think this can be closed as #40 has been merged.