diff options
| author | william <wan@odoo.com> | 2020-04-14 12:46:40 +0000 |
|---|---|---|
| committer | william <wan@odoo.com> | 2020-04-15 15:14:02 +0000 |
| commit | 387ee3e05a15a1312eb4d3531489dfadb66b2d66 (patch) | |
| tree | 2a43e388db9a85aef88e4fce206c0f1cf35fcb61 /addons/account/static | |
| parent | dff06e82b371c8b9610b7f4c5bfdf35fee3b7d7e (diff) | |
[FIX] account: account type selection in list view
The custom selection widget was only used in the form.
A small rework had to be done to make it work in list views because the
values were not pre loaded.
closes odoo/odoo#49604
X-original-commit: cf942e6df3bf065e299d8ad0dcfd8ed2cc66b29c
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
Diffstat (limited to 'addons/account/static')
| -rw-r--r-- | addons/account/static/src/js/account_selection.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/account/static/src/js/account_selection.js b/addons/account/static/src/js/account_selection.js index a43083867d8..d098505b593 100644 --- a/addons/account/static/src/js/account_selection.js +++ b/addons/account/static/src/js/account_selection.js @@ -18,12 +18,13 @@ odoo.define('account.hierarchy.selection', function (require) { if (!self.hierarchy_groups) { prom = this._rpc({ model: 'account.account.type', - method: 'read', - args: [ - _.filter(_.map(this.values, v => v[0]), v => typeof v == 'number'), - ['internal_group'], - ], + method: 'search_read', + kwargs: { + domain: [], + fields: ['id', 'internal_group', 'display_name'], + }, }).then(function(arg) { + self.values = _.map(arg, v => [v['id'], v['display_name']]) self.hierarchy_groups = [ { 'name': _('Balance Sheet'), |
