Repository
OCA/server-ux · module folder · Try on Runboat
Module version
1.0.0
Category
Personalization
Folder size
0.41 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/server-ux
Last tracking update
2026-08-17 11:36:01
Authors
Odoo Community Association (OCA), Tecnativa, LasLabs, Ursa Information Systems, brain-tec AG
Maintainers
Odoo Community Association (OCA), Tecnativa, LasLabs, Ursa Information Systems, brain-tec AG
Committers
Franco Leyes, OCA-git-bot, oca-ci
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
None
Description
This module extends the export capability:

1.  It allows an admin to manage export profiles (`ir.exports`) that
    Odoo stores internally but does not show anywhere.
2.  It also adds a new column to access rights to enable/disable export
    and override the export method to check if the user is allowed to
    export. Export is enabled by default.

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
ir_exports_form_view Export Profile form ir.exports form New
ir_exports_tree_view Export Profile tree ir.exports list New
ir_model_access_view_form ir.model.access.form.base_export_manager ir.model.access form Inherits base.ir_access_view_form
ir_model_access_view_tree ir.model.access.list.base_export_manager ir.model.access list Inherits base.ir_access_view_tree
ir_model_access_view_tree_edition ir.model.access.list.edition.base_export_manager ir.model.access list Inherits base.ir_access_view_tree_edition
ir_model_view_form ir.model.form.base_export_manager ir.model form Inherits base.view_model_form
res_groups_view_form res.groups.form res.groups form Inherits base.view_groups_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (3)
  • model_id Many2one → ir.model
    compute='_compute_model_id' compute_sudo=True domain=[('transient', '=', False)] help='Database model to export.' inverse='_inverse_model_id' store=True args: 'ir.model', 'Model'
  • name Char
    required=True
  • resource Char
    help="Model's technical name." readonly=True
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
    Check required values when creating the record. Odoo's export dialog populates ``resource``, while this module's new form populates ``model_id``. At least one of them is required to trigger the methods that fill up the other, so this should fail if one is missing.

New fields (11)
  • field1_id Many2one → ir.model.fields
    domain="[('model_id', '=', model1_id)]" args: 'ir.model.fields', 'First field'
  • field2_id Many2one → ir.model.fields
    domain="[('model_id', '=', model2_id)]" args: 'ir.model.fields', 'Second field'
  • field3_id Many2one → ir.model.fields
    domain="[('model_id', '=', model3_id)]" args: 'ir.model.fields', 'Third field'
  • field4_id Many2one → ir.model.fields
    domain="[('model_id', '=', model4_id)]" args: 'ir.model.fields', 'Fourth field'
  • label Char
    compute='_compute_label' compute_sudo=True
  • model1_id Many2one → ir.model
    readonly=True related='export_id.model_id' related_sudo=True args: 'ir.model', 'First model'
  • model2_id Many2one → ir.model
    compute='_compute_model2_id' compute_sudo=True args: 'ir.model', 'Second model'
  • model3_id Many2one → ir.model
    compute='_compute_model3_id' compute_sudo=True args: 'ir.model', 'Third model'
  • model4_id Many2one → ir.model
    compute='_compute_model4_id' compute_sudo=True args: 'ir.model', 'Fourth model'
  • name Char
    compute='_compute_name' compute_sudo=True help="Field's technical name." inverse='_inverse_name' store=True
  • sequence Integer
Public methods (2)
  • field_n(self, n, only_name=False)
    Helper to choose the field according to its indentation level. :param int n: Number of the indentation level to choose the field, from 1 to 3. :param bool only_name: Return only the field name, or return its value.
  • model_n(self, n, only_name=False)
    Helper to choose the model according to its indentation level. :param int n: Number of the indentation level to choose the model, from 1 to 3. :param bool only_name: Return only the model name, or return its value.

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)
    Odoo implementation doesn't allow add more access types, so we send all models where the user has the 'export' access over the session dictionary. TODO: Use other way to don't send all this data every time.

New fields (1)
  • perm_export Boolean
    default=True args: 'Export Access'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • fetch_export_models(self)
    @api.model
    Gets all models where the user has export access.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…