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

16.0 mig l10n it asset history import #4397

Open
wants to merge 16 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
96 changes: 96 additions & 0 deletions l10n_it_asset_history_import/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
=============================================
ITA - Gestione cespiti - Importazione storico
=============================================

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

.. |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_history_import
: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_history_import
: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|

**\*Italiano**\ \*

Questo modulo permette l'importazione dello storico dei cespiti.

**\*English**\ \*

This module allows to import assets history.

**Table of contents**

.. contents::
:local:

Usage
=====

**Italiano**

Cespiti > Gestione cespiti > Importa storico cespiti Caricare un file
come da istruzioni (nella procedura guidata è possibile trovare il
modello da utilizzare per l'importazione), es.:

![alt text](../static/asset_import.png)

**English**

Assets > Assets Management > Assets History Import Upload a file as per
instructions (you can find a template to use for import on wizard),
e.g.:

![alt text](../static/asset_import.png)

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_history_import%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

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_history_import>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
24 changes: 24 additions & 0 deletions l10n_it_asset_history_import/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2019-2023 Openforce Srls Unipersonale (www.openforce.it)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).

from . import models
from . import wizards


CODED_MODELS = (
"asset.asset",
"asset.category",
"asset.depreciation.mode",
"asset.depreciation.type",
)


def set_import_codes(cr, registry):
from odoo import SUPERUSER_ID
from odoo.api import Environment

env = Environment(cr, SUPERUSER_ID, {})

for model in CODED_MODELS:
for rec in env[model].sudo().search([]):
rec.assign_import_code()
31 changes: 31 additions & 0 deletions l10n_it_asset_history_import/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2019-2023 Openforce Srls Unipersonale (www.openforce.it)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).

{
"name": "ITA - Gestione cespiti - Importazione storico",
"version": "16.0.1.0.0",
"category": "Accounting",
"summary": "Cespiti: importazione storico dati",
"author": "Openforce, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"external_dependencies": {
"python": [
"xlrd", # Already in Odoo requirements, but let's be sure
"xlsxwriter",
],
},
"depends": [
"l10n_it_asset_management",
],
"data": [
"security/ir.model.access.csv",
"views/asset.xml",
"views/asset_category.xml",
"views/asset_depreciation_mode.xml",
"views/asset_depreciation_type.xml",
"wizards/asset_history_import.xml",
],
"installable": True,
"post_init_hook": "set_import_codes",
}
Loading
Loading