ITA - Gestione cespiti - Importazione storico

l10n_it_asset_history_import
REPOSITORY
REPOSITORYOCA/l10n-italy
GIT
GIThttps://github.com/OCA/l10n-italy.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-italy/tree/14.0/l10n_it_asset_history_import
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Openforce
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Openforce
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, matteo.tognini, Marco Colombo
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-italy
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_financial_report
OCA/account-financial-tools:
    - account_fiscal_year
OCA/l10n-italy:
    - assets_management
OCA/reporting-engine:
    - report_xlsx
OCA/server-ux:
    - date_range
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES xlrd
xlsxwriter
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
asset_category_form_view_inherit asset.category.form.view asset.category xpath Inherits assets_management.asset_category_form_view
asset_depreciation_mode_form_view_inherit asset.depreciation.mode.form.view asset.depreciation.mode xpath Inherits assets_management.asset_depreciation_mode_form_view
asset_depreciation_mode_tree_view_inherit asset.depreciation.mode.tree.view asset.depreciation.mode xpath Inherits assets_management.asset_depreciation_mode_tree_view
asset_depreciation_type_form_view_inherit asset.depreciation.type.form.view asset.depreciation.type xpath Inherits assets_management.asset_depreciation_type_form_view
asset_depreciation_type_tree_view_inherit asset.depreciation.type.tree.view asset.depreciation.type xpath Inherits assets_management.asset_depreciation_type_tree_view
asset_form_view_inherit asset.form.view asset.asset xpath Inherits assets_management.asset_form_view
asset_search_view_inherit asset.search.view asset.asset xpath Inherits assets_management.asset_search_view
asset_tree_view_inherit asset.tree.view asset.asset xpath Inherits assets_management.asset_tree_view
wizard_wizard_asset_history_import wizard.asset.history.import.form.view wizard.asset.history.import form New
Models touched (6)

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (5)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • make_template_file_data(self, file_headers)
  • write(self, vals)

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (4)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • write(self, vals)

New fields (0)

No new fields.

Public methods (1)
  • get_template_file_data(self, file_headers)

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (4)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • write(self, vals)

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (4)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • write(self, vals)

New fields (4)
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' args: 'res.company'
  • file Binary
    string='File'
  • filename Char
    string='File Name'
  • template_file Binary
    string='Template File'
Public methods (11)
  • check_before_import(self)
  • convert_to_asset_vals(self, asset_dict, workbook, sheet)
    Takes `asset_dict` as read from imported file, returns vals to be written into the DB (via a `create()` or `write()`
  • convert_to_dep_vals(self, dep_dict, workbook, sheet)
    Takes `dep_dict` as read from imported file, returns vals to be written into the DB (via a `create()` or `write()`
  • convert_to_lines_vals(self, line_dicts, workbook, sheet)
    Takes `line_dicts` as read from imported file, returns list of vals to be written into the DB (via a `create()` or `write()`
  • download_template_file(self)
    Retrieve an asset with any depreciation line to create a template file with its data. If no asset is found, simply return an empty template file with sheet headers only (as by `template_file` default).
  • get_default_company_id(self)
    @api.model
  • get_obj_by_import_code(self, model, code)
    This method returns an asset, a category, a depreciation type or mode according to given `model` and `code`.
  • import_assets_from_data(self, file_data, workbook, sheet)
  • import_file(self)
    Imports the `file` content
  • launch_view(self, asset_ids)
    Opens tree view upon assets
  • parse_file(self)
REPOSITORY
REPOSITORYOCA/l10n-italy
GIT
GIThttps://github.com/OCA/l10n-italy.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-italy/tree/12.0/l10n_it_asset_history_import
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Openforce
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Openforce
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Docker @ kuntrawant
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-italy
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:18
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_financial_report
OCA/account-financial-tools:
    - account_fiscal_year
OCA/l10n-italy:
    - assets_management
OCA/reporting-engine:
    - report_xlsx
OCA/server-ux:
    - date_range
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
    - account_cancel
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES xlrd
xlsxwriter
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
asset_category_form_view_inherit asset.category.form.view asset.category xpath Inherits assets_management.asset_category_form_view
asset_depreciation_mode_form_view_inherit asset.depreciation.mode.form.view asset.depreciation.mode xpath Inherits assets_management.asset_depreciation_mode_form_view
asset_depreciation_mode_tree_view_inherit asset.depreciation.mode.tree.view asset.depreciation.mode xpath Inherits assets_management.asset_depreciation_mode_tree_view
asset_depreciation_type_form_view_inherit asset.depreciation.type.form.view asset.depreciation.type xpath Inherits assets_management.asset_depreciation_type_form_view
asset_depreciation_type_tree_view_inherit asset.depreciation.type.tree.view asset.depreciation.type xpath Inherits assets_management.asset_depreciation_type_tree_view
asset_form_view_inherit asset.form.view asset.asset xpath Inherits assets_management.asset_form_view
asset_search_view_inherit asset.search.view asset.asset xpath Inherits assets_management.asset_search_view
asset_tree_view_inherit asset.tree.view asset.asset xpath Inherits assets_management.asset_tree_view
wizard_wizard_asset_history_import wizard.asset.history.import.form.view wizard.asset.history.import form New
Models touched (6)

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (5)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • make_template_file_data(self, file_headers)
  • write(self, vals)
    @api.multi

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (4)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • write(self, vals)
    @api.multi

New fields (0)

No new fields.

Public methods (1)
  • get_template_file_data(self, file_headers)

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (4)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • write(self, vals)
    @api.multi

New fields (1)
  • import_code Char
    copy=False help='Used to import data from xls(x) files. Must be unique.' readonly=True string='Import Code'
Public methods (4)
  • assign_import_code(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_by_import_code(self, code)
    @api.model
  • write(self, vals)
    @api.multi

New fields (4)
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' args: 'res.company'
  • file Binary
    string='File'
  • filename Char
    string='File Name'
  • template_file Binary
    string='Template File'
Public methods (11)
  • check_before_import(self)
  • convert_to_asset_vals(self, asset_dict, workbook, sheet)
    Takes `asset_dict` as read from imported file, returns vals to be written into the DB (via a `create()` or `write()`
  • convert_to_dep_vals(self, dep_dict, workbook, sheet)
    Takes `dep_dict` as read from imported file, returns vals to be written into the DB (via a `create()` or `write()`
  • convert_to_lines_vals(self, line_dicts, workbook, sheet)
    Takes `line_dicts` as read from imported file, returns list of vals to be written into the DB (via a `create()` or `write()`
  • download_template_file(self)
    @api.multi
    Retrieve an asset with any depreciation line to create a template file with its data. If no asset is found, simply return an empty template file with sheet headers only (as by `template_file` default).
  • get_default_company_id(self)
    @api.model
  • get_obj_by_import_code(self, model, code)
    This method returns an asset, a category, a depreciation type or mode according to given `model` and `code`.
  • import_assets_from_data(self, file_data, workbook, sheet)
  • import_file(self)
    @api.multi
    Imports the `file` content
  • launch_view(self, asset_ids)
    @api.multi
    Opens tree view upon assets
  • parse_file(self)