ITA - Gestione Cespiti

l10n_it_asset_management
REPOSITORY
REPOSITORYOCA/l10n-italy
GIT
GIThttps://github.com/OCA/l10n-italy.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-italy/tree/18.0/l10n_it_asset_management
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYLocalization/Italy
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, sergiocorato, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-italy
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:12
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_financial_report
OCA/account-financial-tools:
    - account_fiscal_year
OCA/reporting-engine:
    - report_xlsx
OCA/server-ux:
    - date_range
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This modules allows account management of companies' assets.

Code Analysis

Views touched (73)
XML IDNameModelTypeStatus
asset_accounting_info_form_view asset.accounting.info.form.view asset.accounting.info form New
asset_accounting_info_search_view asset.accounting.info.search.view asset.accounting.info search New
asset_accounting_info_tree_view asset.accounting.info.list.view asset.accounting.info list New
asset_category_form_view asset.category.form.view asset.category form New
asset_category_tree_view asset.category.asset.list asset.category list New
asset_dep_line_form_view asset.dep.line.form.view asset.depreciation.line form New
asset_dep_line_search_view asset.depreciation.line.view asset.depreciation.line search New
asset_dep_line_tree_view asset.dep.line.list.view asset.depreciation.line list New
asset_depreciation_line_type_form_view asset.dep.line.type.form.view asset.depreciation.line.type form New
asset_depreciation_line_type_tree_view asset.dep.line.type.list.view asset.depreciation.line.type list New
asset_depreciation_mode_form_view asset.depreciation.mode.form.view asset.depreciation.mode form New
asset_depreciation_mode_tree_view asset.depreciation.mode.list.view asset.depreciation.mode list New
asset_depreciation_type_form_view asset.depreciation.type.form.view asset.depreciation.type form New
asset_depreciation_type_tree_view asset.depreciation.type.list.view asset.depreciation.type list New
asset_form_view asset.form.view asset.asset form New
asset_search_view asset.search.view asset.asset search New
asset_tag_form_view asset.tag.form.view asset.tag form New
asset_tag_tree_view asset.tag.list.view asset.tag list New
asset_tree_view asset.list.view asset.asset list New
document_layout document_layout ir.ui.view qweb New
template_asset_journal_asset template_asset_journal_asset ir.ui.view qweb New
template_asset_journal_asset_accounting_table_data template_asset_journal_asset_accounting_table_data ir.ui.view qweb New
template_asset_journal_asset_accounting_table_header template_asset_journal_asset_accounting_table_header ir.ui.view qweb New
template_asset_journal_asset_depreciation_table_data template_asset_journal_asset_depreciation_table_data ir.ui.view qweb New
template_asset_journal_asset_depreciation_table_header template_asset_journal_asset_depreciation_table_header ir.ui.view qweb New
template_asset_journal_asset_depreciations template_asset_journal_asset_depreciations ir.ui.view qweb New
template_asset_journal_asset_table_data template_asset_journal_asset_table_data ir.ui.view qweb New
template_asset_journal_asset_table_header template_asset_journal_asset_table_header ir.ui.view qweb New
template_asset_journal_asset_title template_asset_journal_asset_title ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_accounting_data template_asset_journal_asset_year_depreciation_accounting_data ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_amount_details template_asset_journal_asset_year_depreciation_amount_details ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_table_data template_asset_journal_asset_year_depreciation_table_data ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_table_header template_asset_journal_asset_year_depreciation_table_header ir.ui.view qweb New
template_asset_journal_base template_asset_journal_base ir.ui.view qweb New
template_asset_journal_body template_asset_journal_body ir.ui.view qweb New
template_asset_journal_category_data template_asset_journal_category_data ir.ui.view qweb New
template_asset_journal_category_totals template_asset_journal_category_totals ir.ui.view qweb New
template_asset_journal_qweb template_asset_journal_qweb ir.ui.view qweb New
template_asset_journal_report template_asset_journal_report ir.ui.view qweb New
template_asset_journal_title template_asset_journal_title ir.ui.view qweb New
template_asset_journal_totals template_asset_journal_totals ir.ui.view qweb New
template_asset_journal_totals_data template_asset_journal_totals_data ir.ui.view qweb New
template_asset_journal_totals_header template_asset_journal_totals_header ir.ui.view qweb New
template_asset_previsional_asset template_asset_previsional_asset ir.ui.view qweb New
template_asset_previsional_asset_accounting_table_data template_asset_previsional_asset_accounting_table_data ir.ui.view qweb New
template_asset_previsional_asset_accounting_table_header template_asset_previsional_asset_accounting_table_header ir.ui.view qweb New
template_asset_previsional_asset_depreciation_table_data template_asset_previsional_asset_depreciation_table_data ir.ui.view qweb New
template_asset_previsional_asset_depreciation_table_header template_asset_previsional_asset_depreciation_table_header ir.ui.view qweb New
template_asset_previsional_asset_depreciations template_asset_previsional_asset_depreciations ir.ui.view qweb New
template_asset_previsional_asset_table_data template_asset_previsional_asset_table_data ir.ui.view qweb New
template_asset_previsional_asset_table_header template_asset_previsional_asset_table_header ir.ui.view qweb New
template_asset_previsional_asset_title template_asset_previsional_asset_title ir.ui.view qweb New
template_asset_previsional_asset_year_depreciation_table_data template_asset_previsional_asset_year_depreciation_table_data ir.ui.view qweb New
template_asset_previsional_asset_year_depreciation_table_header template_asset_previsional_asset_year_depreciation_table_header ir.ui.view qweb New
template_asset_previsional_base template_asset_previsional_base ir.ui.view qweb New
template_asset_previsional_body template_asset_previsional_body ir.ui.view qweb New
template_asset_previsional_category_data template_asset_previsional_category_data ir.ui.view qweb New
template_asset_previsional_category_totals template_asset_previsional_category_totals ir.ui.view qweb New
template_asset_previsional_qweb template_asset_previsional_qweb ir.ui.view qweb New
template_asset_previsional_report template_asset_previsional_report ir.ui.view qweb New
template_asset_previsional_title template_asset_previsional_title ir.ui.view qweb New
template_asset_previsional_totals template_asset_previsional_totals ir.ui.view qweb New
template_asset_previsional_totals_data template_asset_previsional_totals_data ir.ui.view qweb New
template_asset_previsional_totals_header template_asset_previsional_totals_header ir.ui.view qweb New
view_asset_depreciation_form asset.depreciation.form.view asset.depreciation form New
view_asset_depreciation_situation_list asset.depreciation.situation.list asset.depreciation list New
view_asset_depreciation_tree view.asset.depreciation.list asset.depreciation list New
view_move_form_inherit view.move.form.inherit account.move xpath Inherits account.view_move_form
view_move_line_form_inherit view.move.line.form.inherit account.move.line xpath Inherits account.view_move_line_form
wizard_account_move_mange_asset_form_view wizard.account.move.manage.asset.form.view wizard.account.move.manage.asset form New
wizard_asset_generate_depreciation_form_view wizard.asset.generate.depreciation.form.view wizard.asset.generate.depreciation form New
wizard_asset_journal_report_form_view wizard.asset.journal.report.form.view wizard.asset.journal.report form New
wizard_asset_previsional_report_form_view wizard.asset.previsional.report.form.view wizard.asset.previsional.report form New
Models touched (37)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • get_fiscal_year_by_date(self, date, limit=1, company=None, miss_raise=True)
    @api.model
    Retrieves fiscal year by given ``date`` (a datetime.date object). By default, only 1 fiscal year will be returned, unless specified differently. If ``miss_raise`` is True and no fiscal year is found, an error will be raised.
  • get_fiscal_year_by_date_domain(self, date, company=None)
    @api.model
    Prepares a search() domain to retrieve fiscal years by given ``date``.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Assets Accounting Info' args: 'asset.accounting.info', 'move_id'
  • dep_line_ids Many2many → asset.depreciation.line
    compute='_compute_asset_data' store=True string='Depreciation Lines' args: 'asset.depreciation.line'
  • hide_link_asset_button Boolean
    compute='_compute_hide_link_asset_button' compute_sudo=True default=True string='Hide Asset Button'
  • l10n_it_asset_ids Many2many → asset.asset
    compute='_compute_asset_data' store=True string='Assets' args: 'asset.asset'
Public methods (5)
  • button_cancel(self)
  • check_company(self)
    @api.constrains('company_id')
  • get_linked_aa_info_records(self)
  • get_valid_accounts(self)
  • open_wizard_manage_asset(self)

New fields (3)
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Assets Accounting Info' args: 'asset.accounting.info', 'move_line_id'
  • dep_line_ids Many2many → asset.depreciation.line
    compute='_compute_asset_data' store=True string='Depreciation Lines' args: 'asset.depreciation.line'
  • l10n_it_asset_ids Many2many → asset.asset
    compute='_compute_asset_data' store=True string='Assets' args: 'asset.asset'
Public methods (3)
  • check_company(self)
    @api.constrains('company_id')
  • get_asset_purchase_amount(self, currency=None)
  • get_linked_aa_info_records(self)

New fields (7)
  • company_id Many2one → res.company
    readonly=True string='Company' args: 'res.company'
  • dep_line_id Many2one → asset.depreciation.line
    ondelete='set null' string='Depreciation Line' args: 'asset.depreciation.line'
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='set null' string='Asset' args: 'asset.asset'
  • move_id Many2one → account.move
    related='move_line_id.move_id' string='Move' args: 'account.move'
  • move_line_id Many2one → account.move.line
    ondelete='cascade' string='Move Line' args: 'account.move.line'
  • move_type Selection
    related='dep_line_id.move_type'
  • relation_type Selection
    required=True args: [('create', 'Asset Creation'), ('update', 'Asset Update'), ('partial_dismiss', 'Asset Partial Dismissal'), ('dismiss', 'Asset Dismissal')]
Public methods (15)
  • button_unlink(self)
    Button action: deletes a.a.info
  • check_and_normalize(self)
  • check_coherence(self)
    Checks info coherence
  • check_company_coherence(self)
    Checks companies
  • check_data_coherence(self)
  • create(self, vals_list)
    @api.model_create_multi
  • cron_vacuum_table(self)
    @api.model
    A cron that deletes obsolete records
  • get_all_companies(self)
  • get_main_fields(self)
    @api.model
  • get_normalized_info_vals(self)
  • get_records_to_delete_by_cron(self)
    Returns every a.a.info that fits the condition: (no asset AND no depreciation line) OR (no move AND no move line)
  • make_name(self)
  • name_get(self)
  • normalize_info(self)
    Normalize asset accounting info if needed
  • write(self, vals)

New fields (21)
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Accounting Info' args: 'asset.accounting.info', 'l10n_it_asset_id'
  • category_id Many2one → asset.category
    required=True string='Category' args: 'asset.category'
  • code Char
    default=''
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' tracking=True args: 'res.company'
  • currency_id Many2one → res.currency
    required=True string='Currency' args: 'res.currency'
  • customer_id Many2one → res.partner
    string='Customer' args: 'res.partner'
  • depreciation_ids One2many → asset.depreciation
    string='Depreciations' args: 'asset.depreciation', 'l10n_it_asset_id'
  • dismiss_date Date
  • dismissed Boolean
  • name Char
    required=True tracking=True
  • purchase_amount Monetary
    string='Purchase Value' tracking=True
  • purchase_date Date
    default=fields.Date.today() tracking=True
  • purchase_move_id Many2one → account.move
    string='Purchase Move' args: 'account.move'
  • sale_amount Monetary
    string='Sale Value'
  • sale_date Date
  • sale_move_id Many2one → account.move
    string='Sale Move' args: 'account.move'
  • sold Boolean
  • state Selection
    compute='_compute_state' default='non_depreciated' store=True args: [('non_depreciated', 'Non Depreciated'), ('partially_depreciated', 'Partially Depreciated'), ('totally_depreciated', 'Depreciated')]
  • supplier_id Many2one → res.partner
    string='Supplier' args: 'res.partner'
  • supplier_ref Char
    string='Supplier Ref.'
  • used Boolean
Public methods (14)
  • check_company(self)
    @api.constrains('company_id')
  • create(self, vals_list)
    @api.model_create_multi
  • get_asset_state(self)
  • get_default_company_id(self)
    @api.model
  • get_linked_aa_info_records(self)
  • launch_wizard_generate_depreciations(self)
  • make_name(self)
  • name_get(self)
  • onchange_category_id(self)
    @api.onchange('category_id')
  • onchange_company_currency(self)
    @api.onchange('company_id')
  • onchange_purchase_amount(self)
    @api.onchange('purchase_amount')
  • onchange_purchase_date(self)
    @api.onchange('purchase_date')
  • unlink(self)
  • write(self, vals)

New fields (12)
  • asset_account_id Many2one → account.account
    required=True string='Asset Account' args: 'account.account'
  • comment Text
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • depreciation_account_id Many2one → account.account
    required=True string='Depreciation Account' args: 'account.account'
  • fund_account_id Many2one → account.account
    required=True string='Fund Account' args: 'account.account'
  • gain_account_id Many2one → account.account
    required=True string='Capital Gain Account' args: 'account.account'
  • journal_id Many2one → account.journal
    required=True string='Journal' args: 'account.journal'
  • loss_account_id Many2one → account.account
    required=True string='Capital Loss Account' args: 'account.account'
  • name Char
    required=True
  • print_by_default Boolean
    default=True help="Defines whether a category should be added by default when printing assets' reports."
  • tag_ids Many2many → asset.tag
    string='Tag' args: 'asset.tag'
  • type_ids One2many → asset.category.depreciation.type
    default=get_default_type_ids string='Depreciation Types' args: 'asset.category.depreciation.type', 'category_id'
Public methods (4)
  • copy(self, default=None)
  • get_default_company_id(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • get_depreciation_vals(self, amount_depreciable=0)

New fields (6)
  • category_id Many2one → asset.category
    ondelete='cascade' readonly=True required=True string='Category' args: 'asset.category'
  • company_id Many2one → res.company
    readonly=True related='category_id.company_id' string='Company' args: 'res.company'
  • depreciation_type_id Many2one → asset.depreciation.type
    required=True string='Type' args: 'asset.depreciation.type'
  • mode_id Many2one → asset.depreciation.mode
    required=True string='Dep Mode' args: 'asset.depreciation.mode'
  • percentage Float
    string='Depreciation %'
  • pro_rata_temporis Boolean
    string='Pro-rata Temporis'
Public methods (1)
  • get_depreciation_vals(self, amount_depreciable=0)

New fields (30)
  • amount_depreciable Monetary
    string='Initial Depreciable Amount'
  • amount_depreciable_updated Monetary
    compute='_compute_amounts' store=True string='Updated Depreciable Amount'
  • amount_depreciated Monetary
    compute='_compute_amounts' store=True string='Depreciated Amount'
  • amount_gain Monetary
    compute='_compute_amounts' store=True string='Capital Gain'
  • amount_historical Monetary
    compute='_compute_amounts' store=True string='Historical Amount'
  • amount_in Monetary
    compute='_compute_amounts' store=True string='In Amount'
  • amount_loss Monetary
    compute='_compute_amounts' store=True string='Capital Loss'
  • amount_out Monetary
    compute='_compute_amounts' store=True string='Out Amount'
  • amount_residual Monetary
    compute='_compute_amounts' store=True string='Residual Amount'
  • category_id Many2one → asset.category
    readonly=True related='l10n_it_asset_id.category_id' store=True string='Category' args: 'asset.category'
  • company_id Many2one → res.company
    readonly=True related='l10n_it_asset_id.company_id' string='Company' args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='l10n_it_asset_id.currency_id' string='Currency' args: 'res.currency'
  • date_start Date
  • depreciation_account_id Many2one → account.account
    comodel_name='account.account' compute='_compute_depreciation_account_id' readonly=False store=True string='Depreciation Account'
  • dismiss_move_id Many2one → account.move
    string='Dismiss Move' args: 'account.move'
  • first_dep_nr Integer
    default=1 string='First Dep. Num'
  • force_all_dep_nr Boolean
    string='Force All Dep. Num'
  • force_first_dep_nr Boolean
    string='Force First Dep. Num'
  • gain_account_id Many2one → account.account
    comodel_name='account.account' compute='_compute_gain_account_id' readonly=False store=True string='Capital Gain Account'
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='cascade' readonly=True required=True string='Asset' args: 'asset.asset'
  • last_depreciation_date Date
    compute='_compute_last_depreciation_date' store=True string='Last Dep.'
  • line_ids One2many → asset.depreciation.line
    string='Lines' args: 'asset.depreciation.line', 'depreciation_id'
  • loss_account_id Many2one → account.account
    comodel_name='account.account' compute='_compute_loss_account_id' readonly=False store=True string='Capital Loss Account'
  • mode_id Many2one → asset.depreciation.mode
    required=True string='Mode' args: 'asset.depreciation.mode'
  • percentage Float
    string='Depreciation (%)'
  • pro_rata_temporis Boolean
    string='Pro-rata Temporis'
  • requires_account_move Boolean
    readonly=True related='type_id.requires_account_move' string='Requires Account Move'
  • state Selection
    compute='_compute_state' default='non_depreciated' store=True args: [('non_depreciated', 'Non Depreciated'), ('partially_depreciated', 'Partially Depreciated'), ('totally_depreciated', 'Depreciated')]
  • type_id Many2one → asset.depreciation.type
    string='Depreciation Type' args: 'asset.depreciation.type'
  • zero_depreciation_until Date
    string='Zero Depreciation Up To'
Public methods (26)
  • check_before_generate_depreciation_lines(self, dep_date)
  • create(self, vals_list)
    @api.model_create_multi
  • generate_depreciation_lines(self, dep_date, period=None, period_count=None)
  • generate_depreciation_lines_single(self, dep_date, period=None, period_count=None)
  • generate_dismiss_account_move(self)
  • get_computed_amounts(self)
  • get_depreciable_amount(self, dep_date=None)
  • get_depreciation_amount(self, dep_date, period=None, period_count=None)
  • get_depreciation_amount_multiplier(self, dep_date, period=None, period_count=None)
  • get_depreciation_state(self)
  • get_dismiss_account_move_line_vals(self)
  • get_dismiss_account_move_vals(self)
  • get_pro_rata_temporis_dates(self, date)
    Gets useful dates for pro rata temporis computations, according to given date, by retrieving its fiscal year. :param date: given date for depreciation :return: date objects triplet (dt_start, dt, dt_end) - dt_start: fiscal year first day - dt: given date - dt_end: fiscal year last day
  • get_pro_rata_temporis_multiplier(self, date=None, mode='std')
    Computes and returns pro rata temporis multiplier according to given depreciation, date, fiscal year and mode :param date: given date as a fields.Date string :param mode: string, defines how to compute multiplier. Valid values: - 'std': start-to-date, computes multiplier using days from fiscal year's first day to given date; - 'dte': date-to-end, computes multiplier using days from given date to fiscal year's last day
  • make_name(self)
  • name_get(self)
  • need_normalize_first_dep_nr(self)
  • normalize_first_dep_nr(self, force=False)
    Normalize first numbered line according to `first_dep_nr` value :param force: if True, force normalization
  • onchange_depreciable_amount_computation(self)
    @api.onchange('l10n_it_asset_id', 'base_coeff', 'base_max_amount')
  • onchange_force_all_dep_nr(self)
    @api.onchange('force_all_dep_nr')
  • onchange_force_dep_nrs(self)
    @api.onchange('force_all_dep_nr', 'force_first_dep_nr')
  • onchange_force_first_dep_nr(self)
    @api.onchange('force_first_dep_nr')
  • onchange_normalize_first_dep_nr(self)
    @api.onchange('first_dep_nr')
  • post_generate_depreciation_lines(self, lines=None)
  • prepare_depreciation_line_vals(self, dep_date)
  • write(self, vals)

New fields (20)
  • amount Monetary
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Accounting Info' args: 'asset.accounting.info', 'dep_line_id'
  • balance Monetary
    compute='_compute_balance' store=True
  • base Float
  • company_id Many2one → res.company
    readonly=True related='depreciation_id.company_id' args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='depreciation_id.currency_id' args: 'res.currency'
  • date Date
    required=True
  • depreciation_id Many2one → asset.depreciation
    ondelete='cascade' readonly=True required=True string='Asset depreciation' args: 'asset.depreciation'
  • depreciation_line_type_id Many2one → asset.depreciation.line.type
    string='Depreciation Type' args: 'asset.depreciation.line.type'
  • depreciation_nr Integer
    string='Dep. Num'
  • depreciation_type_id Many2one → asset.depreciation.type
    readonly=True related='depreciation_id.type_id' store=True string='Asset depreciation type' args: 'asset.depreciation.type'
  • force_dep_nr Boolean
    readonly=True related='depreciation_id.force_all_dep_nr' string='Force Dep. Num'
  • l10n_it_asset_id Many2one → asset.asset
    readonly=True related='depreciation_id.l10n_it_asset_id' store=True string='Asset' args: 'asset.asset'
  • move_id Many2one → account.move
    string='Move' args: 'account.move'
  • move_type Selection
    required=True string='Type' args: [('depreciated', 'Depreciation'), ('historical', 'Historical'), ('in', 'In'), ('out', 'Out'), ('loss', 'Capital Loss'), ('gain', 'Capital Gain')]
  • name Char
    required=True
  • partial_dismissal Boolean
  • percentage Float
    string='%'
  • requires_account_move Boolean
    readonly=True related='depreciation_id.type_id.requires_account_move' string='Required Account Move'
  • requires_depreciation_nr Boolean
    compute='_compute_requires_depreciation_nr' search='_search_requires_depreciation_nr_lines' string='Requires Dep Num'
Public methods (34)
  • button_generate_account_move(self)
  • button_regenerate_account_move(self)
  • button_remove_account_move(self)
  • check_company(self)
  • check_depreciation_nr_coherence(self)
    @api.constrains('depreciation_nr')
  • create(self, vals_list)
    @api.model_create_multi
  • generate_account_move(self)
  • generate_account_move_single(self)
  • get_account_move_line_vals(self)
    Switcher between methods
  • get_account_move_line_vals_methods(self)
    Maps line `move_type` to its own method for generating move lines.
  • get_account_move_vals(self)
  • get_balances_grouped(self)
    Groups balances of line in `self` by line.move_type, adding all possible type to ensure values are computed always.
  • get_depreciated_account_move_line_vals(self)
  • get_depreciation_nr_dict(self)
    Returns dict {line: new number}
  • get_gain_account_move_line_vals(self)
  • get_historical_account_move_line_vals(self)
  • get_in_account_move_line_vals(self)
  • get_linked_aa_info_records(self)
  • get_loss_account_move_line_vals(self)
  • get_non_residual_move_types(self)
    Returns list of `move_type` vals that do not concur to asset.depreciation's `amount_residual` field compute
  • get_numbered_move_types(self)
    Returns list of `move_type` vals that require numeration
  • get_out_account_move_line_vals(self)
  • get_update_move_types(self)
    Returns list of `move_type` that concur to update asset.depreciation's `amount_depreciable_updated` field
  • is_depreciation_nr_required(self)
    Defines if a line requires to be numbered
  • make_name(self)
  • name_get(self)
  • need_normalize_depreciation_nr(self)
    Check if numbers need to be normalized
  • needs_account_move(self)
  • normalize_depreciation_nr(self, force=False)
    Normalize depreciation numbers to be consecutive for depreciation and historical lines within the same depreciation set; force to 0 every non-depreciation line. :param force: force normalization for every depreciations' lines
  • onchange_move_type(self)
    @api.onchange('move_type')
  • post_dismiss_asset(self)
  • post_partial_dismiss_asset(self)
  • unlink(self)
  • write(self, vals)

New fields (4)
  • code Char
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • name Char
    required=True
  • type Selection
    args: [('in', 'In'), ('out', 'Out')]
Public methods (3)
  • get_default_company_id(self)
    @api.model
  • make_name(self)
  • name_get(self)

New fields (5)
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • default Boolean
    string='Default Mode'
  • line_ids One2many → asset.depreciation.mode.line
    string='Lines' args: 'asset.depreciation.mode.line', 'mode_id'
  • name Char
    required=True
  • used_asset_coeff Float
    default=1.0 string='Used Asset Coeff.'
Public methods (4)
  • check_default_modes(self)
    @api.constrains('company_id', 'default')
  • copy(self, default=None)
  • get_default_company_id(self)
    @api.model
  • get_depreciation_amount_multiplier(self)

New fields (7)
  • application Selection
    default='coefficient' required=True string='Application by' args: [('coefficient', 'Coefficient'), ('percentage', 'Percentage')]
  • coefficient Float
  • company_id Many2one → res.company
    readonly=True related='mode_id.company_id' string='Company' args: 'res.company'
  • from_year_nr Integer
    help='Minimum number of fiscal years passed from asset purchase date to apply this line.' required=True string='From Year'
  • mode_id Many2one → asset.depreciation.mode
    ondelete='cascade' readonly=True required=True string='Mode' args: 'asset.depreciation.mode'
  • percentage Float
  • to_year_nr Integer
    help='Maximum number of fiscal years passed from asset purchase date to apply this line.' string='To Year'
Public methods (2)
  • get_depreciation_amount_multiplier(self)
  • onchange_application(self)
    @api.onchange('application')

New fields (4)
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • name Char
    required=True
  • print_by_default Boolean
    default=True help="Defines whether a category should be added by default when printing assets' reports."
  • requires_account_move Boolean
Public methods (1)
  • get_default_company_id(self)
    @api.model

New fields (2)
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • name Char
    required=True
Public methods (1)
  • get_default_company_id(self)
    @api.model

New fields (2)
  • base_coeff Float
    default=1 help='Coeff to compute depreciable amount from purchase amount' string='Dep Base Coeff'
  • base_max_amount Float
    string='Maximum depreciable amount'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (23)
  • generate_asset_accounting_doc_data(self, report_data)
  • generate_asset_data(self, report_data)
  • generate_category_data(self, report_data)
  • generate_depreciation_data(self, report_data)
  • generate_depreciation_line_accounting_doc_data(self, report_data)
  • generate_depreciation_line_amount_detail_data(self, report_data)
  • generate_depreciation_line_year_data(self, report_data)
  • generate_xlsx_report(self, workbook, data, objects)
    Set wb, data and report attributes
  • get_max_width_dict(self, report_data)
  • get_totals_data(self, report_data)
  • set_asset_accounting_doc_data(self, report_data)
  • set_asset_data(self, report_data)
  • set_category_data(self, report_data)
  • set_depreciation_data(self, report_data)
  • set_depreciation_line_accounting_doc_data(self, report_data)
  • set_depreciation_line_amount_detail_data(self, report_data)
  • set_depreciation_line_year_data(self, report_data)
  • set_formats(self, workbook, report_data)
    Defines custom formats
  • set_report_data(self, report_data)
  • set_totals_data(self, report_data)
  • write_all(self, report_data, obj, index)
  • write_header(self, report_data, index)
  • write_value(self, report_data, obj, index)

New fields (0)

No new fields.

Public methods (21)
  • generate_asset_accounting_doc_data(self, report_data)
  • generate_asset_data(self, report_data)
  • generate_category_data(self, report_data)
  • generate_depreciation_data(self, report_data)
  • generate_depreciation_line_amount_detail_data(self, report_data)
  • generate_depreciation_line_year_data(self, report_data)
  • generate_xlsx_report(self, workbook, data, objects)
    Set wb, data and report attributes
  • get_max_width_dict(self, report_data)
  • get_totals_data(self, report_data)
  • set_asset_accounting_doc_data(self, report_data)
  • set_asset_data(self, report_data)
  • set_category_data(self, report_data)
  • set_depreciation_data(self, report_data)
  • set_depreciation_line_amount_detail_data(self, report_data)
  • set_depreciation_line_year_data(self, report_data)
  • set_formats(self, workbook, report_data)
    Defines custom formats
  • set_report_data(self, report_data)
  • set_totals_data(self, report_data)
  • write_all(self, report_data, obj, index)
  • write_header(self, report_data, index)
  • write_value(self, report_data, obj, index)

New fields (17)
  • asset_order_fname Char
  • category_ids Many2many → asset.category
    args: 'asset.category'
  • company_id Many2one → res.company
    args: 'res.company'
  • date Date
  • l10n_it_asset_ids Many2many → asset.asset
    args: 'asset.asset'
  • report_category_ids One2many → report_asset_journal_category
    args: 'report_asset_journal_category', 'report_id'
  • report_depreciation_ids One2many → report_asset_journal_depreciation
    args: 'report_asset_journal_depreciation', 'report_id'
  • report_depreciation_line_year_ids One2many → report_asset_journal_depreciation_line_year
    args: 'report_asset_journal_depreciation_line_year', 'report_id'
  • report_footer_year Char
  • report_l10n_it_asset_ids One2many → report_asset_journal_asset
    args: 'report_asset_journal_asset', 'report_id'
  • report_name Char
  • report_total_ids One2many → report_asset_journal_totals
    args: 'report_asset_journal_totals', 'report_id'
  • show_category_totals Boolean
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
  • show_totals Boolean
  • type_ids Many2many → asset.depreciation.type
    args: 'asset.depreciation.type'
Public methods (10)
  • compute_data_for_report(self)
    Compute data to be printed
  • do_print(self, report_type)
  • generate_data(self)
  • generate_structure(self)
  • generate_totals(self)
  • get_depreciations(self)
  • get_html(self, given_context=None)
    @api.model
    Method needed from JavaScript widget to render HTML view
  • print_report(self, report_type=None)
    This method is called from the JS widget buttons 'Print' and 'Export' in the HTML view. Prints PDF and XLSX reports. :param report_type: string that represents the report type
  • set_report_name(self)
  • sort_assets(self, assets)

New fields (9)
  • document_date Char
  • document_nr Char
  • partner_name Char
  • partner_ref Char
  • partner_vat Char
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • res_id Integer
  • res_model Char
  • sequence Integer
Public methods (0)

No public methods.

New fields (11)
  • asset_code Char
  • asset_name Char
  • asset_purchase_amount Float
  • asset_state Char
  • asset_used Char
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='cascade' required=True args: 'asset.asset'
  • report_category_id Many2one → report_asset_journal_category
    args: 'report_asset_journal_category'
  • report_depreciation_ids One2many → report_asset_journal_depreciation
    args: 'report_asset_journal_depreciation', 'report_asset_id'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • report_purchase_doc_id Many2one → report_asset_journal_accounting_doc
    args: 'report_asset_journal_accounting_doc'
  • report_sale_doc_id Many2one → report_asset_journal_accounting_doc
    args: 'report_asset_journal_accounting_doc'
Public methods (6)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_purchase_vals(self)
  • get_report_asset_data(self)
  • get_sale_vals(self)

New fields (5)
  • category_id Many2one → asset.category
    ondelete='cascade' required=True args: 'asset.category'
  • category_name Char
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • report_l10n_it_asset_ids One2many → report_asset_journal_asset
    args: 'report_asset_journal_asset', 'report_category_id'
  • report_total_ids One2many → report_asset_journal_totals
    args: 'report_asset_journal_totals', 'report_category_id'
Public methods (3)
  • generate_data(self)
  • generate_totals(self)
  • get_report_categ_data(self)

New fields (10)
  • dep_amount_depreciable Float
  • dep_date_start Char
  • dep_percentage Float
  • dep_pro_rata_temporis Char
  • depreciation_id Many2one → asset.depreciation
    ondelete='cascade' required=True args: 'asset.depreciation'
  • mode_name Char
  • report_asset_id Many2one → report_asset_journal_asset
    args: 'report_asset_journal_asset'
  • report_depreciation_year_line_ids One2many → report_asset_journal_depreciation_line_year
    args: 'report_asset_journal_depreciation_line_year', 'report_depreciation_id'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • type_name Char
Public methods (4)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_report_dep_data(self)

New fields (30)
  • amount_depreciable Float
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_gain_total Float
  • amount_historical Float
  • amount_in Float
  • amount_in_detail Char
  • amount_in_total Float
  • amount_loss Float
  • amount_loss_total Float
  • amount_out Float
  • amount_out_detail Char
  • amount_out_total Float
  • amount_residual Float
  • date_start Char
  • dep_line_ids Many2many → asset.depreciation.line
    relation='report_journal_line_year_dep_line' args: 'asset.depreciation.line'
  • fiscal_year_id Many2one → account.fiscal.year
    args: 'account.fiscal.year'
  • gain_loss Float
  • gain_loss_total Float
  • has_amount_detail Boolean
  • percentage Float
  • report_accounting_doc_ids Many2many → report_asset_journal_accounting_doc
    relation='year_dep_line_accounting_doc_rel' args: 'report_asset_journal_accounting_doc'
  • report_depreciation_id Many2one → report_asset_journal_depreciation
    args: 'report_asset_journal_depreciation'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • sequence Integer
  • type_name Char
  • year Char
Public methods (4)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_report_dep_line_year_data(self)

New fields (16)
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_in_total Float
  • amount_loss Float
  • amount_out_total Float
  • amount_residual Float
  • gain_loss Float
  • gain_loss_total Float
  • name Char
  • report_category_id Many2one → report_asset_journal_category
    args: 'report_asset_journal_category'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • type_id Many2one → asset.depreciation.type
    args: 'asset.depreciation.type'
  • type_name Char
Public methods (2)
  • format_amount(self, amount, currency=None)
  • get_currency(self)

New fields (18)
  • asset_order_fname Char
  • category_ids Many2many → asset.category
    args: 'asset.category'
  • company_id Many2one → res.company
    args: 'res.company'
  • date Date
  • l10n_it_asset_ids Many2many → asset.asset
    args: 'asset.asset'
  • previsional_line_ids Many2many → asset.depreciation.line
    args: 'asset.depreciation.line'
  • report_category_ids One2many → report_asset_previsional_category
    args: 'report_asset_previsional_category', 'report_id'
  • report_depreciation_ids One2many → report_asset_previsional_depreciation
    args: 'report_asset_previsional_depreciation', 'report_id'
  • report_depreciation_line_year_ids One2many → report_asset_previsional_depreciation_line_year
    args: 'report_asset_previsional_depreciation_line_year', 'report_id'
  • report_footer_year Char
  • report_l10n_it_asset_ids One2many → report_asset_previsional_asset
    args: 'report_asset_previsional_asset', 'report_id'
  • report_name Char
  • report_total_ids One2many → report_asset_previsional_totals
    args: 'report_asset_previsional_totals', 'report_id'
  • show_category_totals Boolean
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
  • show_totals Boolean
  • type_ids Many2many → asset.depreciation.type
    args: 'asset.depreciation.type'
Public methods (10)
  • compute_data_for_report(self)
    Compute data to be printed
  • do_print(self, report_type)
  • generate_data(self)
  • generate_structure(self)
  • generate_totals(self)
  • get_assets(self)
  • get_html(self, given_context=None)
    @api.model
    Method needed from JavaScript widget to render HTML view
  • print_report(self, report_type=None)
    This method is called from the JS widget buttons 'Print' and 'Export' in the HTML view. Prints PDF and XLSX reports. :param report_type: string that represents the report type
  • set_report_name(self)
  • sort_assets(self, assets)

New fields (9)
  • document_date Char
  • document_nr Char
  • partner_name Char
  • partner_ref Char
  • partner_vat Char
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • res_id Integer
  • res_model Char
  • sequence Integer
Public methods (0)

No public methods.

New fields (11)
  • asset_code Char
  • asset_name Char
  • asset_purchase_amount Float
  • asset_state Char
  • asset_used Char
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='cascade' required=True args: 'asset.asset'
  • report_category_id Many2one → report_asset_previsional_category
    args: 'report_asset_previsional_category'
  • report_depreciation_ids One2many → report_asset_previsional_depreciation
    args: 'report_asset_previsional_depreciation', 'report_asset_id'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • report_purchase_doc_id Many2one → report_asset_previsional_accounting_doc
    args: 'report_asset_previsional_accounting_doc'
  • report_sale_doc_id Many2one → report_asset_previsional_accounting_doc
    args: 'report_asset_previsional_accounting_doc'
Public methods (6)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_purchase_vals(self)
  • get_report_asset_data(self)
  • get_sale_vals(self)

New fields (5)
  • category_id Many2one → asset.category
    ondelete='cascade' required=True args: 'asset.category'
  • category_name Char
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • report_l10n_it_asset_ids One2many → report_asset_previsional_asset
    args: 'report_asset_previsional_asset', 'report_category_id'
  • report_total_ids One2many → report_asset_previsional_totals
    args: 'report_asset_previsional_totals', 'report_category_id'
Public methods (3)
  • generate_data(self)
  • generate_totals(self)
  • get_report_categ_data(self)

New fields (10)
  • dep_amount_depreciable Float
  • dep_date_start Char
  • dep_percentage Float
  • dep_pro_rata_temporis Char
  • depreciation_id Many2one → asset.depreciation
    ondelete='cascade' required=True args: 'asset.depreciation'
  • mode_name Char
  • report_asset_id Many2one → report_asset_previsional_asset
    args: 'report_asset_previsional_asset'
  • report_depreciation_year_line_ids One2many → report_asset_previsional_depreciation_line_year
    args: 'report_asset_previsional_depreciation_line_year', 'report_depreciation_id'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • type_name Char
Public methods (4)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_report_dep_data(self)

New fields (31)
  • amount_depreciable Float
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_gain_total Float
  • amount_historical Float
  • amount_in Float
  • amount_in_detail Char
  • amount_in_total Float
  • amount_loss Float
  • amount_loss_total Float
  • amount_out Float
  • amount_out_detail Char
  • amount_out_total Float
  • amount_residual Float
  • date_start Char
  • dep_line_ids Many2many → asset.depreciation.line
    relation='report_previsional_line_year_dep_line' args: 'asset.depreciation.line'
  • fiscal_year_id Many2one → account.fiscal.year
    args: 'account.fiscal.year'
  • gain_loss Float
  • gain_loss_total Float
  • has_amount_detail Boolean
  • hidden Boolean
  • needs_previsional Boolean
  • percentage Float
  • report_depreciation_id Many2one → report_asset_previsional_depreciation
    args: 'report_asset_previsional_depreciation'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • sequence Integer
  • type_name Char
  • year Char
Public methods (8)
  • clean_unused(self)
  • do_clean(self)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • generate_previsional_line_single(self)
  • generate_previsional_lines(self)
  • get_currency(self)
  • get_report_dep_line_year_data(self)

New fields (16)
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_in_total Float
  • amount_loss Float
  • amount_out_total Float
  • amount_residual Float
  • gain_loss Float
  • gain_loss_total Float
  • name Char
  • report_category_id Many2one → report_asset_previsional_category
    args: 'report_asset_previsional_category'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • type_id Many2one → asset.depreciation.type
    args: 'asset.depreciation.type'
  • type_name Char
Public methods (2)
  • format_amount(self, amount, currency=None)
  • get_currency(self)

New fields (18)
  • asset_purchase_amount Monetary
    string='Purchase Amount'
  • category_id Many2one → asset.category
    string='Category' args: 'asset.category'
  • code Char
    default=''
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='company_id.currency_id' string='Currency' args: 'res.currency'
  • depreciated_fund_amount Monetary
  • depreciation_type_ids Many2many → asset.depreciation.type
    string='Depreciation Types' args: 'asset.depreciation.type'
  • dismiss_asset_without_sale Boolean
  • dismiss_date Date
    default=fields.Date.today()
  • is_move_state_ok Boolean
    string='Move State'
  • l10n_it_asset_id Many2one → asset.asset
    string='Asset' args: 'asset.asset'
  • management_type Selection
    args: [('create', 'Create New'), ('update', 'Update Existing'), ('partial_dismiss', 'Partial Dismiss'), ('dismiss', 'Dismiss Asset')]
  • move_ids Many2many → account.move
    default=get_default_move_ids string='Moves' args: 'account.move'
  • move_line_ids Many2many → account.move.line
    string='Move Lines' args: 'account.move.line'
  • move_type Selection
    args: [('sale', 'Sale'), ('purchase', 'Purchase'), ('general', 'Miscellaneous'), ('out_invoice', 'Customer Invoice'), ('in_invoice', 'Vendor Bill'), ('out_refund', 'Customer Credit Note'), ('in_refund', 'Vendor Credit Note'), ('wrong', 'Wrong')]
  • name Char
  • purchase_date Date
    default=fields.Date.today()
  • used Boolean
Public methods (20)
  • check_pre_create_asset(self)
  • check_pre_dismiss_asset(self)
  • check_pre_link_asset(self)
  • check_pre_update_asset(self)
  • create_asset(self)
    Creates asset and returns it
  • dismiss_asset(self)
    Dismisses asset and returns it
  • get_create_asset_vals(self)
  • get_default_company_id(self)
    @api.model
  • get_default_move_ids(self)
    @api.model
  • get_dismiss_asset_vals(self)
  • get_management_type_2_method(self)
  • get_move_journal_type_2_dep_line_type(self)
  • get_partial_dismiss_asset_vals(self)
  • get_update_asset_vals(self)
  • link_asset(self)
  • onchange_category_id(self)
    @api.onchange('category_id')
  • onchange_depreciation_type_ids(self)
    @api.onchange('l10n_it_asset_id', 'management_type')
  • onchange_moves(self)
    @api.onchange('move_ids')
  • partial_dismiss_asset(self)
    Dismisses asset partially and returns it
  • update_asset(self)
    Updates asset and returns it

New fields (9)
  • category_ids Many2many → asset.category
    string='Categories' args: 'asset.category'
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • date_dep Date
    default=get_default_date_dep required=True string='Depreciation Date'
  • journal_id Many2one → account.journal
    comodel_name='account.journal' help="Create move entries in this journal instead of the category's journal." string='Override journal'
  • l10n_it_asset_ids Many2many → asset.asset
    string='Assets' args: 'asset.asset'
  • missing_fiscal_year_warning Text
    compute='_compute_missing_fiscal_year_warning' help='Message to warn the user that some fiscal years are missing.'
  • period Selection
    default='year' required=True selection=[('year', 'Year'), ('month', 'Month')]
  • period_count Integer
    default=1 string='Number of periods'
  • type_ids Many2many → asset.depreciation.type
    default=get_default_type_ids required=True string='Depreciation Types' args: 'asset.depreciation.type'
Public methods (6)
  • do_generate(self)
    Launches the generation of new depreciation lines for the retrieved assets. Reloads the current window if necessary.
  • get_default_company_id(self)
    @api.model
  • get_default_date_dep(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • get_depreciations(self)
  • get_depreciations_domain(self)

New fields (11)
  • asset_order_fname Selection
    default=get_default_asset_order_fname required=True string='Asset Print Order' args: get_asset_order_fname_selection
  • category_ids Many2many → asset.category
    default=get_default_category_ids string='Categories' args: 'asset.category'
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' args: 'res.company'
  • date Date
    default=get_default_date string='To Date'
  • l10n_it_asset_ids Many2many → asset.asset
    string='Assets' args: 'asset.asset'
  • report_footer_year Char
    default=get_default_report_footer_year
  • show_category_totals Boolean
    default=True
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
    help='By default, only unsold or assets sold in the selected year are printed.\nBy selecting this flag, the report will show all assets, ignoring the sold check.'
  • show_totals Boolean
    default=True
  • type_ids Many2many → asset.depreciation.type
    default=get_default_type_ids string='Depreciation Types' args: 'asset.depreciation.type'
Public methods (15)
  • button_export_asset_journal_html(self)
  • button_export_asset_journal_pdf(self)
  • button_export_asset_journal_xlsx(self)
  • export_asset_journal_report(self, report_type=None)
  • filter_assets(self)
  • get_asset_domain(self)
  • get_asset_order_fname_selection(self)
    @api.model
  • get_default_asset_order_fname(self)
    @api.model
  • get_default_category_ids(self)
    @api.model
  • get_default_company_id(self)
    @api.model
  • get_default_date(self)
    @api.model
  • get_default_report_footer_year(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • onchange_assets(self)
    @api.onchange('category_ids', 'company_id', 'date', 'type_ids')
  • prepare_report_vals(self)

New fields (11)
  • asset_order_fname Selection
    default=get_default_asset_order_fname required=True string='Asset Print Order' args: get_asset_order_fname_selection
  • category_ids Many2many → asset.category
    default=get_default_category_ids string='Categories' args: 'asset.category'
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' args: 'res.company'
  • date Date
    default=get_default_date string='To Date'
  • l10n_it_asset_ids Many2many → asset.asset
    string='Assets' args: 'asset.asset'
  • report_footer_year Char
    default=get_default_report_footer_year
  • show_category_totals Boolean
    default=True
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
    help='By default, only unsold or assets sold in the selected year are printed.\nBy selecting this flag, the report will show all assets, ignoring the sold check.'
  • show_totals Boolean
    default=True
  • type_ids Many2many → asset.depreciation.type
    default=get_default_type_ids string='Depreciation Types' args: 'asset.depreciation.type'
Public methods (15)
  • button_export_asset_previsional_html(self)
  • button_export_asset_previsional_pdf(self)
  • button_export_asset_previsional_xlsx(self)
  • export_asset_previsional_report(self, report_type=None)
  • filter_assets(self)
  • get_asset_domain(self)
  • get_asset_order_fname_selection(self)
    @api.model
  • get_default_asset_order_fname(self)
    @api.model
  • get_default_category_ids(self)
    @api.model
  • get_default_company_id(self)
    @api.model
  • get_default_date(self)
    @api.model
  • get_default_report_footer_year(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • onchange_assets(self)
    @api.onchange('category_ids', 'company_id', 'date', 'type_ids')
  • prepare_report_vals(self)
REPOSITORY
REPOSITORYOCA/l10n-italy
GIT
GIThttps://github.com/OCA/l10n-italy.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-italy/tree/16.0/l10n_it_asset_management
VERSION
VERSION 1.7.0
CATEGORY
CATEGORYLocalization/Italy
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, Simone Rubino, micheledic, oca-ci, LorenzoC0
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-italy
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:11:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_financial_report
OCA/account-financial-tools:
    - account_fiscal_year
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 openupgradelib
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This modules allows account management of companies' assets.

Code Analysis

Views touched (72)
XML IDNameModelTypeStatus
asset_accounting_info_form_view asset.accounting.info.form.view asset.accounting.info form New
asset_accounting_info_search_view asset.accounting.info.search.view asset.accounting.info search New
asset_accounting_info_tree_view asset.accounting.info.tree.view asset.accounting.info tree New
asset_category_form_view asset.category.form.view asset.category form New
asset_category_tree_view asset.category.asset.tree asset.category tree New
asset_dep_line_form_view asset.dep.line.form.view asset.depreciation.line form New
asset_dep_line_search_view asset.depreciation.line.view asset.depreciation.line search New
asset_dep_line_tree_view asset.dep.line.tree.view asset.depreciation.line tree New
asset_depreciation_line_type_form_view asset.dep.line.type.form.view asset.depreciation.line.type form New
asset_depreciation_line_type_tree_view asset.dep.line.type.tree.view asset.depreciation.line.type tree New
asset_depreciation_mode_form_view asset.depreciation.mode.form.view asset.depreciation.mode form New
asset_depreciation_mode_tree_view asset.depreciation.mode.tree.view asset.depreciation.mode tree New
asset_depreciation_type_form_view asset.depreciation.type.form.view asset.depreciation.type form New
asset_depreciation_type_tree_view asset.depreciation.type.tree.view asset.depreciation.type tree New
asset_form_view asset.form.view asset.asset form New
asset_search_view asset.search.view asset.asset search New
asset_tag_form_view asset.tag.form.view asset.tag form New
asset_tag_tree_view asset.tag.tree.view asset.tag tree New
asset_tree_view asset.tree.view asset.asset tree New
document_layout document_layout ir.ui.view qweb New
template_asset_journal_asset template_asset_journal_asset ir.ui.view qweb New
template_asset_journal_asset_accounting_table_data template_asset_journal_asset_accounting_table_data ir.ui.view qweb New
template_asset_journal_asset_accounting_table_header template_asset_journal_asset_accounting_table_header ir.ui.view qweb New
template_asset_journal_asset_depreciation_table_data template_asset_journal_asset_depreciation_table_data ir.ui.view qweb New
template_asset_journal_asset_depreciation_table_header template_asset_journal_asset_depreciation_table_header ir.ui.view qweb New
template_asset_journal_asset_depreciations template_asset_journal_asset_depreciations ir.ui.view qweb New
template_asset_journal_asset_table_data template_asset_journal_asset_table_data ir.ui.view qweb New
template_asset_journal_asset_table_header template_asset_journal_asset_table_header ir.ui.view qweb New
template_asset_journal_asset_title template_asset_journal_asset_title ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_accounting_data template_asset_journal_asset_year_depreciation_accounting_data ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_amount_details template_asset_journal_asset_year_depreciation_amount_details ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_table_data template_asset_journal_asset_year_depreciation_table_data ir.ui.view qweb New
template_asset_journal_asset_year_depreciation_table_header template_asset_journal_asset_year_depreciation_table_header ir.ui.view qweb New
template_asset_journal_base template_asset_journal_base ir.ui.view qweb New
template_asset_journal_body template_asset_journal_body ir.ui.view qweb New
template_asset_journal_category_data template_asset_journal_category_data ir.ui.view qweb New
template_asset_journal_category_totals template_asset_journal_category_totals ir.ui.view qweb New
template_asset_journal_qweb template_asset_journal_qweb ir.ui.view qweb New
template_asset_journal_report template_asset_journal_report ir.ui.view qweb New
template_asset_journal_title template_asset_journal_title ir.ui.view qweb New
template_asset_journal_totals template_asset_journal_totals ir.ui.view qweb New
template_asset_journal_totals_data template_asset_journal_totals_data ir.ui.view qweb New
template_asset_journal_totals_header template_asset_journal_totals_header ir.ui.view qweb New
template_asset_previsional_asset template_asset_previsional_asset ir.ui.view qweb New
template_asset_previsional_asset_accounting_table_data template_asset_previsional_asset_accounting_table_data ir.ui.view qweb New
template_asset_previsional_asset_accounting_table_header template_asset_previsional_asset_accounting_table_header ir.ui.view qweb New
template_asset_previsional_asset_depreciation_table_data template_asset_previsional_asset_depreciation_table_data ir.ui.view qweb New
template_asset_previsional_asset_depreciation_table_header template_asset_previsional_asset_depreciation_table_header ir.ui.view qweb New
template_asset_previsional_asset_depreciations template_asset_previsional_asset_depreciations ir.ui.view qweb New
template_asset_previsional_asset_table_data template_asset_previsional_asset_table_data ir.ui.view qweb New
template_asset_previsional_asset_table_header template_asset_previsional_asset_table_header ir.ui.view qweb New
template_asset_previsional_asset_title template_asset_previsional_asset_title ir.ui.view qweb New
template_asset_previsional_asset_year_depreciation_table_data template_asset_previsional_asset_year_depreciation_table_data ir.ui.view qweb New
template_asset_previsional_asset_year_depreciation_table_header template_asset_previsional_asset_year_depreciation_table_header ir.ui.view qweb New
template_asset_previsional_base template_asset_previsional_base ir.ui.view qweb New
template_asset_previsional_body template_asset_previsional_body ir.ui.view qweb New
template_asset_previsional_category_data template_asset_previsional_category_data ir.ui.view qweb New
template_asset_previsional_category_totals template_asset_previsional_category_totals ir.ui.view qweb New
template_asset_previsional_qweb template_asset_previsional_qweb ir.ui.view qweb New
template_asset_previsional_report template_asset_previsional_report ir.ui.view qweb New
template_asset_previsional_title template_asset_previsional_title ir.ui.view qweb New
template_asset_previsional_totals template_asset_previsional_totals ir.ui.view qweb New
template_asset_previsional_totals_data template_asset_previsional_totals_data ir.ui.view qweb New
template_asset_previsional_totals_header template_asset_previsional_totals_header ir.ui.view qweb New
view_asset_depreciation_form asset.depreciation.form.view asset.depreciation form New
view_asset_depreciation_tree view.asset.depreciation.tree asset.depreciation tree New
view_move_form_inherit view.move.form.inherit account.move xpath Inherits account.view_move_form
view_move_line_form_inherit view.move.line.form.inherit account.move.line xpath Inherits account.view_move_line_form
wizard_account_move_mange_asset_form_view wizard.account.move.manage.asset.form.view wizard.account.move.manage.asset form New
wizard_asset_generate_depreciation_form_view wizard.asset.generate.depreciation.form.view wizard.asset.generate.depreciation form New
wizard_asset_journal_report_form_view wizard.asset.journal.report.form.view wizard.asset.journal.report form New
wizard_asset_previsional_report_form_view wizard.asset.previsional.report.form.view wizard.asset.previsional.report form New
Models touched (37)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • get_fiscal_year_by_date(self, date, limit=1, company=None, miss_raise=True)
    @api.model
    Retrieves fiscal year by given ``date`` (a datetime.date object). By default, only 1 fiscal year will be returned, unless specified differently. If ``miss_raise`` is True and no fiscal year is found, an error will be raised.
  • get_fiscal_year_by_date_domain(self, date, company=None)
    @api.model
    Prepares a search() domain to retrieve fiscal years by given ``date``.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Assets Accounting Info' args: 'asset.accounting.info', 'move_id'
  • dep_line_ids Many2many → asset.depreciation.line
    compute='_compute_asset_data' store=True string='Depreciation Lines' args: 'asset.depreciation.line'
  • hide_link_asset_button Boolean
    compute='_compute_hide_link_asset_button' compute_sudo=True default=True string='Hide Asset Button'
  • l10n_it_asset_ids Many2many → asset.asset
    compute='_compute_asset_data' store=True string='Assets' args: 'asset.asset'
Public methods (5)
  • button_cancel(self)
  • check_company(self)
    @api.constrains('company_id')
  • get_linked_aa_info_records(self)
  • get_valid_accounts(self)
  • open_wizard_manage_asset(self)

New fields (3)
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Assets Accounting Info' args: 'asset.accounting.info', 'move_line_id'
  • dep_line_ids Many2many → asset.depreciation.line
    compute='_compute_asset_data' store=True string='Depreciation Lines' args: 'asset.depreciation.line'
  • l10n_it_asset_ids Many2many → asset.asset
    compute='_compute_asset_data' store=True string='Assets' args: 'asset.asset'
Public methods (3)
  • check_company(self)
    @api.constrains('company_id')
  • get_asset_purchase_amount(self, currency=None)
  • get_linked_aa_info_records(self)

New fields (7)
  • company_id Many2one → res.company
    readonly=True string='Company' args: 'res.company'
  • dep_line_id Many2one → asset.depreciation.line
    ondelete='set null' string='Depreciation Line' args: 'asset.depreciation.line'
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='set null' string='Asset' args: 'asset.asset'
  • move_id Many2one → account.move
    related='move_line_id.move_id' string='Move' args: 'account.move'
  • move_line_id Many2one → account.move.line
    ondelete='cascade' string='Move Line' args: 'account.move.line'
  • move_type Selection
    related='dep_line_id.move_type'
  • relation_type Selection
    required=True args: [('create', 'Asset Creation'), ('update', 'Asset Update'), ('partial_dismiss', 'Asset Partial Dismissal'), ('dismiss', 'Asset Dismissal')]
Public methods (15)
  • button_unlink(self)
    Button action: deletes a.a.info
  • check_and_normalize(self)
  • check_coherence(self)
    Checks info coherence
  • check_company_coherence(self)
    Checks companies
  • check_data_coherence(self)
  • create(self, vals_list)
    @api.model_create_multi
  • cron_vacuum_table(self)
    @api.model
    A cron that deletes obsolete records
  • get_all_companies(self)
  • get_main_fields(self)
    @api.model
  • get_normalized_info_vals(self)
  • get_records_to_delete_by_cron(self)
    Returns every a.a.info that fits the condition: (no asset AND no depreciation line) OR (no move AND no move line)
  • make_name(self)
  • name_get(self)
  • normalize_info(self)
    Normalize asset accounting info if needed
  • write(self, vals)

New fields (21)
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Accounting Info' args: 'asset.accounting.info', 'l10n_it_asset_id'
  • category_id Many2one → asset.category
    required=True string='Category' args: 'asset.category'
  • code Char
    default=''
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' tracking=True args: 'res.company'
  • currency_id Many2one → res.currency
    required=True string='Currency' args: 'res.currency'
  • customer_id Many2one → res.partner
    string='Customer' args: 'res.partner'
  • depreciation_ids One2many → asset.depreciation
    string='Depreciations' args: 'asset.depreciation', 'l10n_it_asset_id'
  • dismiss_date Date
  • dismissed Boolean
  • name Char
    required=True tracking=True
  • purchase_amount Monetary
    string='Purchase Value' tracking=True
  • purchase_date Date
    default=fields.Date.today() tracking=True
  • purchase_move_id Many2one → account.move
    string='Purchase Move' args: 'account.move'
  • sale_amount Monetary
    string='Sale Value'
  • sale_date Date
  • sale_move_id Many2one → account.move
    string='Sale Move' args: 'account.move'
  • sold Boolean
  • state Selection
    compute='_compute_state' default='non_depreciated' store=True args: [('non_depreciated', 'Non Depreciated'), ('partially_depreciated', 'Partially Depreciated'), ('totally_depreciated', 'Depreciated')]
  • supplier_id Many2one → res.partner
    string='Supplier' args: 'res.partner'
  • supplier_ref Char
    string='Supplier Ref.'
  • used Boolean
Public methods (14)
  • check_company(self)
    @api.constrains('company_id')
  • create(self, vals_list)
    @api.model_create_multi
  • get_asset_state(self)
  • get_default_company_id(self)
    @api.model
  • get_linked_aa_info_records(self)
  • launch_wizard_generate_depreciations(self)
  • make_name(self)
  • name_get(self)
  • onchange_category_id(self)
    @api.onchange('category_id')
  • onchange_company_currency(self)
    @api.onchange('company_id')
  • onchange_purchase_amount(self)
    @api.onchange('purchase_amount')
  • onchange_purchase_date(self)
    @api.onchange('purchase_date')
  • unlink(self)
  • write(self, vals)

New fields (12)
  • asset_account_id Many2one → account.account
    required=True string='Asset Account' args: 'account.account'
  • comment Text
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • depreciation_account_id Many2one → account.account
    required=True string='Depreciation Account' args: 'account.account'
  • fund_account_id Many2one → account.account
    required=True string='Fund Account' args: 'account.account'
  • gain_account_id Many2one → account.account
    required=True string='Capital Gain Account' args: 'account.account'
  • journal_id Many2one → account.journal
    required=True string='Journal' args: 'account.journal'
  • loss_account_id Many2one → account.account
    required=True string='Capital Loss Account' args: 'account.account'
  • name Char
    required=True
  • print_by_default Boolean
    default=True help="Defines whether a category should be added by default when printing assets' reports."
  • tag_ids Many2many → asset.tag
    string='Tag' args: 'asset.tag'
  • type_ids One2many → asset.category.depreciation.type
    default=get_default_type_ids string='Depreciation Types' args: 'asset.category.depreciation.type', 'category_id'
Public methods (4)
  • copy(self, default=None)
  • get_default_company_id(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • get_depreciation_vals(self, amount_depreciable=0)

New fields (6)
  • category_id Many2one → asset.category
    ondelete='cascade' readonly=True required=True string='Category' args: 'asset.category'
  • company_id Many2one → res.company
    readonly=True related='category_id.company_id' string='Company' args: 'res.company'
  • depreciation_type_id Many2one → asset.depreciation.type
    required=True string='Type' args: 'asset.depreciation.type'
  • mode_id Many2one → asset.depreciation.mode
    required=True string='Dep Mode' args: 'asset.depreciation.mode'
  • percentage Float
    string='Depreciation %'
  • pro_rata_temporis Boolean
    string='Pro-rata Temporis'
Public methods (1)
  • get_depreciation_vals(self, amount_depreciable=0)

New fields (29)
  • amount_depreciable Monetary
    string='Initial Depreciable Amount'
  • amount_depreciable_updated Monetary
    compute='_compute_amounts' store=True string='Updated Depreciable Amount'
  • amount_depreciated Monetary
    compute='_compute_amounts' store=True string='Depreciated Amount'
  • amount_gain Monetary
    compute='_compute_amounts' store=True string='Capital Gain'
  • amount_historical Monetary
    compute='_compute_amounts' store=True string='Historical Amount'
  • amount_in Monetary
    compute='_compute_amounts' store=True string='In Amount'
  • amount_loss Monetary
    compute='_compute_amounts' store=True string='Capital Loss'
  • amount_out Monetary
    compute='_compute_amounts' store=True string='Out Amount'
  • amount_residual Monetary
    compute='_compute_amounts' store=True string='Residual Amount'
  • company_id Many2one → res.company
    readonly=True related='l10n_it_asset_id.company_id' string='Company' args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='l10n_it_asset_id.currency_id' string='Currency' args: 'res.currency'
  • date_start Date
  • depreciation_account_id Many2one → account.account
    comodel_name='account.account' compute='_compute_depreciation_account_id' readonly=False store=True string='Depreciation Account'
  • dismiss_move_id Many2one → account.move
    string='Dismiss Move' args: 'account.move'
  • first_dep_nr Integer
    default=1 string='First Dep. Num'
  • force_all_dep_nr Boolean
    string='Force All Dep. Num'
  • force_first_dep_nr Boolean
    string='Force First Dep. Num'
  • gain_account_id Many2one → account.account
    comodel_name='account.account' compute='_compute_gain_account_id' readonly=False store=True string='Capital Gain Account'
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='cascade' readonly=True required=True string='Asset' args: 'asset.asset'
  • last_depreciation_date Date
    compute='_compute_last_depreciation_date' store=True string='Last Dep.'
  • line_ids One2many → asset.depreciation.line
    string='Lines' args: 'asset.depreciation.line', 'depreciation_id'
  • loss_account_id Many2one → account.account
    comodel_name='account.account' compute='_compute_loss_account_id' readonly=False store=True string='Capital Loss Account'
  • mode_id Many2one → asset.depreciation.mode
    required=True string='Mode' args: 'asset.depreciation.mode'
  • percentage Float
    string='Depreciation (%)'
  • pro_rata_temporis Boolean
    string='Pro-rata Temporis'
  • requires_account_move Boolean
    readonly=True related='type_id.requires_account_move' string='Requires Account Move'
  • state Selection
    compute='_compute_state' default='non_depreciated' store=True args: [('non_depreciated', 'Non Depreciated'), ('partially_depreciated', 'Partially Depreciated'), ('totally_depreciated', 'Depreciated')]
  • type_id Many2one → asset.depreciation.type
    string='Depreciation Type' args: 'asset.depreciation.type'
  • zero_depreciation_until Date
    string='Zero Depreciation Up To'
Public methods (26)
  • check_before_generate_depreciation_lines(self, dep_date)
  • create(self, vals_list)
    @api.model_create_multi
  • generate_depreciation_lines(self, dep_date, period=None, period_count=None)
  • generate_depreciation_lines_single(self, dep_date, period=None, period_count=None)
  • generate_dismiss_account_move(self)
  • get_computed_amounts(self)
  • get_depreciable_amount(self, dep_date=None)
  • get_depreciation_amount(self, dep_date, period=None, period_count=None)
  • get_depreciation_amount_multiplier(self, dep_date, period=None, period_count=None)
  • get_depreciation_state(self)
  • get_dismiss_account_move_line_vals(self)
  • get_dismiss_account_move_vals(self)
  • get_pro_rata_temporis_dates(self, date)
    Gets useful dates for pro rata temporis computations, according to given date, by retrieving its fiscal year. :param date: given date for depreciation :return: date objects triplet (dt_start, dt, dt_end) - dt_start: fiscal year first day - dt: given date - dt_end: fiscal year last day
  • get_pro_rata_temporis_multiplier(self, date=None, mode='std')
    Computes and returns pro rata temporis multiplier according to given depreciation, date, fiscal year and mode :param date: given date as a fields.Date string :param mode: string, defines how to compute multiplier. Valid values: - 'std': start-to-date, computes multiplier using days from fiscal year's first day to given date; - 'dte': date-to-end, computes multiplier using days from given date to fiscal year's last day
  • make_name(self)
  • name_get(self)
  • need_normalize_first_dep_nr(self)
  • normalize_first_dep_nr(self, force=False)
    Normalize first numbered line according to `first_dep_nr` value :param force: if True, force normalization
  • onchange_depreciable_amount_computation(self)
    @api.onchange('l10n_it_asset_id', 'base_coeff', 'base_max_amount')
  • onchange_force_all_dep_nr(self)
    @api.onchange('force_all_dep_nr')
  • onchange_force_dep_nrs(self)
    @api.onchange('force_all_dep_nr', 'force_first_dep_nr')
  • onchange_force_first_dep_nr(self)
    @api.onchange('force_first_dep_nr')
  • onchange_normalize_first_dep_nr(self)
    @api.onchange('first_dep_nr')
  • post_generate_depreciation_lines(self, lines=None)
  • prepare_depreciation_line_vals(self, dep_date)
  • write(self, vals)

New fields (20)
  • amount Monetary
  • asset_accounting_info_ids One2many → asset.accounting.info
    string='Accounting Info' args: 'asset.accounting.info', 'dep_line_id'
  • balance Monetary
    compute='_compute_balance' store=True
  • base Float
  • company_id Many2one → res.company
    readonly=True related='depreciation_id.company_id' args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='depreciation_id.currency_id' args: 'res.currency'
  • date Date
    required=True
  • depreciation_id Many2one → asset.depreciation
    ondelete='cascade' readonly=True required=True string='Asset depreciation' args: 'asset.depreciation'
  • depreciation_line_type_id Many2one → asset.depreciation.line.type
    string='Depreciation Type' args: 'asset.depreciation.line.type'
  • depreciation_nr Integer
    string='Dep. Num'
  • depreciation_type_id Many2one → asset.depreciation.type
    readonly=True related='depreciation_id.type_id' store=True string='Asset depreciation type' args: 'asset.depreciation.type'
  • force_dep_nr Boolean
    readonly=True related='depreciation_id.force_all_dep_nr' string='Force Dep. Num'
  • l10n_it_asset_id Many2one → asset.asset
    readonly=True related='depreciation_id.l10n_it_asset_id' store=True string='Asset' args: 'asset.asset'
  • move_id Many2one → account.move
    string='Move' args: 'account.move'
  • move_type Selection
    required=True string='Type' args: [('depreciated', 'Depreciation'), ('historical', 'Historical'), ('in', 'In'), ('out', 'Out'), ('loss', 'Capital Loss'), ('gain', 'Capital Gain')]
  • name Char
    required=True
  • partial_dismissal Boolean
  • percentage Float
    string='%'
  • requires_account_move Boolean
    readonly=True related='depreciation_id.type_id.requires_account_move' string='Required Account Move'
  • requires_depreciation_nr Boolean
    compute='_compute_requires_depreciation_nr' search='_search_requires_depreciation_nr_lines' string='Requires Dep Num'
Public methods (34)
  • button_generate_account_move(self)
  • button_regenerate_account_move(self)
  • button_remove_account_move(self)
  • check_company(self)
  • check_depreciation_nr_coherence(self)
    @api.constrains('depreciation_nr')
  • create(self, vals_list)
    @api.model_create_multi
  • generate_account_move(self)
  • generate_account_move_single(self)
  • get_account_move_line_vals(self)
    Switcher between methods
  • get_account_move_line_vals_methods(self)
    Maps line `move_type` to its own method for generating move lines.
  • get_account_move_vals(self)
  • get_balances_grouped(self)
    Groups balances of line in `self` by line.move_type, adding all possible type to ensure values are computed always.
  • get_depreciated_account_move_line_vals(self)
  • get_depreciation_nr_dict(self)
    Returns dict {line: new number}
  • get_gain_account_move_line_vals(self)
  • get_historical_account_move_line_vals(self)
  • get_in_account_move_line_vals(self)
  • get_linked_aa_info_records(self)
  • get_loss_account_move_line_vals(self)
  • get_non_residual_move_types(self)
    Returns list of `move_type` vals that do not concur to asset.depreciation's `amount_residual` field compute
  • get_numbered_move_types(self)
    Returns list of `move_type` vals that require numeration
  • get_out_account_move_line_vals(self)
  • get_update_move_types(self)
    Returns list of `move_type` that concur to update asset.depreciation's `amount_depreciable_updated` field
  • is_depreciation_nr_required(self)
    Defines if a line requires to be numbered
  • make_name(self)
  • name_get(self)
  • need_normalize_depreciation_nr(self)
    Check if numbers need to be normalized
  • needs_account_move(self)
  • normalize_depreciation_nr(self, force=False)
    Normalize depreciation numbers to be consecutive for depreciation and historical lines within the same depreciation set; force to 0 every non-depreciation line. :param force: force normalization for every depreciations' lines
  • onchange_move_type(self)
    @api.onchange('move_type')
  • post_dismiss_asset(self)
  • post_partial_dismiss_asset(self)
  • unlink(self)
  • write(self, vals)

New fields (4)
  • code Char
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • name Char
    required=True
  • type Selection
    args: [('in', 'In'), ('out', 'Out')]
Public methods (3)
  • get_default_company_id(self)
    @api.model
  • make_name(self)
  • name_get(self)

New fields (5)
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • default Boolean
    string='Default Mode'
  • line_ids One2many → asset.depreciation.mode.line
    string='Lines' args: 'asset.depreciation.mode.line', 'mode_id'
  • name Char
    required=True
  • used_asset_coeff Float
    default=1.0 string='Used Asset Coeff.'
Public methods (4)
  • check_default_modes(self)
    @api.constrains('company_id', 'default')
  • copy(self, default=None)
  • get_default_company_id(self)
    @api.model
  • get_depreciation_amount_multiplier(self)

New fields (7)
  • application Selection
    default='coefficient' required=True string='Application by' args: [('coefficient', 'Coefficient'), ('percentage', 'Percentage')]
  • coefficient Float
  • company_id Many2one → res.company
    readonly=True related='mode_id.company_id' string='Company' args: 'res.company'
  • from_year_nr Integer
    help='Minimum number of fiscal years passed from asset purchase date to apply this line.' required=True string='From Year'
  • mode_id Many2one → asset.depreciation.mode
    ondelete='cascade' readonly=True required=True string='Mode' args: 'asset.depreciation.mode'
  • percentage Float
  • to_year_nr Integer
    help='Maximum number of fiscal years passed from asset purchase date to apply this line.' string='To Year'
Public methods (2)
  • get_depreciation_amount_multiplier(self)
  • onchange_application(self)
    @api.onchange('application')

New fields (4)
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • name Char
    required=True
  • print_by_default Boolean
    default=True help="Defines whether a category should be added by default when printing assets' reports."
  • requires_account_move Boolean
Public methods (1)
  • get_default_company_id(self)
    @api.model

New fields (2)
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • name Char
    required=True
Public methods (1)
  • get_default_company_id(self)
    @api.model

New fields (2)
  • base_coeff Float
    default=1 help='Coeff to compute depreciable amount from purchase amount' string='Dep Base Coeff'
  • base_max_amount Float
    string='Maximum depreciable amount'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (23)
  • generate_asset_accounting_doc_data(self, report_data)
  • generate_asset_data(self, report_data)
  • generate_category_data(self, report_data)
  • generate_depreciation_data(self, report_data)
  • generate_depreciation_line_accounting_doc_data(self, report_data)
  • generate_depreciation_line_amount_detail_data(self, report_data)
  • generate_depreciation_line_year_data(self, report_data)
  • generate_xlsx_report(self, workbook, data, objects)
    Set wb, data and report attributes
  • get_max_width_dict(self, report_data)
  • get_totals_data(self, report_data)
  • set_asset_accounting_doc_data(self, report_data)
  • set_asset_data(self, report_data)
  • set_category_data(self, report_data)
  • set_depreciation_data(self, report_data)
  • set_depreciation_line_accounting_doc_data(self, report_data)
  • set_depreciation_line_amount_detail_data(self, report_data)
  • set_depreciation_line_year_data(self, report_data)
  • set_formats(self, workbook, report_data)
    Defines custom formats
  • set_report_data(self, report_data)
  • set_totals_data(self, report_data)
  • write_all(self, report_data, obj, index)
  • write_header(self, report_data, index)
  • write_value(self, report_data, obj, index)

New fields (0)

No new fields.

Public methods (21)
  • generate_asset_accounting_doc_data(self, report_data)
  • generate_asset_data(self, report_data)
  • generate_category_data(self, report_data)
  • generate_depreciation_data(self, report_data)
  • generate_depreciation_line_amount_detail_data(self, report_data)
  • generate_depreciation_line_year_data(self, report_data)
  • generate_xlsx_report(self, workbook, data, objects)
    Set wb, data and report attributes
  • get_max_width_dict(self, report_data)
  • get_totals_data(self, report_data)
  • set_asset_accounting_doc_data(self, report_data)
  • set_asset_data(self, report_data)
  • set_category_data(self, report_data)
  • set_depreciation_data(self, report_data)
  • set_depreciation_line_amount_detail_data(self, report_data)
  • set_depreciation_line_year_data(self, report_data)
  • set_formats(self, workbook, report_data)
    Defines custom formats
  • set_report_data(self, report_data)
  • set_totals_data(self, report_data)
  • write_all(self, report_data, obj, index)
  • write_header(self, report_data, index)
  • write_value(self, report_data, obj, index)

New fields (17)
  • asset_order_fname Char
  • category_ids Many2many → asset.category
    args: 'asset.category'
  • company_id Many2one → res.company
    args: 'res.company'
  • date Date
  • l10n_it_asset_ids Many2many → asset.asset
    args: 'asset.asset'
  • report_category_ids One2many → report_asset_journal_category
    args: 'report_asset_journal_category', 'report_id'
  • report_depreciation_ids One2many → report_asset_journal_depreciation
    args: 'report_asset_journal_depreciation', 'report_id'
  • report_depreciation_line_year_ids One2many → report_asset_journal_depreciation_line_year
    args: 'report_asset_journal_depreciation_line_year', 'report_id'
  • report_footer_year Char
  • report_l10n_it_asset_ids One2many → report_asset_journal_asset
    args: 'report_asset_journal_asset', 'report_id'
  • report_name Char
  • report_total_ids One2many → report_asset_journal_totals
    args: 'report_asset_journal_totals', 'report_id'
  • show_category_totals Boolean
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
  • show_totals Boolean
  • type_ids Many2many → asset.depreciation.type
    args: 'asset.depreciation.type'
Public methods (10)
  • compute_data_for_report(self)
    Compute data to be printed
  • do_print(self, report_type)
  • generate_data(self)
  • generate_structure(self)
  • generate_totals(self)
  • get_depreciations(self)
  • get_html(self, given_context=None)
    @api.model
    Method needed from JavaScript widget to render HTML view
  • print_report(self, report_type=None)
    This method is called from the JS widget buttons 'Print' and 'Export' in the HTML view. Prints PDF and XLSX reports. :param report_type: string that represents the report type
  • set_report_name(self)
  • sort_assets(self, assets)

New fields (9)
  • document_date Char
  • document_nr Char
  • partner_name Char
  • partner_ref Char
  • partner_vat Char
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • res_id Integer
  • res_model Char
  • sequence Integer
Public methods (0)

No public methods.

New fields (11)
  • asset_code Char
  • asset_name Char
  • asset_purchase_amount Float
  • asset_state Char
  • asset_used Char
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='cascade' required=True args: 'asset.asset'
  • report_category_id Many2one → report_asset_journal_category
    args: 'report_asset_journal_category'
  • report_depreciation_ids One2many → report_asset_journal_depreciation
    args: 'report_asset_journal_depreciation', 'report_asset_id'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • report_purchase_doc_id Many2one → report_asset_journal_accounting_doc
    args: 'report_asset_journal_accounting_doc'
  • report_sale_doc_id Many2one → report_asset_journal_accounting_doc
    args: 'report_asset_journal_accounting_doc'
Public methods (6)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_purchase_vals(self)
  • get_report_asset_data(self)
  • get_sale_vals(self)

New fields (5)
  • category_id Many2one → asset.category
    ondelete='cascade' required=True args: 'asset.category'
  • category_name Char
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • report_l10n_it_asset_ids One2many → report_asset_journal_asset
    args: 'report_asset_journal_asset', 'report_category_id'
  • report_total_ids One2many → report_asset_journal_totals
    args: 'report_asset_journal_totals', 'report_category_id'
Public methods (3)
  • generate_data(self)
  • generate_totals(self)
  • get_report_categ_data(self)

New fields (10)
  • dep_amount_depreciable Float
  • dep_date_start Char
  • dep_percentage Float
  • dep_pro_rata_temporis Char
  • depreciation_id Many2one → asset.depreciation
    ondelete='cascade' required=True args: 'asset.depreciation'
  • mode_name Char
  • report_asset_id Many2one → report_asset_journal_asset
    args: 'report_asset_journal_asset'
  • report_depreciation_year_line_ids One2many → report_asset_journal_depreciation_line_year
    args: 'report_asset_journal_depreciation_line_year', 'report_depreciation_id'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • type_name Char
Public methods (4)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_report_dep_data(self)

New fields (30)
  • amount_depreciable Float
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_gain_total Float
  • amount_historical Float
  • amount_in Float
  • amount_in_detail Char
  • amount_in_total Float
  • amount_loss Float
  • amount_loss_total Float
  • amount_out Float
  • amount_out_detail Char
  • amount_out_total Float
  • amount_residual Float
  • date_start Char
  • dep_line_ids Many2many → asset.depreciation.line
    relation='report_journal_line_year_dep_line' args: 'asset.depreciation.line'
  • fiscal_year_id Many2one → account.fiscal.year
    args: 'account.fiscal.year'
  • gain_loss Float
  • gain_loss_total Float
  • has_amount_detail Boolean
  • percentage Float
  • report_accounting_doc_ids Many2many → report_asset_journal_accounting_doc
    relation='year_dep_line_accounting_doc_rel' args: 'report_asset_journal_accounting_doc'
  • report_depreciation_id Many2one → report_asset_journal_depreciation
    args: 'report_asset_journal_depreciation'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • sequence Integer
  • type_name Char
  • year Char
Public methods (4)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_report_dep_line_year_data(self)

New fields (16)
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_in_total Float
  • amount_loss Float
  • amount_out_total Float
  • amount_residual Float
  • gain_loss Float
  • gain_loss_total Float
  • name Char
  • report_category_id Many2one → report_asset_journal_category
    args: 'report_asset_journal_category'
  • report_id Many2one → report_asset_journal
    args: 'report_asset_journal'
  • type_id Many2one → asset.depreciation.type
    args: 'asset.depreciation.type'
  • type_name Char
Public methods (2)
  • format_amount(self, amount, currency=None)
  • get_currency(self)

New fields (18)
  • asset_order_fname Char
  • category_ids Many2many → asset.category
    args: 'asset.category'
  • company_id Many2one → res.company
    args: 'res.company'
  • date Date
  • l10n_it_asset_ids Many2many → asset.asset
    args: 'asset.asset'
  • previsional_line_ids Many2many → asset.depreciation.line
    args: 'asset.depreciation.line'
  • report_category_ids One2many → report_asset_previsional_category
    args: 'report_asset_previsional_category', 'report_id'
  • report_depreciation_ids One2many → report_asset_previsional_depreciation
    args: 'report_asset_previsional_depreciation', 'report_id'
  • report_depreciation_line_year_ids One2many → report_asset_previsional_depreciation_line_year
    args: 'report_asset_previsional_depreciation_line_year', 'report_id'
  • report_footer_year Char
  • report_l10n_it_asset_ids One2many → report_asset_previsional_asset
    args: 'report_asset_previsional_asset', 'report_id'
  • report_name Char
  • report_total_ids One2many → report_asset_previsional_totals
    args: 'report_asset_previsional_totals', 'report_id'
  • show_category_totals Boolean
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
  • show_totals Boolean
  • type_ids Many2many → asset.depreciation.type
    args: 'asset.depreciation.type'
Public methods (10)
  • compute_data_for_report(self)
    Compute data to be printed
  • do_print(self, report_type)
  • generate_data(self)
  • generate_structure(self)
  • generate_totals(self)
  • get_assets(self)
  • get_html(self, given_context=None)
    @api.model
    Method needed from JavaScript widget to render HTML view
  • print_report(self, report_type=None)
    This method is called from the JS widget buttons 'Print' and 'Export' in the HTML view. Prints PDF and XLSX reports. :param report_type: string that represents the report type
  • set_report_name(self)
  • sort_assets(self, assets)

New fields (9)
  • document_date Char
  • document_nr Char
  • partner_name Char
  • partner_ref Char
  • partner_vat Char
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • res_id Integer
  • res_model Char
  • sequence Integer
Public methods (0)

No public methods.

New fields (11)
  • asset_code Char
  • asset_name Char
  • asset_purchase_amount Float
  • asset_state Char
  • asset_used Char
  • l10n_it_asset_id Many2one → asset.asset
    ondelete='cascade' required=True args: 'asset.asset'
  • report_category_id Many2one → report_asset_previsional_category
    args: 'report_asset_previsional_category'
  • report_depreciation_ids One2many → report_asset_previsional_depreciation
    args: 'report_asset_previsional_depreciation', 'report_asset_id'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • report_purchase_doc_id Many2one → report_asset_previsional_accounting_doc
    args: 'report_asset_previsional_accounting_doc'
  • report_sale_doc_id Many2one → report_asset_previsional_accounting_doc
    args: 'report_asset_previsional_accounting_doc'
Public methods (6)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_purchase_vals(self)
  • get_report_asset_data(self)
  • get_sale_vals(self)

New fields (5)
  • category_id Many2one → asset.category
    ondelete='cascade' required=True args: 'asset.category'
  • category_name Char
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • report_l10n_it_asset_ids One2many → report_asset_previsional_asset
    args: 'report_asset_previsional_asset', 'report_category_id'
  • report_total_ids One2many → report_asset_previsional_totals
    args: 'report_asset_previsional_totals', 'report_category_id'
Public methods (3)
  • generate_data(self)
  • generate_totals(self)
  • get_report_categ_data(self)

New fields (10)
  • dep_amount_depreciable Float
  • dep_date_start Char
  • dep_percentage Float
  • dep_pro_rata_temporis Char
  • depreciation_id Many2one → asset.depreciation
    ondelete='cascade' required=True args: 'asset.depreciation'
  • mode_name Char
  • report_asset_id Many2one → report_asset_previsional_asset
    args: 'report_asset_previsional_asset'
  • report_depreciation_year_line_ids One2many → report_asset_previsional_depreciation_line_year
    args: 'report_asset_previsional_depreciation_line_year', 'report_depreciation_id'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • type_name Char
Public methods (4)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • get_currency(self)
  • get_report_dep_data(self)

New fields (31)
  • amount_depreciable Float
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_gain_total Float
  • amount_historical Float
  • amount_in Float
  • amount_in_detail Char
  • amount_in_total Float
  • amount_loss Float
  • amount_loss_total Float
  • amount_out Float
  • amount_out_detail Char
  • amount_out_total Float
  • amount_residual Float
  • date_start Char
  • dep_line_ids Many2many → asset.depreciation.line
    relation='report_previsional_line_year_dep_line' args: 'asset.depreciation.line'
  • fiscal_year_id Many2one → account.fiscal.year
    args: 'account.fiscal.year'
  • gain_loss Float
  • gain_loss_total Float
  • has_amount_detail Boolean
  • hidden Boolean
  • needs_previsional Boolean
  • percentage Float
  • report_depreciation_id Many2one → report_asset_previsional_depreciation
    args: 'report_asset_previsional_depreciation'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • sequence Integer
  • type_name Char
  • year Char
Public methods (8)
  • clean_unused(self)
  • do_clean(self)
  • format_amount(self, amount, currency=None)
  • generate_data(self)
  • generate_previsional_line_single(self)
  • generate_previsional_lines(self)
  • get_currency(self)
  • get_report_dep_line_year_data(self)

New fields (16)
  • amount_depreciable_updated Float
  • amount_depreciated Float
  • amount_depreciation_fund_curr_year Float
  • amount_depreciation_fund_prev_year Float
  • amount_gain Float
  • amount_in_total Float
  • amount_loss Float
  • amount_out_total Float
  • amount_residual Float
  • gain_loss Float
  • gain_loss_total Float
  • name Char
  • report_category_id Many2one → report_asset_previsional_category
    args: 'report_asset_previsional_category'
  • report_id Many2one → report_asset_previsional
    args: 'report_asset_previsional'
  • type_id Many2one → asset.depreciation.type
    args: 'asset.depreciation.type'
  • type_name Char
Public methods (2)
  • format_amount(self, amount, currency=None)
  • get_currency(self)

New fields (18)
  • asset_purchase_amount Monetary
    string='Purchase Amount'
  • category_id Many2one → asset.category
    string='Category' args: 'asset.category'
  • code Char
    default=''
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='company_id.currency_id' string='Currency' args: 'res.currency'
  • depreciated_fund_amount Monetary
  • depreciation_type_ids Many2many → asset.depreciation.type
    string='Depreciation Types' args: 'asset.depreciation.type'
  • dismiss_asset_without_sale Boolean
  • dismiss_date Date
    default=fields.Date.today()
  • is_move_state_ok Boolean
    string='Move State'
  • l10n_it_asset_id Many2one → asset.asset
    string='Asset' args: 'asset.asset'
  • management_type Selection
    args: [('create', 'Create New'), ('update', 'Update Existing'), ('partial_dismiss', 'Partial Dismiss'), ('dismiss', 'Dismiss Asset')]
  • move_ids Many2many → account.move
    default=get_default_move_ids string='Moves' args: 'account.move'
  • move_line_ids Many2many → account.move.line
    string='Move Lines' args: 'account.move.line'
  • move_type Selection
    args: [('sale', 'Sale'), ('purchase', 'Purchase'), ('general', 'Miscellaneous'), ('out_invoice', 'Customer Invoice'), ('in_invoice', 'Vendor Bill'), ('out_refund', 'Customer Credit Note'), ('in_refund', 'Vendor Credit Note'), ('wrong', 'Wrong')]
  • name Char
  • purchase_date Date
    default=fields.Date.today()
  • used Boolean
Public methods (20)
  • check_pre_create_asset(self)
  • check_pre_dismiss_asset(self)
  • check_pre_link_asset(self)
  • check_pre_update_asset(self)
  • create_asset(self)
    Creates asset and returns it
  • dismiss_asset(self)
    Dismisses asset and returns it
  • get_create_asset_vals(self)
  • get_default_company_id(self)
    @api.model
  • get_default_move_ids(self)
    @api.model
  • get_dismiss_asset_vals(self)
  • get_management_type_2_method(self)
  • get_move_journal_type_2_dep_line_type(self)
  • get_partial_dismiss_asset_vals(self)
  • get_update_asset_vals(self)
  • link_asset(self)
  • onchange_category_id(self)
    @api.onchange('category_id')
  • onchange_depreciation_type_ids(self)
    @api.onchange('l10n_it_asset_id', 'management_type')
  • onchange_moves(self)
    @api.onchange('move_ids')
  • partial_dismiss_asset(self)
    Dismisses asset partially and returns it
  • update_asset(self)
    Updates asset and returns it

New fields (9)
  • category_ids Many2many → asset.category
    string='Categories' args: 'asset.category'
  • company_id Many2one → res.company
    default=get_default_company_id string='Company' args: 'res.company'
  • date_dep Date
    default=get_default_date_dep required=True string='Depreciation Date'
  • journal_id Many2one → account.journal
    comodel_name='account.journal' help="Create move entries in this journal instead of the category's journal." string='Override journal'
  • l10n_it_asset_ids Many2many → asset.asset
    string='Assets' args: 'asset.asset'
  • missing_fiscal_year_warning Text
    compute='_compute_missing_fiscal_year_warning' help='Message to warn the user that some fiscal years are missing.'
  • period Selection
    default='year' required=True selection=[('year', 'Year'), ('month', 'Month')]
  • period_count Integer
    default=1 string='Number of periods'
  • type_ids Many2many → asset.depreciation.type
    default=get_default_type_ids required=True string='Depreciation Types' args: 'asset.depreciation.type'
Public methods (6)
  • do_generate(self)
    Launches the generation of new depreciation lines for the retrieved assets. Reloads the current window if necessary.
  • get_default_company_id(self)
    @api.model
  • get_default_date_dep(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • get_depreciations(self)
  • get_depreciations_domain(self)

New fields (11)
  • asset_order_fname Selection
    default=get_default_asset_order_fname required=True string='Asset Print Order' args: get_asset_order_fname_selection
  • category_ids Many2many → asset.category
    default=get_default_category_ids string='Categories' args: 'asset.category'
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' args: 'res.company'
  • date Date
    default=get_default_date string='To Date'
  • l10n_it_asset_ids Many2many → asset.asset
    string='Assets' args: 'asset.asset'
  • report_footer_year Char
    default=get_default_report_footer_year
  • show_category_totals Boolean
    default=True
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
    help='By default, only unsold or assets sold in the selected year are printed.\nBy selecting this flag, the report will show all assets, ignoring the sold check.'
  • show_totals Boolean
    default=True
  • type_ids Many2many → asset.depreciation.type
    default=get_default_type_ids string='Depreciation Types' args: 'asset.depreciation.type'
Public methods (15)
  • button_export_asset_journal_html(self)
  • button_export_asset_journal_pdf(self)
  • button_export_asset_journal_xlsx(self)
  • export_asset_journal_report(self, report_type=None)
  • filter_assets(self)
  • get_asset_domain(self)
  • get_asset_order_fname_selection(self)
    @api.model
  • get_default_asset_order_fname(self)
    @api.model
  • get_default_category_ids(self)
    @api.model
  • get_default_company_id(self)
    @api.model
  • get_default_date(self)
    @api.model
  • get_default_report_footer_year(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • onchange_assets(self)
    @api.onchange('category_ids', 'company_id', 'date', 'type_ids')
  • prepare_report_vals(self)

New fields (11)
  • asset_order_fname Selection
    default=get_default_asset_order_fname required=True string='Asset Print Order' args: get_asset_order_fname_selection
  • category_ids Many2many → asset.category
    default=get_default_category_ids string='Categories' args: 'asset.category'
  • company_id Many2one → res.company
    default=get_default_company_id required=True string='Company' args: 'res.company'
  • date Date
    default=get_default_date string='To Date'
  • l10n_it_asset_ids Many2many → asset.asset
    string='Assets' args: 'asset.asset'
  • report_footer_year Char
    default=get_default_report_footer_year
  • show_category_totals Boolean
    default=True
  • show_dismissed_assets Boolean
  • show_sold_assets Boolean
    help='By default, only unsold or assets sold in the selected year are printed.\nBy selecting this flag, the report will show all assets, ignoring the sold check.'
  • show_totals Boolean
    default=True
  • type_ids Many2many → asset.depreciation.type
    default=get_default_type_ids string='Depreciation Types' args: 'asset.depreciation.type'
Public methods (15)
  • button_export_asset_previsional_html(self)
  • button_export_asset_previsional_pdf(self)
  • button_export_asset_previsional_xlsx(self)
  • export_asset_previsional_report(self, report_type=None)
  • filter_assets(self)
  • get_asset_domain(self)
  • get_asset_order_fname_selection(self)
    @api.model
  • get_default_asset_order_fname(self)
    @api.model
  • get_default_category_ids(self)
    @api.model
  • get_default_company_id(self)
    @api.model
  • get_default_date(self)
    @api.model
  • get_default_report_footer_year(self)
    @api.model
  • get_default_type_ids(self)
    @api.model
  • onchange_assets(self)
    @api.onchange('category_ids', 'company_id', 'date', 'type_ids')
  • prepare_report_vals(self)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/l10n-italy
PULL REQUEST
PULL REQUEST[19.0][MIG] l10n_it_asset_management: Migration to 19.0 (#5074)