Skip to content

Commit 436e2f0

Browse files
committed
[18.0][MIG][base_export_manager] Migration to 18.0
- Removing unnecessary rendering of the technical field in the export menu as odoo core already does it - Fixing JS super call - Replacing tree for list - More fixes
1 parent e058a6c commit 436e2f0

File tree

7 files changed

+19
-32
lines changed

7 files changed

+19
-32
lines changed

base_export_manager/__manifest__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
{
88
"name": "Manage model export profiles",
99
"category": "Personalization",
10-
"version": "16.0.1.0.1",
10+
"version": "18.0.1.0.1",
1111
"depends": ["web"],
1212
"data": [
1313
"views/ir_exports.xml",
1414
"views/ir_model.xml",
1515
"views/ir_model_access.xml",
1616
"views/res_groups.xml",
1717
],
18-
"qweb": ["static/src/xml/base.xml"],
1918
"author": "Tecnativa, "
2019
"LasLabs, "
2120
"Ursa Information Systems, "
@@ -26,7 +25,6 @@
2625
"assets": {
2726
"web.assets_backend": [
2827
"base_export_manager/static/src/views/list/list_controller.esm.js",
29-
"base_export_manager/static/src/xml/base.xml",
3028
],
3129
},
3230
"installable": True,

base_export_manager/static/src/views/list/list_controller.esm.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
/** @odoo-module **/
2-
31
import {ListController} from "@web/views/list/list_controller";
42
const {onWillRender} = owl;
53
import {patch} from "@web/core/utils/patch";
64
import {session} from "@web/session";
75

8-
patch(ListController.prototype, "base_export_manager", {
6+
patch(ListController.prototype, {
97
setup() {
10-
this._super(...arguments);
8+
super.setup();
119
onWillRender(async () => {
1210
if (this.isExportEnable) {
1311
const is_export_enabled =

base_export_manager/static/src/xml/base.xml

-10
This file was deleted.

base_export_manager/views/ir_exports.xml

+12-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<record id="ir_exports_action" model="ir.actions.act_window">
66
<field name="name">Export Profiles</field>
77
<field name="res_model">ir.exports</field>
8-
<field name="view_mode">tree,form</field>
8+
<field name="view_mode">list,form</field>
99
</record>
1010
<menuitem
1111
id="ir_exports_menu"
@@ -17,11 +17,11 @@
1717
<field name="name">Export Profile tree</field>
1818
<field name="model">ir.exports</field>
1919
<field name="arch" type="xml">
20-
<tree>
20+
<list>
2121
<field name="name" />
2222
<field name="model_id" />
2323
<field name="resource" />
24-
</tree>
24+
</list>
2525
</field>
2626
</record>
2727
<record id="ir_exports_form_view" model="ir.ui.view">
@@ -42,12 +42,12 @@
4242
colspan="4"
4343
context="{'default_model1_id': model_id}"
4444
>
45-
<tree editable="bottom">
45+
<list editable="bottom">
4646
<field name="sequence" widget="handle" />
47-
<field name="model1_id" invisible="True" />
48-
<field name="model2_id" invisible="True" />
49-
<field name="model3_id" invisible="True" />
50-
<field name="model4_id" invisible="True" />
47+
<field name="model1_id" column_invisible="True" />
48+
<field name="model2_id" column_invisible="True" />
49+
<field name="model3_id" column_invisible="True" />
50+
<field name="model4_id" column_invisible="True" />
5151
<field name="label" />
5252
<field name="name" readonly="1" />
5353
<field
@@ -57,20 +57,21 @@
5757
/>
5858
<field
5959
name="field2_id"
60-
attrs="{'readonly': [('model2_id', '=', False)]}"
60+
readonly="not model2_id"
6161
options="{'no_open': True, 'no_create': True}"
6262
/>
6363
<field
6464
name="field3_id"
6565
attrs="{'readonly': [('model3_id', '=', False)]}"
66+
readonly="not model3_id"
6667
options="{'no_open': True, 'no_create': True}"
6768
/>
6869
<field
6970
name="field4_id"
70-
attrs="{'readonly': [('model3_id', '=', False)]}"
71+
readonly="not model4_id"
7172
options="{'no_open': True, 'no_create': True}"
7273
/>
73-
</tree>
74+
</list>
7475
</field>
7576
</page>
7677
</notebook>

base_export_manager/views/ir_model.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<field name="inherit_id" ref="base.view_model_form" />
77
<field name="arch" type="xml">
88
<xpath
9-
expr="//field[@name='access_ids']//tree//field[@name='perm_unlink']"
9+
expr="//field[@name='access_ids']//list//field[@name='perm_unlink']"
1010
position="after"
1111
>
1212
<field name="perm_export" />

base_export_manager/views/ir_model_access.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" ?>
22
<odoo>
33
<record id="ir_model_access_view_tree" model="ir.ui.view">
4-
<field name="name">ir.model.access.tree.base_export_manager</field>
4+
<field name="name">ir.model.access.list.base_export_manager</field>
55
<field name="model">ir.model.access</field>
66
<field name="inherit_id" ref="base.ir_access_view_tree" />
77
<field name="arch" type="xml">
@@ -11,7 +11,7 @@
1111
</field>
1212
</record>
1313
<record id="ir_model_access_view_tree_edition" model="ir.ui.view">
14-
<field name="name">ir.model.access.tree.edition.base_export_manager</field>
14+
<field name="name">ir.model.access.list.edition.base_export_manager</field>
1515
<field name="model">ir.model.access</field>
1616
<field name="inherit_id" ref="base.ir_access_view_tree_edition" />
1717
<field name="arch" type="xml">

base_export_manager/views/res_groups.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<field name="inherit_id" ref="base.view_groups_form" />
77
<field name="arch" type="xml">
88
<xpath
9-
expr="//field[@name='model_access']//tree//field[@name='perm_unlink']"
9+
expr="//field[@name='model_access']//list//field[@name='perm_unlink']"
1010
position="after"
1111
>
1212
<field name="perm_export" />

0 commit comments

Comments
 (0)