Compare commits

...

11 Commits

Author SHA1 Message Date
tocmo0nlord
adbe430761 Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
2026-03-13 20:43:25 +00:00
Betül Öğmen
36e847a7df Translated using Weblate (Turkish)
Currently translated at 100.0% (273 of 273 strings)

Translation: account-financial-reporting-18.0/account-financial-reporting-18.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-account_financial_report/tr/
2025-10-06 17:42:44 +00:00
mymage
af82e958ba Translated using Weblate (Italian)
Currently translated at 100.0% (273 of 273 strings)

Translation: account-financial-reporting-18.0/account-financial-reporting-18.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-account_financial_report/it/
2025-10-06 08:42:44 +00:00
Rémi
3a98428cc6 Translated using Weblate (French)
Currently translated at 74.5% (38 of 51 strings)

Translation: account-financial-reporting-18.0/account-financial-reporting-18.0-account_tax_balance
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-account_tax_balance/fr/
2025-10-05 09:42:44 +00:00
Rémi
680b57e1da Translated using Weblate (French)
Currently translated at 61.8% (68 of 110 strings)

Translation: account-financial-reporting-18.0/account-financial-reporting-18.0-partner_statement
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-partner_statement/fr/
2025-10-05 09:42:44 +00:00
Rémi
f26ab89375 Translated using Weblate (French)
Currently translated at 89.7% (245 of 273 strings)

Translation: account-financial-reporting-18.0/account-financial-reporting-18.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-account_financial_report/fr/
2025-10-05 09:42:44 +00:00
Weblate
5dd00952af Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-reporting-18.0/account-financial-reporting-18.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-account_financial_report/
2025-10-02 19:40:43 +00:00
OCA-git-bot
01387000d1 [BOT] post-merge updates 2025-10-02 19:40:34 +00:00
oca-ci
6473793dcc [UPD] Update account_financial_report.pot 2025-10-02 19:37:22 +00:00
OCA-git-bot
a6fe73a2e3 Merge PR #1396 into 18.0
Signed-off-by pedrobaeza
2025-10-02 19:34:31 +00:00
Carolina Fernandez
e14373d995 [IMP] account_financial_report: Open items groupy by salesman
TT49193
2025-10-02 09:31:55 +02:00
9472 changed files with 1266455 additions and 115 deletions

0
.github/workflows/pre-commit.yml vendored Normal file → Executable file
View File

0
.github/workflows/stale.yml vendored Normal file → Executable file
View File

0
.github/workflows/test.yml vendored Normal file → Executable file
View File

View File

@@ -0,0 +1,6 @@
{
"pull_requests": {
"https://github.com/OCA/sale-workflow/pull/2864": "Nothing to port from PR https://github.com/OCA/sale-workflow/pull/2864",
"https://github.com/OCA/sale-workflow/pull/3285": "Nothing to port from PR https://github.com/OCA/sale-workflow/pull/3285"
}
}

View File

0
.gitignore → account-financial-reporting/.gitignore vendored Normal file → Executable file
View File

0
.pylintrc → account-financial-reporting/.pylintrc Normal file → Executable file
View File

0
.ruff.toml → account-financial-reporting/.ruff.toml Normal file → Executable file
View File

0
LICENSE → account-financial-reporting/LICENSE Normal file → Executable file
View File

2
README.md → account-financial-reporting/README.md Normal file → Executable file
View File

@@ -21,7 +21,7 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[account_financial_report](account_financial_report/) | 18.0.1.2.6 | | OCA Financial Reports
[account_financial_report](account_financial_report/) | 18.0.1.3.0 | | OCA Financial Reports
[account_tax_balance](account_tax_balance/) | 18.0.1.0.1 | | Compute tax balances based on date range
[mis_template_financial_report](mis_template_financial_report/) | 18.0.2.0.0 | <a href='https://github.com/hbrunn'><img src='https://github.com/hbrunn.png' width='32' height='32' style='border-radius:50%;' alt='hbrunn'/></a> | Profit & Loss / Balance sheet MIS templates
[partner_statement](partner_statement/) | 18.0.1.1.0 | <a href='https://github.com/MiquelRForgeFlow'><img src='https://github.com/MiquelRForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='MiquelRForgeFlow'/></a> | OCA Financial Reports

View File

View File

Submodule account-financial-tools added at 86449b6572

View File

@@ -0,0 +1,103 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association
================================
Assets - Compute Depre. in Batch
================================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d788179ff471c95947022c05a6d6498a2ac1c9c6b222fcdf63ac01bfa5d798ec
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/license-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%2Faccount--financial--tools-lightgray.png?logo=github
:target: https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_compute_batch
:alt: OCA/account-financial-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-tools-18-0/account-financial-tools-18-0-account_asset_compute_batch
: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/account-financial-tools&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module extend existing "Compute Asset" feature by allowing to
create an Compute Asset Batch (record) to track the computation.
**Table of contents**
.. contents::
:local:
Usage
=====
There are 2 ways to create "Compute Asset Batch"
1. | On the Compute Assets wizards, choose "Create Batch" option,
| 1.1 Type in batch name and description. 1.2 Select asset profiles,
to limit only some profiles to get computed. 1.3 Option to "Delay
Compute Asset", will only create Batch record for user to execute
it later.
2. | Create Compute Asset Batch directly
| 2.1 Select date for depreciation 2.2 Type in batch name and
descripton 2.3 Select asset profiles, to limit only some profiles
to get computed. 2.4 Option to "Auto Compute" if you want to
compute this batch by cron job. 2.4 Option to "Delay Post" if you
want to post journal entry by cron job. 2.5 Click "Compute" button
to compute asset.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/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/account-financial-tools/issues/new?body=module:%20account_asset_compute_batch%0Aversion:%2018.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
-------
* Ecosoft
Contributors
------------
- `Ecosoft <http://ecosoft.co.th>`__:
- Kitti U. <kittiu@ecosoft.co.th>
- Pimolnat Suntian <pimolnats@ecosoft.co.th>
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/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_compute_batch>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -0,0 +1,2 @@
from . import models
from . import wizard

View File

@@ -0,0 +1,19 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Assets - Compute Depre. in Batch",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"depends": ["account_asset_management"],
"author": "Ecosoft, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",
"category": "Accounting & Finance",
"data": [
"data/service_cron.xml",
"security/account_asset_security.xml",
"security/ir.model.access.csv",
"wizard/account_asset_compute.xml",
"views/account_asset_compute_batch.xml",
],
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ir_cron_auto_compute_draft_batch" model="ir.cron">
<field
name="name"
>Asset Compute Batch; Post draft batches with auto_compute set to True up to today</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field
name="nextcall"
eval="(DateTime.now().replace(hour=2, minute=0) + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"
/>
<field name="model_id" ref="model_account_asset_compute_batch" />
<field name="code">model._autocompute_draft_batches()</field>
<field name="state">code</field>
<field name="user_id" ref="base.user_root" />
</record>
</odoo>

View File

@@ -0,0 +1,462 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_asset_compute_batch
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction
msgid "Action Needed"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_ids
msgid "Activities"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_decoration
msgid "Activity Exception Decoration"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_state
msgid "Activity State"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_type_icon
msgid "Activity Type Icon"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__date_end
msgid "All depreciation lines prior to this date will be computed"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__amount
msgid "Amount"
msgstr ""
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/wizard/account_asset_compute.py:0
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.search_account_asset_compute_batch_filter
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Asset Compute Batch"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.actions.server,name:account_asset_compute_batch.ir_cron_auto_compute_draft_batch_ir_actions_server
msgid ""
"Asset Compute Batch; Post draft batches with auto_compute set to True up to "
"today"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__profile_id
msgid "Asset Profile"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_line
msgid "Asset depreciation table line"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_attachment_count
msgid "Attachment Count"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__auto_compute
msgid "Auto Compute"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__auto_compute
msgid "Auto compute draft batches with 'Date' up to today, by cron job"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__batch_name
msgid "Batch Name"
msgstr ""
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.search_account_asset_compute_batch_filter
msgid "Batch Number"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.constraint,message:account_asset_compute_batch.constraint_account_asset_compute_batch_name_uniq
msgid "Batch name must be unique!"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__company_id
msgid "Company"
msgstr ""
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Compute"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.actions.act_window,name:account_asset_compute_batch.account_asset_compute_batch_action
#: model:ir.ui.menu,name:account_asset_compute_batch.account_asset_compute_batch_menu
msgid "Compute Asset Batch"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_compute
msgid "Compute Assets"
msgstr ""
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid "Compute Assets errors"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__compute_batch_id
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_move_line__compute_batch_id
msgid "Compute Batch"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_compute_batch
msgid "Compute Depreciation Batch"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields.selection,name:account_asset_compute_batch.selection__account_asset_compute_batch__state__computed
msgid "Computed"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__use_batch
msgid "Create Batch"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__create_uid
msgid "Created by"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__create_date
msgid "Created on"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__currency_id
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__currency_id
msgid "Currency"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__delay_post
msgid ""
"Dalay account posting of newly created journaly entries, by setting "
"auto_post='at_date', to be posted by cron job"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__date_end
msgid "Date"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__delay_compute
msgid "Delay Compute Asset"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__delay_post
msgid "Delay Posting"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__depre_amount
msgid "Depreciation Amount"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_compute_batch_profile_report
msgid "Depreciation Amount by Profile"
msgstr ""
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Depreciation By Profile"
msgstr ""
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Depreciations"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__description
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__description
msgid "Description"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__display_name
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__display_name
msgid "Display Name"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields.selection,name:account_asset_compute_batch.selection__account_asset_compute_batch__state__draft
msgid "Draft"
msgstr ""
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid ""
"Error while processing batches %(batch_ref)s: \n"
"\n"
"%(tb)s"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields.selection,name:account_asset_compute_batch.selection__account_asset_compute_batch__state__exception
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Exception"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__note
msgid "Exception Error"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_follower_ids
msgid "Followers"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_partner_ids
msgid "Followers (Partners)"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_type_icon
msgid "Font awesome icon e.g. fa-tasks"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__has_message
msgid "Has Message"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__id
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__id
msgid "ID"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_icon
msgid "Icon"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_icon
msgid "Icon to indicate an exception activity."
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute__batch_name
msgid "If batch name is specified, computation will be tracked by a batch"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction
msgid "If checked, new messages require your attention."
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error
msgid "If checked, some messages have a delivery error."
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_is_follower
msgid "Is Follower"
msgstr ""
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Journal Entries"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_move
msgid "Journal Entry"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_move_line
msgid "Journal Item"
msgstr ""
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid "Journal Items"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__write_uid
msgid "Last Updated by"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__write_date
msgid "Last Updated on"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error
msgid "Message Delivery error"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_ids
msgid "Messages"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__move_line_ids
msgid "Move Line"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__my_activity_date_deadline
msgid "My Activity Deadline"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__name
msgid "Name"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_date_deadline
msgid "Next Activity Deadline"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_summary
msgid "Next Activity Summary"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_type_id
msgid "Next Activity Type"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction_counter
msgid "Number of Actions"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error_counter
msgid "Number of errors"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction_counter
msgid "Number of messages requiring action"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error_counter
msgid "Number of messages with delivery error"
msgstr ""
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid "Only draft batch can be deleted!"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__profile_report
msgid "Profile Report"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__profile_ids
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__profile_ids
msgid "Profiles"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_user_id
msgid "Responsible User"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__profile_ids
msgid "Selected asset to run depreciation. Run all profiles if left blank."
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__state
msgid "State"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_state
msgid ""
"Status based on activities\n"
"Overdue: Due date is already passed\n"
"Today: Activity date is today\n"
"Planned: Future activities."
msgstr ""
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_list
msgid "Total"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_decoration
msgid "Type of the exception activity on record."
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute__use_batch
msgid "Use batch opton"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__website_message_ids
msgid "Website Messages"
msgstr ""
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__website_message_ids
msgid "Website communication history"
msgstr ""

View File

@@ -0,0 +1,486 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_asset_compute_batch
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-08-19 15:27+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.4\n"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction
msgid "Action Needed"
msgstr "Azione richiesta"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_ids
msgid "Activities"
msgstr "Attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_decoration
msgid "Activity Exception Decoration"
msgstr "Decorazione eccezione attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_state
msgid "Activity State"
msgstr "Stato attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_type_icon
msgid "Activity Type Icon"
msgstr "Icona tipo attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__date_end
msgid "All depreciation lines prior to this date will be computed"
msgstr ""
"Verranno calcolate tutte le righe di ammortamento precedenti a questa data"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__amount
msgid "Amount"
msgstr "Valore"
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/wizard/account_asset_compute.py:0
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.search_account_asset_compute_batch_filter
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Asset Compute Batch"
msgstr "Lotto calcolo cespite"
#. module: account_asset_compute_batch
#: model:ir.actions.server,name:account_asset_compute_batch.ir_cron_auto_compute_draft_batch_ir_actions_server
msgid ""
"Asset Compute Batch; Post draft batches with auto_compute set to True up to "
"today"
msgstr ""
"Lotto calcolo cespite; Inserire lotti bozza con auto_compute impostato a "
"True fino ad oggi"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__profile_id
msgid "Asset Profile"
msgstr "Profilo cespite"
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_line
msgid "Asset depreciation table line"
msgstr "Riga tabella ammortamenti cespite"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_attachment_count
msgid "Attachment Count"
msgstr "Conteggio allegati"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__auto_compute
msgid "Auto Compute"
msgstr "Calcolo automatico"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__auto_compute
msgid "Auto compute draft batches with 'Date' up to today, by cron job"
msgstr ""
"Calcola automaticamente lotti bozza con 'Data' fino ad oggi, da lavoro cron"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__batch_name
msgid "Batch Name"
msgstr "Nome lotto"
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.search_account_asset_compute_batch_filter
msgid "Batch Number"
msgstr "Numero lotto"
#. module: account_asset_compute_batch
#: model:ir.model.constraint,message:account_asset_compute_batch.constraint_account_asset_compute_batch_name_uniq
msgid "Batch name must be unique!"
msgstr "Il nome lotto deve essere univoco!"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__company_id
msgid "Company"
msgstr "Azienda"
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Compute"
msgstr "Calcola"
#. module: account_asset_compute_batch
#: model:ir.actions.act_window,name:account_asset_compute_batch.account_asset_compute_batch_action
#: model:ir.ui.menu,name:account_asset_compute_batch.account_asset_compute_batch_menu
msgid "Compute Asset Batch"
msgstr "Calcola lotto cespite"
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_compute
msgid "Compute Assets"
msgstr "Calcola ammortamenti"
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid "Compute Assets errors"
msgstr "Calcola errori cespiti"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__compute_batch_id
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_move_line__compute_batch_id
msgid "Compute Batch"
msgstr "Calcola lotto"
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_compute_batch
msgid "Compute Depreciation Batch"
msgstr "Calcola lotto ammortamento"
#. module: account_asset_compute_batch
#: model:ir.model.fields.selection,name:account_asset_compute_batch.selection__account_asset_compute_batch__state__computed
msgid "Computed"
msgstr "Calcolato"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__use_batch
msgid "Create Batch"
msgstr "Crea lotto"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__create_uid
msgid "Created by"
msgstr "Creato da"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__create_date
msgid "Created on"
msgstr "Creato il"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__currency_id
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__currency_id
msgid "Currency"
msgstr "Valuta"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__delay_post
msgid ""
"Dalay account posting of newly created journaly entries, by setting "
"auto_post='at_date', to be posted by cron job"
msgstr ""
"Ritarda la pubblicazione dell'account delle voci di diario appena create, "
"impostando auto_post='at_date', in modo che vengano pubblicate tramite cron "
"job"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__date_end
msgid "Date"
msgstr "Data"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__delay_compute
msgid "Delay Compute Asset"
msgstr "Ritarda calcolo cespite"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__delay_post
msgid "Delay Posting"
msgstr "Ritarda invio"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__depre_amount
msgid "Depreciation Amount"
msgstr "Valore ammortamento"
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_asset_compute_batch_profile_report
msgid "Depreciation Amount by Profile"
msgstr "Valore ammortamento per profilo"
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Depreciation By Profile"
msgstr "Ammortamento per profilo"
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Depreciations"
msgstr "Ammortamenti"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__description
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__description
msgid "Description"
msgstr "Descrizione"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__display_name
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: account_asset_compute_batch
#: model:ir.model.fields.selection,name:account_asset_compute_batch.selection__account_asset_compute_batch__state__draft
msgid "Draft"
msgstr "Bozza"
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid ""
"Error while processing batches %(batch_ref)s: \n"
"\n"
"%(tb)s"
msgstr ""
"Errore durante l'elaborazione dei lotti %(batch_ref)s:\n"
"\n"
"%(tb)s"
#. module: account_asset_compute_batch
#: model:ir.model.fields.selection,name:account_asset_compute_batch.selection__account_asset_compute_batch__state__exception
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Exception"
msgstr "Eccezione"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__note
msgid "Exception Error"
msgstr "Errore eccezione"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_follower_ids
msgid "Followers"
msgstr "Seguito da"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_partner_ids
msgid "Followers (Partners)"
msgstr "Seguito da (partner)"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_type_icon
msgid "Font awesome icon e.g. fa-tasks"
msgstr "Icona Font Awesome es. fa-tasks"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__has_message
msgid "Has Message"
msgstr "Ha un messaggio"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__id
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch_profile_report__id
msgid "ID"
msgstr "ID"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_icon
msgid "Icon"
msgstr "Icona"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_icon
msgid "Icon to indicate an exception activity."
msgstr "Icona per indicare un'attività eccezione."
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute__batch_name
msgid "If batch name is specified, computation will be tracked by a batch"
msgstr ""
"Se viene specificato il nome del lotto, il calcolo verrà tracciato da un "
"lotto"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction
msgid "If checked, new messages require your attention."
msgstr "Se selezionata, nuovi messaggi richiedono attenzione."
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error
msgid "If checked, some messages have a delivery error."
msgstr "Se selezionata, alcuni messaggi hanno un errore di consegna."
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_is_follower
msgid "Is Follower"
msgstr "Segue"
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_form
msgid "Journal Entries"
msgstr "Registrazioni contabili"
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"
#. module: account_asset_compute_batch
#: model:ir.model,name:account_asset_compute_batch.model_account_move_line
msgid "Journal Item"
msgstr "Movimento contabile"
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid "Journal Items"
msgstr "Movimenti contabili"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error
msgid "Message Delivery error"
msgstr "Errore di consegna messaggio"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_ids
msgid "Messages"
msgstr "Messaggi"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__move_line_ids
msgid "Move Line"
msgstr "Riga movimento"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__my_activity_date_deadline
msgid "My Activity Deadline"
msgstr "Scadenza mia attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__name
msgid "Name"
msgstr "Nome"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_date_deadline
msgid "Next Activity Deadline"
msgstr "Scadenza prossima attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_summary
msgid "Next Activity Summary"
msgstr "Riepilogo prossima attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_type_id
msgid "Next Activity Type"
msgstr "Tipo prossima attività"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction_counter
msgid "Number of Actions"
msgstr "Numero di azioni"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error_counter
msgid "Number of errors"
msgstr "Numero di errori"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_needaction_counter
msgid "Number of messages requiring action"
msgstr "Numero di messaggi che richiedono un'azione"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__message_has_error_counter
msgid "Number of messages with delivery error"
msgstr "Numero di messaggi con errore di consegna"
#. module: account_asset_compute_batch
#. odoo-python
#: code:addons/account_asset_compute_batch/models/account_asset_compute_batch.py:0
msgid "Only draft batch can be deleted!"
msgstr "Solo il lotto in bozza può essere cancellato!"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__profile_report
msgid "Profile Report"
msgstr "Resoconto profilo"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute__profile_ids
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__profile_ids
msgid "Profiles"
msgstr "Profili"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__activity_user_id
msgid "Responsible User"
msgstr "Utente responsabile"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__profile_ids
msgid "Selected asset to run depreciation. Run all profiles if left blank."
msgstr ""
"Cespite selezionato per eseguire l'ammortamento. Se il campo è vuoto, "
"eseguire tutti i profili."
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__state
msgid "State"
msgstr "Stato"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_state
msgid ""
"Status based on activities\n"
"Overdue: Due date is already passed\n"
"Today: Activity date is today\n"
"Planned: Future activities."
msgstr ""
"Stato in base alle attività\n"
"Scaduto: la data richiesta è trascorsa\n"
"Oggi: la data attività è oggi\n"
"Pianificato: attività future."
#. module: account_asset_compute_batch
#: model_terms:ir.ui.view,arch_db:account_asset_compute_batch.view_account_asset_compute_batch_list
msgid "Total"
msgstr "Totale"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__activity_exception_decoration
msgid "Type of the exception activity on record."
msgstr "Tipo di attività eccezione sul record."
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute__use_batch
msgid "Use batch opton"
msgstr "Usa opzione lotto"
#. module: account_asset_compute_batch
#: model:ir.model.fields,field_description:account_asset_compute_batch.field_account_asset_compute_batch__website_message_ids
msgid "Website Messages"
msgstr "Messaggi sito web"
#. module: account_asset_compute_batch
#: model:ir.model.fields,help:account_asset_compute_batch.field_account_asset_compute_batch__website_message_ids
msgid "Website communication history"
msgstr "Cronologia comunicazioni sito web"
#~ msgid "SMS Delivery error"
#~ msgstr "Errore consegna SMS"

View File

@@ -0,0 +1,3 @@
from . import account_asset_line
from . import account_move
from . import account_asset_compute_batch

View File

@@ -0,0 +1,239 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from sys import exc_info
from traceback import format_exception
from odoo import api, fields, models
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
class AssetComputeBatch(models.Model):
_name = "account.asset.compute.batch"
_inherit = ["mail.thread", "mail.activity.mixin"]
_description = "Compute Depreciation Batch"
_check_company_auto = True
name = fields.Char()
description = fields.Char()
date_end = fields.Date(
string="Date",
default=fields.Date.today,
help="All depreciation lines prior to this date will be computed",
)
note = fields.Text(string="Exception Error")
profile_ids = fields.Many2many(
comodel_name="account.asset.profile",
string="Profiles",
help="Selected asset to run depreciation. Run all profiles if left blank.",
)
company_id = fields.Many2one(
comodel_name="res.company",
default=lambda self: self.env.company,
)
delay_post = fields.Boolean(
string="Delay Posting",
help="Dalay account posting of newly created journaly entries, "
"by setting auto_post='at_date', to be posted by cron job",
)
auto_compute = fields.Boolean(
help="Auto compute draft batches with 'Date' up to today, by cron job",
)
move_line_ids = fields.One2many(
comodel_name="account.move.line",
inverse_name="compute_batch_id",
readonly=True,
)
state = fields.Selection(
selection=[
("draft", "Draft"),
("computed", "Computed"),
("exception", "Exception"),
],
default="draft",
tracking=True,
index=True,
required=True,
readonly=True,
)
profile_report = fields.One2many(
comodel_name="account.asset.compute.batch.profile.report",
inverse_name="compute_batch_id",
)
currency_id = fields.Many2one(
comodel_name="res.currency",
default=lambda self: self.env.company.currency_id,
)
depre_amount = fields.Monetary(
string="Depreciation Amount",
compute="_compute_depre_amount",
)
_sql_constraints = [
("name_uniq", "UNIQUE(name)", "Batch name must be unique!"),
]
@api.depends("state")
def _compute_depre_amount(self):
res = self.env["account.move.line"].read_group(
domain=[("compute_batch_id", "in", self.ids)],
fields=["compute_batch_id", "debit"],
groupby=["compute_batch_id"],
)
res = {x["compute_batch_id"][0]: x["debit"] for x in res}
for rec in self:
rec.depre_amount = res.get(rec.id)
def unlink(self):
if self.filtered(lambda batch: batch.state != "draft"):
raise ValidationError(self.env._("Only draft batch can be deleted!"))
return super().unlink()
def action_compute(self):
asset_model = self.env["account.asset"]
for batch in self:
domain = [
("state", "=", "open"),
("profile_id", "in", batch.profile_ids.ids),
]
assets = asset_model.search(domain)
if not assets:
continue
created_move_ids, error_log = assets.with_context(
compute_batch_id=batch.id,
delay_post=batch.delay_post,
)._compute_entries(self.date_end, check_triggers=True)
if error_log:
batch.write(
{
"note": self.env._("Compute Assets errors") + ":\n" + error_log,
"state": "exception",
}
)
else:
batch.write({"state": "computed"})
def open_move_lines(self):
self.ensure_one()
action = {
"name": self.env._("Journal Items"),
"view_mode": "list,form",
"res_model": "account.move.line",
"type": "ir.actions.act_window",
"context": {"search_default_group_by_account": True},
"domain": [("id", "in", self.move_line_ids.ids)],
}
return action
def open_moves(self):
self.ensure_one()
action = {
"name": self.env._("Journal Entries"),
"view_mode": "list,form",
"res_model": "account.move",
"type": "ir.actions.act_window",
"domain": [("id", "in", self.move_line_ids.mapped("move_id").ids)],
"search_view_id": [
self.env.ref("account.view_account_move_filter").id,
"search",
],
"views": [
[self.env.ref("account.view_move_tree").id, "list"],
[self.env.ref("account.view_move_form").id, "form"],
],
}
return action
@api.model
def _autocompute_draft_batches(self):
"""This method is called from a cron job.
It is used to auto compute account.asset.compute.batch with auto_compute=True
"""
records = self.search(
[
("state", "=", "draft"),
("date_end", "<=", fields.Date.context_today(self)),
("auto_compute", "=", True),
]
)
for ids in self.env.cr.split_for_in_conditions(records.ids, size=1000):
batches = self.browse(ids)
try:
with self.env.cr.savepoint():
batches.action_compute()
except Exception:
exc_info()[0]
tb = "".join(format_exception(*exc_info()))
batch_ref = ", ".join(batches.mapped("name"))
error_msg = self.env._(
"Error while processing batches %(batch_ref)s: \n\n%(tb)s"
) % {"batch_ref": batch_ref, "tb": tb}
_logger.error("%s, %s", self._name, error_msg)
class AccountAssetComputeBatchProfileReport(models.Model):
_name = "account.asset.compute.batch.profile.report"
_description = "Depreciation Amount by Profile"
_auto = False
_order = "profile_id desc"
compute_batch_id = fields.Many2one(
comodel_name="account.asset.compute.batch",
readonly=True,
)
profile_id = fields.Many2one(
string="Asset Profile",
comodel_name="account.asset.profile",
readonly=True,
)
currency_id = fields.Many2one(
comodel_name="res.currency",
readonly=True,
)
amount = fields.Monetary(
readonly=True,
)
@property
def _table_query(self):
"""
Build SQL query for depreciation amount by profile report.
"""
return f"{self._select()} {self._from()} {self._where()} {self._group_by()}"
@api.model
def _select(self):
return """
SELECT
min(ml.id) as id,
ml.compute_batch_id,
p.id as profile_id,
ml.currency_id,
sum(ml.debit) as amount
"""
@api.model
def _from(self):
return """
FROM account_move_line ml
JOIN account_asset a on a.id = ml.asset_id
JOIN account_asset_profile p on p.id = a.profile_id
"""
@api.model
def _where(self):
return """
WHERE
ml.compute_batch_id IS NOT NULL
"""
@api.model
def _group_by(self):
return """
GROUP BY
ml.compute_batch_id,
p.id,
ml.currency_id
"""

View File

@@ -0,0 +1,16 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountAssetLine(models.Model):
_inherit = "account.asset.line"
def _setup_move_line_data(self, depreciation_date, account, ml_type, move):
move_line_data = super()._setup_move_line_data(
depreciation_date, account, ml_type, move
)
if self.env.context.get("compute_batch_id"):
move_line_data["compute_batch_id"] = self.env.context["compute_batch_id"]
return move_line_data

View File

@@ -0,0 +1,25 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountMove(models.Model):
_inherit = "account.move"
def action_post(self):
if self.env.context.get("delay_post"):
self.write({"auto_post": "at_date"})
return False
return super().action_post()
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
compute_batch_id = fields.Many2one(
comodel_name="account.asset.compute.batch",
index=True,
ondelete="set null",
readonly=True,
)

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,3 @@
- [Ecosoft](http://ecosoft.co.th):
- Kitti U. \<<kittiu@ecosoft.co.th>\>
- Pimolnat Suntian \<<pimolnats@ecosoft.co.th>\>

View File

@@ -0,0 +1,2 @@
This module extend existing "Compute Asset" feature by allowing to
create an Compute Asset Batch (record) to track the computation.

View File

@@ -0,0 +1,15 @@
There are 2 ways to create "Compute Asset Batch"
1. On the Compute Assets wizards, choose "Create Batch" option,
1.1 Type in batch name and description. 1.2 Select asset profiles,
to limit only some profiles to get computed. 1.3 Option to "Delay
Compute Asset", will only create Batch record for user to execute it
later.
2. Create Compute Asset Batch directly
2.1 Select date for depreciation 2.2 Type in batch name and
descripton 2.3 Select asset profiles, to limit only some profiles to
get computed. 2.4 Option to "Auto Compute" if you want to compute
this batch by cron job. 2.4 Option to "Delay Post" if you want to
post journal entry by cron job. 2.5 Click "Compute" button to
compute asset.

View File

@@ -0,0 +1,10 @@
<odoo noupdate="1">
<record id="account_asset_compute_batch_multi_company_rule" model="ir.rule">
<field name="name">Asset Compute Batch multi-company</field>
<field name="model_id" ref="model_account_asset_compute_batch" />
<field eval="True" name="global" />
<field
name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record>
</odoo>

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_asset_compute_batch_invoice,account.asset.compute.batch,model_account_asset_compute_batch,account.group_account_invoice,1,1,1,1
access_account_asset_compute_batch_profile_report,access_account_asset_compute_batch_profile_report,model_account_asset_compute_batch_profile_report,base.group_user,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_asset_compute_batch_invoice account.asset.compute.batch model_account_asset_compute_batch account.group_account_invoice 1 1 1 1
3 access_account_asset_compute_batch_profile_report access_account_asset_compute_batch_profile_report model_account_asset_compute_batch_profile_report base.group_user 1 0 0 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,459 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document">
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="assets-compute-depre-in-batch">
<h1>Assets - Compute Depre. in Batch</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d788179ff471c95947022c05a6d6498a2ac1c9c6b222fcdf63ac01bfa5d798ec
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/account-financial-tools/tree/18.0/account_asset_compute_batch"><img alt="OCA/account-financial-tools" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-tools-18-0/account-financial-tools-18-0-account_asset_compute_batch"><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/account-financial-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extend existing “Compute Asset” feature by allowing to
create an Compute Asset Batch (record) to track the computation.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<p>There are 2 ways to create “Compute Asset Batch”</p>
<ol class="arabic">
<li><div class="first line-block">
<div class="line">On the Compute Assets wizards, choose “Create Batch” option,</div>
<div class="line">1.1 Type in batch name and description. 1.2 Select asset profiles,
to limit only some profiles to get computed. 1.3 Option to “Delay
Compute Asset”, will only create Batch record for user to execute
it later.</div>
</div>
</li>
<li><div class="first line-block">
<div class="line">Create Compute Asset Batch directly</div>
<div class="line">2.1 Select date for depreciation 2.2 Type in batch name and
descripton 2.3 Select asset profiles, to limit only some profiles
to get computed. 2.4 Option to “Auto Compute” if you want to
compute this batch by cron job. 2.4 Option to “Delay Post” if you
want to post journal entry by cron job. 2.5 Click “Compute” button
to compute asset.</div>
</div>
</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-tools/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_asset_compute_batch%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<ul class="simple">
<li>Ecosoft</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<ul class="simple">
<li><a class="reference external" href="http://ecosoft.co.th">Ecosoft</a>:<ul>
<li>Kitti U. &lt;<a class="reference external" href="mailto:kittiu&#64;ecosoft.co.th">kittiu&#64;ecosoft.co.th</a>&gt;</li>
<li>Pimolnat Suntian &lt;<a class="reference external" href="mailto:pimolnats&#64;ecosoft.co.th">pimolnats&#64;ecosoft.co.th</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_compute_batch">OCA/account-financial-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
from . import test_account_asset_compute_batch

View File

@@ -0,0 +1,160 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import time
from freezegun import freeze_time
from odoo.tests import Form, tagged
from odoo.addons.account_asset_management.tests.test_account_asset_management import (
TestAssetManagement,
)
@tagged("post_install", "-at_install")
class TestAssetComputeBatch(TestAssetManagement):
@classmethod
def setUpClass(cls):
super().setUpClass()
# Create 3 assets from 2 profiles
cls.ict0 = cls.asset_model.create(
{
"state": "draft",
"method_time": "year",
"method_number": 3,
"method_period": "year",
"name": "Laptop",
"code": "PI00101",
"purchase_value": 1500.0,
"profile_id": cls.ict3Y.id,
"date_start": time.strftime("2000-01-01"),
}
)
cls.ict1 = cls.asset_model.create(
{
"state": "draft",
"method_time": "year",
"method_number": 3,
"method_period": "year",
"name": "Monitor",
"code": "PI00102",
"purchase_value": 2100.0,
"profile_id": cls.ict3Y.id,
"date_start": time.strftime("2000-01-01"),
}
)
# 2nd asset
cls.vehicle0 = cls.asset_model.create(
{
"state": "draft",
"method_time": "year",
"method_number": 5,
"method_period": "year",
"name": "CEO's Car",
"purchase_value": 12000.0,
"salvage_value": 2000.0,
"profile_id": cls.car5y.id,
"date_start": time.strftime("2000-01-01"),
}
)
def _create_compute_wizard(self, use_batch=False, delay_compute=False):
with Form(self.env["account.asset.compute"]) as f:
f.use_batch = use_batch
f.batch_name = "Test Batch"
f.description = "Compute asset with 2 profiles"
f.profile_ids.add(self.ict3Y)
f.profile_ids.add(self.car5y)
f.delay_compute = delay_compute
wiz = f.save()
return wiz
@freeze_time("2000-12-31")
def test_01_asset_compute_batch_normal(self):
# Confirm 3 assets
self.ict0.validate()
self.assertEqual(self.ict0.depreciation_line_ids[1].amount, 500)
self.ict1.validate()
self.assertEqual(self.ict1.depreciation_line_ids[1].amount, 700)
self.vehicle0.validate()
self.assertEqual(self.vehicle0.depreciation_line_ids[1].amount, 2000)
# Compute Asset, no delay
wiz = self._create_compute_wizard(use_batch=True)
res = wiz.asset_compute()
batch = self.env["account.asset.compute.batch"].browse(res["res_id"])
self.assertEqual(batch.state, "computed")
self.assertEqual(batch.depre_amount, 3200)
# Test summary amount by profile
batch.invalidate_model()
self.assertEqual(
{x.profile_id: x.amount for x in batch.profile_report},
{self.ict3Y: 1200, self.car5y: 2000},
)
# Test view moves
# 3 account.move
res = batch.open_moves()
self.assertEqual(len(res["domain"][0][2]), 3)
# 6 account.move.line
res = batch.open_move_lines()
self.assertEqual(len(res["domain"][0][2]), 6)
@freeze_time("2000-12-31")
def test_02_asset_compute_batch_delay_compute(self):
# Confirm 2 assets
self.ict0.validate()
self.assertEqual(self.ict0.depreciation_line_ids[1].amount, 500)
self.vehicle0.validate()
self.assertEqual(self.vehicle0.depreciation_line_ids[1].amount, 2000)
# Compute Asset, with delay
wiz = self._create_compute_wizard(use_batch=True, delay_compute=True)
res = wiz.asset_compute()
batch = self.env["account.asset.compute.batch"].browse(res["res_id"])
self.assertEqual(batch.state, "draft")
self.assertEqual(batch.depre_amount, 0)
# Batch is still draft, require to click compute
batch.action_compute()
self.assertEqual(batch.state, "computed")
self.assertEqual(batch.depre_amount, 2500)
@freeze_time("2000-12-31")
def test_03_asset_compute_batch_delay_compute_delay_post(self):
# Confirm 2 assets
self.ict0.validate()
self.assertEqual(self.ict0.depreciation_line_ids[1].amount, 500)
self.vehicle0.validate()
self.assertEqual(self.vehicle0.depreciation_line_ids[1].amount, 2000)
# Compute Asset, with delay
wiz = self._create_compute_wizard(use_batch=True, delay_compute=True)
res = wiz.asset_compute()
batch = self.env["account.asset.compute.batch"].browse(res["res_id"])
self.assertEqual(batch.state, "draft")
self.assertEqual(batch.depre_amount, 0)
batch.delay_post = True
# Batch is still draft, require to click compute
batch.action_compute()
self.assertEqual(batch.state, "computed")
self.assertEqual(batch.depre_amount, 2500)
# All account.move is flag as auto_post = 'at_date', and state in draft
for move in batch.move_line_ids.mapped("move_id"):
self.assertEqual(move.auto_post, "at_date")
self.assertEqual(move.state, "draft")
@freeze_time("2000-12-31")
def test_04_asset_compute_batch_auto_compute(self):
# Confirm 2 assets
self.ict0.validate()
self.assertEqual(self.ict0.depreciation_line_ids[1].amount, 500)
self.vehicle0.validate()
self.assertEqual(self.vehicle0.depreciation_line_ids[1].amount, 2000)
# Compute Asset, with delay
wiz = self._create_compute_wizard(use_batch=True, delay_compute=True)
res = wiz.asset_compute()
batch = self.env["account.asset.compute.batch"].browse(res["res_id"])
self.assertEqual(batch.state, "draft")
self.assertEqual(batch.depre_amount, 0)
batch.auto_compute = True
# Batch will be posted by cron job
batch._autocompute_draft_batches()
self.assertEqual(batch.state, "computed")
self.assertEqual(batch.depre_amount, 2500)

View File

@@ -0,0 +1,140 @@
<odoo>
<record id="view_account_asset_compute_batch_form" model="ir.ui.view">
<field name="name">account.asset.compute.batch.form</field>
<field name="model">account.asset.compute.batch</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<form string="Asset Compute Batch">
<header>
<button
name="action_compute"
type="object"
string="Compute"
invisible="state != 'draft'"
class="oe_highlight"
/>
<field
name="state"
widget="statusbar"
statusbar_visible="draft,computed"
/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button
name="open_moves"
icon="fa-bars"
class="oe_stat_button"
string="Journal Entries"
type="object"
/>
<button
name="open_move_lines"
icon="fa-bars"
class="oe_stat_button"
string="Depreciations"
type="object"
/>
</div>
<div class="oe_title">
<h1>
<field name="name" required="1" readonly="state != 'draft'" />
</h1>
</div>
<group name="main_group">
<group>
<field name="description" required="1" readonly="state != 'draft'" />
<field name="date_end" required="1" readonly="state != 'draft'" />
<field name="auto_compute" readonly="state != 'draft'" />
<field name="delay_post" readonly="state != 'draft'" />
</group>
<group>
<field
name="company_id"
groups="base.group_multi_company"
readonly="1"
/>
<field name="profile_ids" widget="many2many_tags" required="1" readonly="state != 'draft'" />
</group>
</group>
<notebook>
<page string="Depreciation By Profile" name="profile_report">
<field name="profile_report" readonly="1">
<list>
<field name="profile_id" />
<field name="currency_id" column_invisible="1" />
<field name="amount" />
</list>
</field>
<group class="oe_subtotal_footer oe_right">
<field name="currency_id" invisible="1" />
<div class="oe_subtotal_footer_separator oe_inline">
<label for="depre_amount" />
</div>
<field
name="depre_amount"
nolabel="1"
class="oe_subtotal_footer_separator"
/>
</group>
</page>
<page string="Exception" name="exception" invisible="state != 'exception'">
<field name="note" readonly="1" />
</page>
</notebook>
</sheet>
<chatter />
</form>
</field>
</record>
<record id="view_account_asset_compute_batch_list" model="ir.ui.view">
<field name="name">account.asset.compute.batch.list</field>
<field name="model">account.asset.compute.batch</field>
<field name="arch" type="xml">
<list>
<field name="name" />
<field name="description" />
<field name="date_end" />
<field name="profile_ids" widget="many2many_tags" optional="hide" />
<field name="depre_amount" sum="Total" />
<field
name="state"
widget="badge"
decoration-info="state == 'draft'"
decoration-success="state == 'computed'"
decoration-danger="state == 'exception'"
/>
<field name="company_id" groups="base.group_multi_company" />
</list>
</field>
</record>
<record id="search_account_asset_compute_batch_filter" model="ir.ui.view">
<field name="name">search.account.asset.compute.batch.filter</field>
<field name="model">account.asset.compute.batch</field>
<field name="arch" type="xml">
<search string="Asset Compute Batch">
<field
name="name"
string="Batch Number"
filter_domain="[('name', 'ilike', self)]"
/>
</search>
</field>
</record>
<record id="account_asset_compute_batch_action" model="ir.actions.act_window">
<field name="name">Compute Asset Batch</field>
<field name="res_model">account.asset.compute.batch</field>
<field name="view_mode">list,form</field>
<field name="view_id" ref="view_account_asset_compute_batch_list" />
<field name="search_view_id" ref="search_account_asset_compute_batch_filter" />
</record>
<menuitem
id="account_asset_compute_batch_menu"
action="account_asset_compute_batch_action"
parent="account_asset_management.menu_finance_assets"
sequence="200"
/>
</odoo>

View File

@@ -0,0 +1 @@
from . import account_asset_compute

View File

@@ -0,0 +1,44 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountAssetCompute(models.TransientModel):
_inherit = "account.asset.compute"
use_batch = fields.Boolean(string="Create Batch", help="Use batch opton")
batch_name = fields.Char(
help="If batch name is specified, computation will be tracked by a batch",
)
description = fields.Char()
profile_ids = fields.Many2many(
comodel_name="account.asset.profile",
string="Profiles",
)
delay_compute = fields.Boolean(string="Delay Compute Asset")
def _prepare_asset_compute_batch(self):
return {
"date_end": self.date_end,
"name": self.batch_name,
"description": self.description,
"profile_ids": [(4, profile.id) for profile in self.profile_ids],
}
def asset_compute(self):
if not self.use_batch:
return super().asset_compute()
batch = self.env["account.asset.compute.batch"].create(
self._prepare_asset_compute_batch()
)
if not self.delay_compute:
batch.action_compute()
return {
"name": self.env._("Asset Compute Batch"),
"type": "ir.actions.act_window",
"view_mode": "form",
"res_model": "account.asset.compute.batch",
"res_id": batch.id,
}

View File

@@ -0,0 +1,40 @@
<odoo>
<record id="account_asset_compute_view_form" model="ir.ui.view">
<field name="name">account.asset.compute</field>
<field name="model">account.asset.compute</field>
<field
name="inherit_id"
ref="account_asset_management.account_asset_compute_view_form"
/>
<field name="arch" type="xml">
<group position="after">
<group>
<group>
<field name="use_batch" widget="boolean_toggle" />
<field
name="batch_name"
invisible="not use_batch"
required="use_batch"
/>
<field
name="description"
invisible="not use_batch"
required="use_batch"
/>
<field
name="delay_compute"
invisible="not use_batch"
/>
</group>
<group>
<field
name="profile_ids"
invisible="not use_batch"
widget="many2many_tags"
/>
</group>
</group>
</group>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,117 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association
===================
Asset Force Account
===================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3e14f5186e43cd32b87daa834fc648444b45cb582b9167f9cb9acf03ec5ce22f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/license-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%2Faccount--financial--tools-lightgray.png?logo=github
:target: https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_force_account
:alt: OCA/account-financial-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-tools-18-0/account-financial-tools-18-0-account_asset_force_account
: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/account-financial-tools&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module enables the ability to override default accounts directly
from the asset form.
**Table of contents**
.. contents::
:local:
Usage
=====
1. | **Create an Asset Profile**:
| Navigate to **Configuration -> Asset Profiles** and create a new
profile.
2. **Create a Vendor Bill**:
- Go to **Vendors -> Bills** and create a new bill.
- Add a product and select the asset profile you just created.
- The Asset Account will be derived from the profile or can be
manually updated at this step (the invoice account will be used as
the Asset Account).
- Set the product price and confirm the bill.
3. | **Asset Creation**:
| Once the bill is confirmed, the asset will be created and populated
with the associated accounts. You can now manually adjust the
**Depreciation Account** and **Depreciation Expense Account** if
necessary.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/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/account-financial-tools/issues/new?body=module:%20account_asset_force_account%0Aversion:%2018.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
-------
* Bernat Obrador (APSL-Nagarro)
Contributors
------------
- `APSL-Nagarro <https://apsl.tech>`__:
- Bernat Obrador <bobrador@apsl.net>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
- Bhavesh Heliconia
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.
.. |maintainer-BernatObrador| image:: https://github.com/BernatObrador.png?size=40px
:target: https://github.com/BernatObrador
:alt: BernatObrador
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-BernatObrador|
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_force_account>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models

View File

@@ -0,0 +1,19 @@
# Copyright 2024 Bernat Obrador(APSL-Nagarro)<bobrador@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Asset Force Account",
"version": "18.0.1.0.0",
"website": "https://github.com/OCA/account-financial-tools",
"author": "Bernat Obrador (APSL-Nagarro), Odoo Community Association (OCA)",
"category": "Accounting & Finance",
"maintainers": ["BernatObrador"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"account_asset_management",
],
"data": [
"views/account_asset.xml",
],
}

View File

@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_asset_force_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset
msgid "Asset"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_asset_id
msgid "Asset Account"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset_line
msgid "Asset depreciation table line"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "Depreciation Account"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "Depreciation Expense Account"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_move_line
msgid "Journal Item"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "The account used to record depreciation for the asset."
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "The account used to record the expense of the depreciation."
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_asset_id
msgid "The account used to record the value of the asset."
msgstr ""

View File

@@ -0,0 +1,62 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_asset_force_accounts
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-18 09:41+0000\n"
"PO-Revision-Date: 2024-09-18 09:41+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset
msgid "Asset"
msgstr "Actiu"
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_asset_id
msgid "Asset Account"
msgstr "Compte de l'actiu"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset_line
msgid "Asset depreciation table line"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "Depreciation Account"
msgstr "Compte d'amortització"
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "Depreciation Expense Account"
msgstr "Compte de despeses d'amortització"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_move_line
msgid "Journal Item"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "The account used to record depreciation for the asset."
msgstr "El compte utilitzat per registrar l'amortització de l'actiu."
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "The account used to record the expense of the depreciation."
msgstr "El compte utilitzat per registrar la despesa per amortització."
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_asset_id
msgid "The account used to record the value of the asset."
msgstr "El compte utilitzat per registrar el valor de l'actiu."

View File

@@ -0,0 +1,62 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_asset_force_accounts
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-18 09:43+0000\n"
"PO-Revision-Date: 2024-09-18 09:43+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset
msgid "Asset"
msgstr "Activo"
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_asset_id
msgid "Asset Account"
msgstr "Cuenta de activo"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset_line
msgid "Asset depreciation table line"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "Depreciation Account"
msgstr "Cuenta de amortización"
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "Depreciation Expense Account"
msgstr "Cuenta de gastos de amortización"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_move_line
msgid "Journal Item"
msgstr ""
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "The account used to record depreciation for the asset."
msgstr "La cuenta utilizada para registrar la depreciación del activo."
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "The account used to record the expense of the depreciation."
msgstr "La cuenta utilizada para registrar el gasto por depreciación."
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_asset_id
msgid "The account used to record the value of the asset."
msgstr "La cuenta utilizada para registrar el valor del activo."

View File

@@ -0,0 +1,62 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_asset_force_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-09-28 17:06+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset
msgid "Asset"
msgstr "Cespite"
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_asset_id
msgid "Asset Account"
msgstr "Conto cespite"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_asset_line
msgid "Asset depreciation table line"
msgstr "Riga tabella ammortamenti cespite"
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "Depreciation Account"
msgstr "Conto amm.to"
#. module: account_asset_force_account
#: model:ir.model.fields,field_description:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "Depreciation Expense Account"
msgstr "Conto spese amm.to"
#. module: account_asset_force_account
#: model:ir.model,name:account_asset_force_account.model_account_move_line
msgid "Journal Item"
msgstr "Movimento contabile"
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_depreciation_id
msgid "The account used to record depreciation for the asset."
msgstr "Il conto utilizzato per registrare l'ammortamento per un cespite."
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_expense_depreciation_id
msgid "The account used to record the expense of the depreciation."
msgstr "Il conto utilizzato per registrare le spese dell'ammortamento."
#. module: account_asset_force_account
#: model:ir.model.fields,help:account_asset_force_account.field_account_asset__account_asset_id
msgid "The account used to record the value of the asset."
msgstr "Il conto utilizzato per registrare il valore del cespite."

View File

@@ -0,0 +1,3 @@
from . import account_asset
from . import account_asset_line
from . import account_move_line

View File

@@ -0,0 +1,72 @@
# Copyright 2024 Bernat Obrador(APSL-Nagarro)<bobrador@apsl.net>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountAsset(models.Model):
_inherit = "account.asset"
account_asset_id = fields.Many2one(
comodel_name="account.account",
string="Asset Account",
compute="_compute_account_asset_id",
help="The account used to record the value of the asset.",
store=True,
)
account_depreciation_id = fields.Many2one(
comodel_name="account.account",
string="Depreciation Account",
domain="[('deprecated', '=', False), ('company_ids', '=', company_id)]",
help="The account used to record depreciation for the asset.",
required=True,
)
account_expense_depreciation_id = fields.Many2one(
comodel_name="account.account",
string="Depreciation Expense Account",
domain="[('deprecated', '=', False), ('company_ids', '=', company_id)]",
help="The account used to record the expense of the depreciation.",
required=True,
)
@api.onchange("profile_id")
def _onchange_profile_id(self):
# To avoid changes when the asset is confirmed
if self.profile_id and self.state == "draft":
self.account_depreciation_id = self.profile_id.account_depreciation_id
self.account_expense_depreciation_id = (
self.profile_id.account_expense_depreciation_id
)
self._compute_account_asset_id()
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if vals.get("profile_id"):
profile = self.env["account.asset.profile"].browse(vals["profile_id"])
if not vals.get("account_depreciation_id"):
vals["account_depreciation_id"] = profile.account_depreciation_id.id
if not vals.get("account_expense_depreciation_id"):
vals["account_expense_depreciation_id"] = (
profile.account_expense_depreciation_id.id
)
return super().create(vals_list)
@api.depends("account_move_line_ids", "profile_id")
def _compute_account_asset_id(self):
for record in self:
# Cannot update the account_asset_id if the asset is not in draft state
if record.state != "draft":
continue
# Looks if the asset comes from an invoice, if so, takes the account
# from the invoice
if len(record.account_move_line_ids.account_id) != 0:
invoice_line = record.account_move_line_ids.filtered(
lambda line: line.move_id.move_type == "in_invoice"
)
if invoice_line:
record.account_asset_id = invoice_line.account_id
continue
# If not, takes the account from the profile
record.account_asset_id = record.profile_id.account_asset_id

View File

@@ -0,0 +1,17 @@
# Copyright 2024 Bernat Obrador(APSL-Nagarro)<bobrador@apsl.net>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountAssetLine(models.Model):
_inherit = "account.asset.line"
def _setup_move_line_data(self, depreciation_date, account, ml_type, move):
res = super()._setup_move_line_data(depreciation_date, account, ml_type, move)
asset = self.asset_id
if ml_type == "depreciation" and asset.account_depreciation_id:
res["account_id"] = asset.account_depreciation_id.id
if ml_type == "expense" and asset.account_expense_depreciation_id:
res["account_id"] = asset.account_expense_depreciation_id.id
return res

View File

@@ -0,0 +1,13 @@
# Copyright 2024 Bernat Obrador(APSL-Nagarro)<bobrador@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
@api.onchange("asset_profile_id")
def _onchange_asset_profile_id(self):
if self.account_id and self.account_id.account_type == "asset_fixed":
return
super()._onchange_asset_profile_id()

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,4 @@
- [APSL-Nagarro](<https://apsl.tech>):
- Bernat Obrador \<<bobrador@apsl.net>\>
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia

View File

@@ -0,0 +1 @@
This module enables the ability to override default accounts directly from the asset form.

View File

@@ -0,0 +1,11 @@
1. **Create an Asset Profile**:
Navigate to **Configuration -> Asset Profiles** and create a new profile.
2. **Create a Vendor Bill**:
- Go to **Vendors -> Bills** and create a new bill.
- Add a product and select the asset profile you just created.
- The Asset Account will be derived from the profile or can be manually updated at this step (the invoice account will be used as the Asset Account).
- Set the product price and confirm the bill.
3. **Asset Creation**:
Once the bill is confirmed, the asset will be created and populated with the associated accounts. You can now manually adjust the **Depreciation Account** and **Depreciation Expense Account** if necessary.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -0,0 +1,469 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document">
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="asset-force-account">
<h1>Asset Force Account</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3e14f5186e43cd32b87daa834fc648444b45cb582b9167f9cb9acf03ec5ce22f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/account-financial-tools/tree/18.0/account_asset_force_account"><img alt="OCA/account-financial-tools" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-tools-18-0/account-financial-tools-18-0-account_asset_force_account"><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/account-financial-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module enables the ability to override default accounts directly
from the asset form.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<ol class="arabic">
<li><div class="first line-block">
<div class="line"><strong>Create an Asset Profile</strong>:</div>
<div class="line">Navigate to <strong>Configuration -&gt; Asset Profiles</strong> and create a new
profile.</div>
</div>
</li>
<li><p class="first"><strong>Create a Vendor Bill</strong>:</p>
<ul class="simple">
<li>Go to <strong>Vendors -&gt; Bills</strong> and create a new bill.</li>
<li>Add a product and select the asset profile you just created.</li>
<li>The Asset Account will be derived from the profile or can be
manually updated at this step (the invoice account will be used as
the Asset Account).</li>
<li>Set the product price and confirm the bill.</li>
</ul>
</li>
<li><div class="first line-block">
<div class="line"><strong>Asset Creation</strong>:</div>
<div class="line">Once the bill is confirmed, the asset will be created and populated
with the associated accounts. You can now manually adjust the
<strong>Depreciation Account</strong> and <strong>Depreciation Expense Account</strong> if
necessary.</div>
</div>
</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-tools/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_asset_force_account%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<ul class="simple">
<li>Bernat Obrador (APSL-Nagarro)</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://apsl.tech">APSL-Nagarro</a>:<ul>
<li>Bernat Obrador &lt;<a class="reference external" href="mailto:bobrador&#64;apsl.net">bobrador&#64;apsl.net</a>&gt;</li>
</ul>
</li>
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
<li>Bhavesh Heliconia</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/BernatObrador"><img alt="BernatObrador" src="https://github.com/BernatObrador.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_force_account">OCA/account-financial-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
from . import test_account_asset_management_force_account

View File

@@ -0,0 +1,240 @@
# Copyright 2024 Bernat Obrador(APSL-Nagarro)<bobrador@apsl.net>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import time
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged("post_install", "-at_install")
class TestAssetManagement(AccountTestInvoicingCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.asset_model = cls.env["account.asset"]
cls.asset_profile_model = cls.env["account.asset.profile"]
cls.account_depreciation_car = cls.env["account.account"].create(
{
"name": "Fixed Asset - Vehicle",
"code": "151001",
"account_type": "asset_fixed",
}
)
cls.account_expense_laptop = cls.env["account.account"].create(
{
"name": "Depreciation Expense Account - Laptop",
"code": "600011",
"account_type": "expense",
}
)
# Asset Profile 1
cls.ict3Y = cls.asset_profile_model.create(
{
"account_expense_depreciation_id": cls.company_data[
"default_account_expense"
].id,
"account_asset_id": cls.company_data["default_account_assets"].id,
"account_depreciation_id": cls.company_data[
"default_account_assets"
].id,
"journal_id": cls.company_data["default_journal_purchase"].id,
"name": "Hardware - 3 Years",
"method_time": "year",
"method_number": 3,
"method_period": "year",
}
)
# Asset Profile 2
cls.car5y = cls.asset_profile_model.create(
{
"account_expense_depreciation_id": cls.company_data[
"default_account_expense"
].id,
"account_asset_id": cls.company_data["default_account_assets"].id,
"account_depreciation_id": cls.company_data[
"default_account_assets"
].id,
"journal_id": cls.company_data["default_journal_purchase"].id,
"name": "Cars - 5 Years",
"method_time": "year",
"method_number": 5,
"method_period": "year",
}
)
def test_change_asset_accounts(self):
ict0 = self.asset_model.create(
{
"name": "test asset",
"profile_id": self.ict3Y.id,
"purchase_value": 1500,
"date_start": "1901-02-01",
"method_time": "year",
"method_number": 3,
"method_period": "year",
"account_depreciation_id": self.ict3Y.account_depreciation_id.id,
"account_expense_depreciation_id": self.account_expense_laptop.id,
}
)
self.assertEqual(ict0.state, "draft")
self.assertEqual(ict0.purchase_value, 1500)
self.assertEqual(ict0.salvage_value, 0)
self.assertEqual(ict0.depreciation_base, 1500)
self.assertEqual(len(ict0.depreciation_line_ids), 1)
self.assertEqual(ict0.account_asset_id.id, ict0.profile_id.account_asset_id.id)
self.assertEqual(
ict0.account_depreciation_id.id, ict0.profile_id.account_depreciation_id.id
)
self.assertEqual(
ict0.account_expense_depreciation_id.id, self.account_expense_laptop.id
)
aed_id = self.car5y.account_expense_depreciation_id.id
vehicle0 = self.asset_model.create(
{
"state": "draft",
"method_time": "year",
"method_number": 5,
"method_period": "year",
"name": "CEO's Car",
"purchase_value": 12000.0,
"salvage_value": 2000.0,
"profile_id": self.car5y.id,
"date_start": time.strftime("%Y-01-01"),
"account_depreciation_id": self.account_depreciation_car.id,
"account_expense_depreciation_id": aed_id,
}
)
self.assertEqual(vehicle0.state, "draft")
self.assertEqual(vehicle0.purchase_value, 12000)
self.assertEqual(vehicle0.salvage_value, 2000)
self.assertEqual(vehicle0.depreciation_base, 10000)
self.assertEqual(len(vehicle0.depreciation_line_ids), 1)
self.assertEqual(
vehicle0.account_asset_id.id, vehicle0.profile_id.account_asset_id.id
)
self.assertEqual(
vehicle0.account_depreciation_id.id, self.account_depreciation_car.id
)
self.assertEqual(
vehicle0.account_expense_depreciation_id.id,
vehicle0.profile_id.account_expense_depreciation_id.id,
)
ict0.compute_depreciation_board()
ict0.invalidate_recordset()
self.assertEqual(len(ict0.depreciation_line_ids), 4)
self.assertEqual(ict0.depreciation_line_ids[1].amount, 500)
vehicle0.compute_depreciation_board()
vehicle0.invalidate_recordset()
self.assertEqual(len(vehicle0.depreciation_line_ids), 6)
self.assertEqual(vehicle0.depreciation_line_ids[1].amount, 2000)
ict0.validate()
ict0_created_moves_ids = ict0.depreciation_line_ids[1].create_move()
ict0.invalidate_recordset()
for move_id in ict0_created_moves_ids:
move = self.env["account.move"].browse(move_id)
# Validate that the profile account is used
depr_line = move.line_ids.filtered(
lambda line: line.account_id == self.ict3Y.account_depreciation_id
)
self.assertTrue(depr_line)
# Validate that the forced expense depreciation account is being used
expense_line = move.line_ids.filtered(
lambda line: line.account_id == self.account_expense_laptop
)
self.assertTrue(expense_line)
# Check that the asset is now open and depreciation is posted correctly
self.assertEqual(ict0.state, "open")
self.assertEqual(ict0.value_depreciated, 500)
self.assertEqual(ict0.value_residual, 1000)
vehicle0.validate()
vehicle0_created_move_ids = vehicle0.depreciation_line_ids[1].create_move()
for move_id in vehicle0_created_move_ids:
move = self.env["account.move"].browse(move_id)
# Validate that the forced depreciation account is being used
depr_line = move.line_ids.filtered(
lambda line: line.account_id == self.account_depreciation_car
)
self.assertTrue(depr_line)
# Validate that the profile account is used
expense_line = move.line_ids.filtered(
lambda line: line.account_id
== self.car5y.account_expense_depreciation_id
)
self.assertTrue(expense_line)
vehicle0.invalidate_recordset()
# Ensure the asset's state and values are correct after depreciation posting
self.assertEqual(vehicle0.state, "open")
self.assertEqual(vehicle0.value_depreciated, 2000)
self.assertEqual(vehicle0.value_residual, 8000)
vehicle0.invalidate_recordset()
def test_profile_onchange_and_compute_account_asset_id_from_invoice(self):
# Create asset with non-draft state → onchange should do nothing
aed_id = self.ict3Y.account_expense_depreciation_id.id
asset = self.asset_model.create(
{
"name": "Non-Draft Asset",
"profile_id": self.ict3Y.id,
"purchase_value": 1000,
"date_start": "2025-01-01",
"method_time": "year",
"method_number": 1,
"method_period": "year",
"account_depreciation_id": self.ict3Y.account_depreciation_id.id,
"account_expense_depreciation_id": aed_id,
"state": "open",
}
)
# Trigger onchange and ensure fields remain unchanged
asset._onchange_profile_id()
self.assertEqual(
asset.account_depreciation_id.id, self.ict3Y.account_depreciation_id.id
)
def test_create_fallback_to_profile_accounts(self):
asset = self.asset_model.create(
{
"name": "Profile Only Asset",
"profile_id": self.ict3Y.id,
"purchase_value": 500,
"date_start": "2025-01-01",
"method_time": "year",
"method_number": 1,
"method_period": "year",
}
)
self.assertEqual(
asset.account_depreciation_id.id, self.ict3Y.account_depreciation_id.id
)
self.assertEqual(
asset.account_expense_depreciation_id.id,
self.ict3Y.account_expense_depreciation_id.id,
)
def test_onchange_asset_profile_id_no_super_called_if_asset_fixed(self):
move_line = self.env["account.move.line"].new(
{
"account_id": self.account_depreciation_car.id,
}
)
move_line._onchange_asset_profile_id()
self.assertEqual(move_line.account_id.account_type, "asset_fixed")

View File

@@ -0,0 +1,28 @@
<?xml version='1.0' encoding='utf-8' ?>
<!-- # Copyright 2024 Bernat Obrador(APSL-Nagarro)<bobrador@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="account_asset_view_form_inherit" model="ir.ui.view">
<field name="name">account.asset.form.inherit</field>
<field name="model">account.asset</field>
<field
name="inherit_id"
ref="account_asset_management.account_asset_view_form"
/>
<field name="arch" type="xml">
<xpath expr="//field[@name='group_ids']" position="after">
<field name="account_asset_id" invisible="not profile_id" />
<field
name="account_depreciation_id"
readonly="state in ['open', 'close', 'removed']"
invisible="not profile_id"
/>
<field
name="account_expense_depreciation_id"
readonly="state in ['open', 'close', 'removed']"
invisible="not profile_id"
/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,181 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association
=================
Assets Management
=================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4c32555eac110b12681e50ddae3aaefda2f6d2d129151ce8b9189e0af562a61b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
:target: https://odoo-community.org/page/development-status
:alt: Mature
.. |badge2| image:: https://img.shields.io/badge/license-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%2Faccount--financial--tools-lightgray.png?logo=github
:target: https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_management
:alt: OCA/account-financial-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-tools-18-0/account-financial-tools-18-0-account_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/account-financial-tools&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This Module manages the assets owned by a company. It will keep track of
depreciation's occurred on those assets. And it allows to create
accounting entries from the depreciation lines.
The full asset life-cycle is managed (from asset creation to asset
removal).
Assets can be created manually as well as automatically (via the
creation of an accounting entry on the asset account).
Depreciation Journal Entries can be created manually in the "Deprecation
Board" tab, or automatically by two ways:
- Using the "Invoicing/Assets/Compute Assets" wizard.
- Activating the "Asset Management: Generate assets" cron.
These options are compatibles each other.
The module contains a large number of functional enhancements compared
to the standard account_asset module from Odoo.
**Table of contents**
.. contents::
:local:
Usage
=====
The module in NOT compatible with the standard account_asset module.
Changelog
=========
14.0.1.0.0 (2021-01-08)
-----------------------
- [BREAKING] Removed all functionality associated with
account.fiscal.year
13.0.3.0.0 (2021-07-06)
-----------------------
- Allow to reverse the posting of a depreciation line instead of
deleting the journal entry.
13.0.2.0.0 (2021-02-19)
-----------------------
- Add support for multi-company
13.0.1.0.0 (2019-10-21)
-----------------------
- Python code and views were adapted to be compatible with v13.
- When assets are created through accounting journal items, they are
created when the journal items is posted.
- When a Bill Invoice is created or modified, at the time it is saved,
for each line that has an Asset profile and Quantity 'N' greater than
1, it will be replaced by 'N' lines identical to it but with quantity
1. This was done to maintain the same behavior as in the previous
version, in which for each asset created there is a Journal Item. In
addition, this solution does not change the data model which does not
cause migration scripts.
- The configuration option was removed so the only function of that is
to allow the module to be uninstalled by unchecking that configuration
option.
- Tests were adapted.
12.0.2.1.0 (2019-10-21)
-----------------------
- [IMP] Add option to calculate depreciation table by days
12.0.1.0.0 (2019-01-13)
-----------------------
- [BREAKING] account.asset: parent_path has replaced parent_left &
parent_right (TODO: migration script)
- [BREAKING] account.asset.recompute.trigger: depends on date_range.py
(TODO: re-implement in account_fiscal_year.py)
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/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/account-financial-tools/issues/new?body=module:%20account_asset_management%0Aversion:%2018.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
-------
* Noviat
Contributors
------------
- OpenERP SA
- Luc De Meyer (Noviat)
- Frédéric Clementi (camptocamp)
- Florian Dacosta (Akretion)
- Stéphane Bidoul (Acsone)
- Adrien Peiffer (Acsone)
- Akim Juillerat <akim.juillerat@camptocamp.com>
- Henrik Norlin (Apps2GROW)
- Maxence Groine <mgroine@fiefmanage.ch>
- Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
- Saran Lim. <saranl@ecosoft.co.th>
- `Tecnativa <https://www.tecnativa.com>`__:
- Ernesto Tejeda
- Pedro M. Baeza
- João Marques
- Víctor Martínez
- Carlos Lopez
- `ForgeFlow <https://www.forgeflow.com>`__:
- Jordi Ballester <jordi.ballester@forgeflow.com>
- Miquel Raïch <miquel.raich@forgeflow.com>
- `Sygel <https://www.sygel.es>`__:
- Manuel Regidor <manuel.regidor@sygel.es>
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/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/18.0/account_asset_management>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -0,0 +1,3 @@
from . import models
from . import report
from . import wizard

View File

@@ -0,0 +1,33 @@
# Copyright 2009-2019 Noviat
# Copyright 2019 Tecnativa - Pedro M. Baeza
# Copyright 2021 Tecnativa - João Marques
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Assets Management",
"version": "18.0.1.0.3",
"license": "AGPL-3",
"depends": ["account", "report_xlsx_helper"],
"excludes": ["account_asset"],
"development_status": "Mature",
"external_dependencies": {"python": ["python-dateutil"]},
"author": "Noviat, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",
"category": "Accounting & Finance",
"data": [
"security/account_asset_security.xml",
"security/ir.model.access.csv",
"wizard/account_asset_compute.xml",
"wizard/account_asset_remove.xml",
"views/account_account.xml",
"views/account_asset.xml",
"views/account_asset_group.xml",
"views/account_asset_profile.xml",
"views/account_move.xml",
"views/account_move_line.xml",
"views/menuitem.xml",
"data/cron.xml",
"wizard/wiz_account_asset_report.xml",
"wizard/wiz_asset_move_reverse.xml",
],
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record forcecreate="True" id="ir_cron_assets_generator" model="ir.cron">
<field name="name">Asset Management: Generate assets</field>
<field name="model_id" ref="model_account_asset_compute" />
<field name="state">code</field>
<field name="code">model.create({}).asset_compute()</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="active" eval="False" />
</record>
</odoo>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More