[FIX] base_import_module: activate from form view and upgrade

Before this commit
==================
Unable to activate the industry from the form view in the industry section.
Additionally, the button in the form for upgrading would be called the
button_immediate_upgrade method, resulting in errors.

After this commit
=================
Activation of the industry from the form view in the industry section is now
possible. Furthermore, the issue with upgrading the industry from the form view
has been resolved.

task-3775729

closes odoo/odoo#157008

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
This commit is contained in:
Arjun Panchal
2024-03-27 16:10:58 +00:00
parent 929b92076d
commit 5df277fbc5
@@ -49,6 +49,16 @@
<xpath expr="//page[@name='technical_data']" position="attributes">
<attribute name="invisible">module_type != 'official'</attribute>
</xpath>
<xpath expr="//button[@name='button_immediate_install']" position="after">
<button type="object" class="btn btn-primary me-1" name="button_immediate_install_app" invisible="state != 'uninstalled' or module_type in ('official', False)" groups="base.group_system">Activate</button>
<button type="object" class="btn btn-primary me-1" name="button_immediate_install_app" invisible="state == 'uninstalled' or module_type in ('official', False)" groups="base.group_system">Upgrade</button>
</xpath>
<xpath expr="//button[@name='button_immediate_install']" position="attributes">
<attribute name="invisible">to_buy or state != 'uninstalled' or (module_type and module_type != 'official')</attribute>
</xpath>
<xpath expr="//button[@name='button_immediate_upgrade']" position="attributes">
<attribute name="invisible">state == 'uninstalled' or (module_type and module_type != 'official')</attribute>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_module_filter_apps_inherit">