Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] assets_management -> l10n_it_asset_management: Migration to 16.0 #3776

Merged
merged 52 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
fca42ac
[12.0][ADD] New module for assets management
alessandrocamilli Jun 26, 2020
d6c765c
IMP icon and description
eLBati Nov 23, 2020
26caebb
[FIX] remove conflicts with l10n_it_fatturapa, add setup and tests
sergiocorato Apr 25, 2021
ef631da
Translated using Weblate (Italian)
eLBati Oct 14, 2021
be24501
Translated using Weblate (Italian)
primes2h Nov 3, 2021
53aefbd
Translated using Weblate (Italian)
eLBati Dec 17, 2021
ea453db
Reformatted after template update
SirTakobi Aug 5, 2022
d802bd7
Manually fix manifest website key
SirTakobi Aug 5, 2022
800af8e
[IMP] assets_management: black, isort, prettier
sergiocorato Dec 2, 2022
a00d636
[MIG] assets_management filtering only compulsory changes from #2704
sergiocorato Dec 2, 2022
ee87773
Translated using Weblate (Italian)
francesco-ooops Jan 9, 2023
40be1b7
[FIX][14.0] assets_management sale
sergiocorato Feb 13, 2023
9f85a37
[FIX] assets_management: fix move_type during update asset
Borruso Mar 15, 2023
96e7d6a
[FIX] better string info
sergiocorato Mar 22, 2023
31a3c0a
[FIX] compute always all values
sergiocorato Mar 22, 2023
544b044
[FIX] assets_management: fix website in manifest
Aldeigja Mar 28, 2023
b063e06
Translated using Weblate (Italian)
mymage Apr 3, 2023
da40952
Translated using Weblate (Italian)
francesco-ooops Apr 7, 2023
7505d3d
Translated using Weblate (Italian)
primes2h Apr 8, 2023
a5e7401
Translated using Weblate (Italian)
sergiocorato Apr 11, 2023
3560fcf
Translated using Weblate (Italian)
primes2h Apr 11, 2023
5d9b531
Translated using Weblate (Italian)
mymage Apr 12, 2023
5af726d
Translated using Weblate (Italian)
francesco-ooops Apr 26, 2023
22977bc
Translated using Weblate (Italian)
mymage Apr 28, 2023
c30fd0c
[FIX][14.0] depreciable amount computation by date
sergiocorato May 19, 2023
2a8519f
[FIX] previsional report create only needed depreciation lines
sergiocorato May 19, 2023
8a58ada
[14.0][FIX] currency convert function
sergiocorato May 30, 2023
599d2a0
[14.0][FIX] assets_management view html report
sergiocorato May 31, 2023
d134906
Translated using Weblate (Italian)
sergiocorato May 31, 2023
2638d5a
Translated using Weblate (Italian)
mymage Jun 20, 2023
f20a326
[14.0][FIX] assets_management block creation of depreciation lines in…
sergiocorato Jul 31, 2023
4af0f38
[14.0][IMP] remove unuseful error message when delete asset depreciation
sergiocorato Mar 27, 2023
52a0938
Translated using Weblate (Italian)
mymage Aug 7, 2023
ff49bc9
[FIX][14.0] assets_management do not report assets sold before report…
sergiocorato May 25, 2023
5152383
[14.0][IMP] add ability to dismiss directly an asset
sergiocorato Mar 27, 2023
a79b2d9
[FIX] assets_management: correct permission management
PicchiSeba Apr 19, 2023
9f99d75
Translated using Weblate (Italian)
mymage Aug 22, 2023
dc49c1f
[FIX] all: fix pre-commit deprecated syntax
aleuffre Oct 30, 2023
28259ad
[IMP] assets_management: pre-commit execution
SirAionTech Dec 11, 2023
351761a
[MIG] assets_management: Migration to 16.0
SirAionTech Dec 12, 2023
29cdb68
[REF] assets_management: Remove unused actions
SirAionTech Dec 12, 2023
4df2c2b
[MOV] assets_management: Rename to l10n_it_asset_management
SirAionTech Dec 14, 2023
ab75850
[FIX] l10n_it_asset_management: Depreciation of all previous years
SirTakobi Nov 7, 2022
104f82e
[FIX] l10n_it_asset_management: Dismiss date in new asset
SirAionTech Jan 15, 2024
c8179fe
[FIX] l10n_it_asset_management: Company and page number out of page
SirAionTech Jan 19, 2024
2923334
[REF] l10n_it_asset_management: Worked on the module
SirAionTech Feb 13, 2024
7972b96
[14.0][FIX] get only not null dates
sergiocorato May 30, 2023
fc7e0b6
[14.0][FIX] assets_management: includere nella stampa cespiti non anc…
sergiocorato Jun 19, 2023
c281e73
[14.0][FIX] do not create depreciation lines with zero amount
sergiocorato Jan 6, 2023
145927f
[REF] assets_management: Updated from repo template
SirAionTech Mar 1, 2024
53e8f45
[REF] assets_management: Repo template update
SirAionTech Mar 1, 2024
d3b41a5
[REF] assets_management: Depreciation lines update correctly
SirAionTech Mar 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions l10n_it_asset_management/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
======================
ITA - Gestione Cespiti
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:77394f3b624996a29dc573870e706e6e6e1ce35fa07f90a222d9d5f20b1a7bc5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_asset_management
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_asset_management
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This modules allows account management of companies' assets.

**Table of contents**

.. contents::
:local:

Usage
=====

**English**

You can create and manage assets from accounting section of Odoo.

Configuration must be done from Assets -> Assets Configuration, where
depreciation types, modes and assets categories can be found.

Assets can both be created manually or via invoices and journal entries.
Depreciations can be generated by using the related wizard found in
Assets -> Assets Management -> Generate Depreciations, or by triggering
the same wizard from a single asset form view.

**Italiano**

È possibile creare e gestire cespiti dalla sezione contabilità di Odoo.

La configurazione dei cespiti dev'essere fatta andando in Cespiti ->
Configurazione Cespiti, dove si trovano le categorie dei beni, i tipi e
le modalità di ammortamento.

I cespiti possono essere creati manualmente o da fatture e registrazioni
contabili. Gli ammortamenti possono essere generati utilizzando
l'apposito wizard in Cespiti -> Gestione Cestpiti -> Genera
Ammortamenti, o aprendo quello stesso wizard dalla scheda del cespite.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_asset_management%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Openforce

Contributors
------------

- Alessandro Camilli <[email protected]>
- Silvio Gregorini <[email protected]>
- Stefano Pezzini <[email protected]>
- Lorenzo Battistini <[email protected]>
- `TAKOBI <https://takobi.online>`__:

- Simone Rubino <[email protected]>

- `Aion Tech <https://aiontech.company/>`__:

- Simone Rubino <[email protected]>

- Nextev Srl <[email protected]>

Base icon made by `surang <https://www.flaticon.com/authors/surang>`__
from `www.flaticon.com <http://www.flaticon.com>`__.

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_asset_management>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
8 changes: 8 additions & 0 deletions l10n_it_asset_management/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Author(s): Silvio Gregorini ([email protected])
# Copyright 2019 Openforce Srls Unipersonale (www.openforce.it)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import report
from . import wizard
from .hooks import pre_absorb_old_module
61 changes: 61 additions & 0 deletions l10n_it_asset_management/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Author(s): Silvio Gregorini ([email protected])
# Copyright 2019 Openforce Srls Unipersonale (www.openforce.it)
# Copyright 2023 Simone Rubino - Aion Tech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "ITA - Gestione Cespiti",
"version": "16.0.1.0.0",
"category": "Localization/Italy",
"summary": "Gestione Cespiti",
"author": "Openforce, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"depends": [
"account",
"account_financial_report",
"account_fiscal_year",
"mail",
],
"data": [
"security/res_groups.xml",
"security/ir.model.access.csv",
"security/rules.xml",
"data/ir_cron.xml",
"data/asset_data.xml",
"report/layout.xml",
"report/paperformat.xml",
"report/templates/asset_journal.xml",
"report/templates/asset_previsional.xml",
"report/reports.xml",
"views/asset_menuitems.xml",
"views/account_move.xml",
"views/asset.xml",
"views/asset_accounting_info.xml",
"views/asset_category.xml",
"views/asset_depreciation.xml",
"views/asset_depreciation_line.xml",
"views/asset_depreciation_line_type.xml",
"views/asset_depreciation_mode.xml",
"views/asset_depreciation_type.xml",
"views/asset_tag.xml",
"wizard/account_move_manage_asset_view.xml",
"wizard/asset_generate_depreciation_view.xml",
"wizard/asset_journal_report_view.xml",
"wizard/asset_previsional_report_view.xml",
],
"assets": {
"web.assets_backend": [
"l10n_it_asset_management/static/src/js/*",
"l10n_it_asset_management/static/src/xml/*",
],
},
"development_status": "Beta",
"installable": True,
"external_dependencies": {
"python": [
"openupgradelib",
],
},
"pre_init_hook": "pre_absorb_old_module",
}
45 changes: 45 additions & 0 deletions l10n_it_asset_management/data/asset_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">

<!-- Natura ammortamento -->
<record id="ad_type_civilistico" model="asset.depreciation.type">
<field name="name">Civilistico</field>
<field name="requires_account_move">1</field>
<field name="print_by_default">1</field>
</record>
<record id="ad_type_fiscale" model="asset.depreciation.type">
<field name="name">Fiscale</field>
<field name="requires_account_move">0</field>
<field name="print_by_default">1</field>
</record>

<!-- Tipo operazione -->
<record id="adpl_type_riv" model="asset.depreciation.line.type">
<field name="name">Rivalutazione</field>
<field name="code">RIV</field>
<field name="type">in</field>
</record>

<record id="adpl_type_sva" model="asset.depreciation.line.type">
<field name="name">Svalutazione</field>
<field name="code">SVA</field>
<field name="type">out</field>
</record>

<!-- Metodi di ammortamento -->
<record id="ad_mode_immateriale" model="asset.depreciation.mode">
<field name="name">IMMATERIALE</field>
<field name="used_asset_coeff">1</field>
</record>
<record id="ad_mode_materiale" model="asset.depreciation.mode">
<field name="name">MATERIALE</field>
<field name="used_asset_coeff">1</field>
</record>
<record id="ad_mode_materiale_line" model="asset.depreciation.mode.line">
<field name="mode_id" ref="ad_mode_materiale" />
<field name="from_nr">1</field>
<field name="to_nr">1</field>
<field name="coefficient">0.5</field>
</record>

</odoo>
17 changes: 17 additions & 0 deletions l10n_it_asset_management/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">

<record id="clean_asset_accounting_info_cron" model="ir.cron">
<field name="name">Vacuum Empty Asset Accounting Info</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="doall" eval="True" />
<field name="model_id" ref="model_asset_accounting_info" />
<field name="state">code</field>
<field name="code">model.cron_vacuum_table()</field>
</record>

</odoo>
37 changes: 37 additions & 0 deletions l10n_it_asset_management/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2023 Simone Rubino - Aion Tech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade

NEW_MODULE_NAME = "l10n_it_asset_management"
OLD_MODULE_NAME = "assets_management"

RENAMED_MODELS = [
(
"report.assets_management.report_asset_journal_xlsx",
"report.l10n_it_asset_management.report_asset_journal_xlsx",
),
(
"report.assets_management.report_asset_previsional_xlsx",
"report.l10n_it_asset_management.report_asset_previsional_xlsx",
),
]


def migrate_old_module(cr):
openupgrade.rename_models(

Check warning on line 22 in l10n_it_asset_management/hooks.py

View check run for this annotation

Codecov / codecov/patch

l10n_it_asset_management/hooks.py#L22

Added line #L22 was not covered by tests
cr,
RENAMED_MODELS,
)


def pre_absorb_old_module(cr):
if openupgrade.is_module_installed(cr, OLD_MODULE_NAME):
openupgrade.update_module_names(

Check warning on line 30 in l10n_it_asset_management/hooks.py

View check run for this annotation

Codecov / codecov/patch

l10n_it_asset_management/hooks.py#L30

Added line #L30 was not covered by tests
cr,
[
(OLD_MODULE_NAME, NEW_MODULE_NAME),
],
merge_modules=True,
)
migrate_old_module(cr)

Check warning on line 37 in l10n_it_asset_management/hooks.py

View check run for this annotation

Codecov / codecov/patch

l10n_it_asset_management/hooks.py#L37

Added line #L37 was not covered by tests
Loading
Loading