Skip to content

Commit

Permalink
[FIX] base_import_module: activate from form view and upgrade
Browse files Browse the repository at this point in the history
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#157008

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
  • Loading branch information
arpa-odoo committed Mar 27, 2024
1 parent 929b920 commit 5df277f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions addons/base_import_module/views/ir_module_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 5df277f

Please sign in to comment.