Skip to content

Commit 76e2a6b

Browse files
CopilotodooNextev
authored andcommitted
[IMP] l10n_it_asset_management: add depreciation situation view
1 parent 2ed3b63 commit 76e2a6b

File tree

5 files changed

+74
-32
lines changed

5 files changed

+74
-32
lines changed

l10n_it_asset_management/README.rst

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
======================
62
ITA - Gestione Cespiti
73
======================
@@ -17,7 +13,7 @@ ITA - Gestione Cespiti
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
@@ -88,22 +84,23 @@ Authors
8884
Contributors
8985
------------
9086

91-
- Alessandro Camilli <alessandrocamilli@openforce.it>
92-
- Silvio Gregorini <silviogregorini@openforce.it>
93-
- Stefano Pezzini <stefanopezzini@openforce.it>
94-
- Lorenzo Battistini <lb@takobi.online>
95-
- `TAKOBI <https://takobi.online>`__:
87+
- Alessandro Camilli <alessandrocamilli@openforce.it>
88+
- Silvio Gregorini <silviogregorini@openforce.it>
89+
- Stefano Pezzini <stefanopezzini@openforce.it>
90+
- Lorenzo Battistini <lb@takobi.online>
91+
- `TAKOBI <https://takobi.online>`__:
9692

97-
- Simone Rubino <sir@takobi.online>
93+
- Simone Rubino <sir@takobi.online>
9894

99-
- `Aion Tech <https://aiontech.company/>`__:
95+
- `Aion Tech <https://aiontech.company/>`__:
10096

101-
- Simone Rubino <simone.rubino@aion-tech.it>
97+
- Simone Rubino <simone.rubino@aion-tech.it>
10298

103-
- Nextev Srl <odoo@nextev.it>
99+
- Nextev Srl <odoo@nextev.it>
104100

105101
Base icon made by `surang <https://www.flaticon.com/authors/surang>`__
106-
from `www.flaticon.com <http://www.flaticon.com>`__.
102+
from
103+
[`www.flaticon.com](https://www.flaticon.com/) <http://www.flaticon.com](https://www.flaticon.com/)>`__.
107104

108105
Maintainers
109106
-----------

l10n_it_asset_management/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"views/asset_depreciation_line.xml",
3838
"views/asset_depreciation_line_type.xml",
3939
"views/asset_depreciation_mode.xml",
40+
"views/asset_depreciation_situation.xml",
4041
"views/asset_depreciation_type.xml",
4142
"views/asset_tag.xml",
4243
"wizard/account_move_manage_asset_view.xml",

l10n_it_asset_management/models/asset_depreciation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ class AssetDepreciation(models.Model):
7272
string="Asset",
7373
)
7474

75+
category_id = fields.Many2one(
76+
"asset.category",
77+
readonly=True,
78+
related="l10n_it_asset_id.category_id",
79+
store=True,
80+
string="Category",
81+
)
82+
7583
company_id = fields.Many2one(
7684
"res.company",
7785
readonly=True,

l10n_it_asset_management/static/description/index.html

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>ITA - Gestione Cespiti</title>
77
<style type="text/css">
88

99
/*
@@ -360,21 +360,16 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="ita-gestione-cespiti">
364+
<h1 class="title">ITA - Gestione Cespiti</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="ita-gestione-cespiti">
370-
<h1>ITA - Gestione Cespiti</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370
!! source digest: sha256:15a44ddb2862996cd44d811095dd3607974393dcddf720ac0e193182e14eb7da
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_asset_management"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-l10n_it_asset_management"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_asset_management"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-l10n_it_asset_management"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378373
<p>This modules allows account management of companies’ assets.</p>
379374
<p><strong>Table of contents</strong></p>
380375
<div class="contents local topic" id="contents">
@@ -390,7 +385,7 @@ <h1>ITA - Gestione Cespiti</h1>
390385
</ul>
391386
</div>
392387
<div class="section" id="usage">
393-
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
388+
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
394389
<p><strong>English</strong></p>
395390
<p>You can create and manage assets from accounting section of Odoo.</p>
396391
<p>Configuration must be done from Assets -&gt; Assets Configuration, where
@@ -410,23 +405,23 @@ <h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
410405
Ammortamenti, o aprendo quello stesso wizard dalla scheda del cespite.</p>
411406
</div>
412407
<div class="section" id="bug-tracker">
413-
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
408+
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
414409
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
415410
In case of trouble, please check there if your issue has already been reported.
416411
If you spotted it first, help us to smash it by providing a detailed and welcomed
417412
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_asset_management%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
418413
<p>Do not contact contributors directly about support or help with technical issues.</p>
419414
</div>
420415
<div class="section" id="credits">
421-
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
416+
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
422417
<div class="section" id="authors">
423-
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
418+
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
424419
<ul class="simple">
425420
<li>Openforce</li>
426421
</ul>
427422
</div>
428423
<div class="section" id="contributors">
429-
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
424+
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
430425
<ul class="simple">
431426
<li>Alessandro Camilli &lt;<a class="reference external" href="mailto:alessandrocamilli&#64;openforce.it">alessandrocamilli&#64;openforce.it</a>&gt;</li>
432427
<li>Silvio Gregorini &lt;<a class="reference external" href="mailto:silviogregorini&#64;openforce.it">silviogregorini&#64;openforce.it</a>&gt;</li>
@@ -443,10 +438,11 @@ <h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
443438
<li>Nextev Srl &lt;<a class="reference external" href="mailto:odoo&#64;nextev.it">odoo&#64;nextev.it</a>&gt;</li>
444439
</ul>
445440
<p>Base icon made by <a class="reference external" href="https://www.flaticon.com/authors/surang">surang</a>
446-
from <a class="reference external" href="http://www.flaticon.com">www.flaticon.com</a>.</p>
441+
from
442+
[<a class="reference external" href="http://www.flaticon.com](https://www.flaticon.com/)">www.flaticon.com](https://www.flaticon.com/)</a>.</p>
447443
</div>
448444
<div class="section" id="maintainers">
449-
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
445+
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
450446
<p>This module is maintained by the OCA.</p>
451447
<a class="reference external image-reference" href="https://odoo-community.org">
452448
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -459,6 +455,5 @@ <h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
459455
</div>
460456
</div>
461457
</div>
462-
</div>
463458
</body>
464459
</html>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<record id="view_asset_depreciation_situation_list" model="ir.ui.view">
4+
<field name="name">asset.depreciation.situation.list</field>
5+
<field name="model">asset.depreciation</field>
6+
<field name="arch" type="xml">
7+
<list string="Asset Situation">
8+
<field name="l10n_it_asset_id" string="Asset" />
9+
<field name="type_id" string="Depreciation Type" />
10+
<field
11+
name="amount_depreciable_updated"
12+
string="Depreciable Amount"
13+
sum="Total Depreciable"
14+
/>
15+
<field
16+
name="amount_depreciated"
17+
string="Depreciated Amount"
18+
sum="Total Depreciated"
19+
/>
20+
<field name="amount_residual" string="Residual" sum="Total Residual" />
21+
<field name="last_depreciation_date" string="Last Depreciation Date" />
22+
</list>
23+
</field>
24+
</record>
25+
26+
<record id="action_asset_depreciation_situation" model="ir.actions.act_window">
27+
<field name="name">Asset Situation</field>
28+
<field name="res_model">asset.depreciation</field>
29+
<field name="view_mode">list,form</field>
30+
<field name="view_id" ref="view_asset_depreciation_situation_list" />
31+
<field name="context">{'group_by': 'category_id'}</field>
32+
</record>
33+
34+
<menuitem
35+
id="menu_asset_situation"
36+
name="Asset Situation"
37+
parent="menu_asset_reports"
38+
action="action_asset_depreciation_situation"
39+
sequence="30"
40+
/>
41+
</odoo>

0 commit comments

Comments
 (0)