diff --git a/account_asset_management/README.rst b/account_asset_management/README.rst
index 6d710c8eb..b2abcbd4b 100644
--- a/account_asset_management/README.rst
+++ b/account_asset_management/README.rst
@@ -17,36 +17,37 @@ Assets Management
: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/16.0/account_asset_management
+ :target: https://github.com/OCA/account-financial-tools/tree/17.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-16-0/account-financial-tools-16-0-account_asset_management
+ :target: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-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=16.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=17.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
+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).
+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).
+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:
+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.
+- 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.
+The module contains a large number of functional enhancements compared
+to the standard account_asset module from Odoo.
**Table of contents**
@@ -62,48 +63,52 @@ Changelog
=========
14.0.1.0.0 (2021-01-08)
-~~~~~~~~~~~~~~~~~~~~~~~
+-----------------------
- * [BREAKING] Removed all functionality associated with `account.fiscal.year`
+ - [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.
+- 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
+- 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.
+- 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
+- [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)
+- [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
===========
@@ -111,7 +116,7 @@ Bug Tracker
Bugs are tracked on `GitHub 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -119,42 +124,42 @@ 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
-* Henrik Norlin (Apps2GROW)
-* Maxence Groine
-* Kitti Upariphutthiphong
-* Saran Lim.
-* `Tecnativa `_:
+- OpenERP SA
+- Luc De Meyer (Noviat)
+- Frédéric Clementi (camptocamp)
+- Florian Dacosta (Akretion)
+- Stéphane Bidoul (Acsone)
+- Adrien Peiffer (Acsone)
+- Akim Juillerat
+- Henrik Norlin (Apps2GROW)
+- Maxence Groine
+- Kitti Upariphutthiphong
+- Saran Lim.
+- `Tecnativa `__:
- * Ernesto Tejeda
- * Pedro M. Baeza
- * João Marques
- * Víctor Martínez
+ - Ernesto Tejeda
+ - Pedro M. Baeza
+ - João Marques
+ - Víctor Martínez
-* `ForgeFlow `_:
+- `ForgeFlow `__:
- * Jordi Ballester
- * Miquel Raïch
+ - Jordi Ballester
+ - Miquel Raïch
-* `Sygel `_:
+- `Sygel `__:
- * Manuel Regidor
+ - Manuel Regidor
Maintainers
-~~~~~~~~~~~
+-----------
This module is maintained by the OCA.
@@ -166,6 +171,6 @@ 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 `_ project on GitHub.
+This module is part of the `OCA/account-financial-tools `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_asset_management/models/account_asset.py b/account_asset_management/models/account_asset.py
index 44c69a268..a947e20f0 100644
--- a/account_asset_management/models/account_asset.py
+++ b/account_asset_management/models/account_asset.py
@@ -24,7 +24,7 @@ READONLY_STATES = {
}
-class DummyFy(object):
+class DummyFy:
def __init__(self, *args, **argv):
for key, arg in argv.items():
setattr(self, key, arg)
@@ -638,7 +638,6 @@ class AccountAsset(models.Model):
line_i_start = 0
def compute_depreciation_board(self):
-
line_obj = self.env["account.asset.line"]
for asset in self:
@@ -1039,7 +1038,6 @@ class AccountAsset(models.Model):
def _compute_depreciation_table_lines(
self, table, depreciation_start_date, depreciation_stop_date, line_dates
):
-
self.ensure_one()
currency = self.company_id.currency_id
asset_sign = 1 if self.depreciation_base >= 0 else -1
@@ -1052,7 +1050,6 @@ class AccountAsset(models.Model):
)
for i, entry in enumerate(table):
-
lines = []
fy_amount_check = 0.0
fy_amount = entry["fy_amount"]
@@ -1231,7 +1228,7 @@ class AccountAsset(models.Model):
tb = "".join(format_exception(*exc_info()))
asset_ref = depreciation.asset_id.name
if depreciation.asset_id.code:
- asset_ref = "[{}] {}".format(depreciation.asset_id.code, asset_ref)
+ asset_ref = f"[{depreciation.asset_id.code}] {asset_ref}"
error_log += _(
"\nError while processing asset '{ref}': {exception}"
).format(ref=asset_ref, exception=str(e))
diff --git a/account_asset_management/models/account_asset_line.py b/account_asset_management/models/account_asset_line.py
index 9f81a0b72..de5098cb0 100644
--- a/account_asset_management/models/account_asset_line.py
+++ b/account_asset_management/models/account_asset_line.py
@@ -219,7 +219,7 @@ class AccountAssetLine(models.Model):
asset = self.asset_id
move_data = {
"date": depreciation_date,
- "ref": "{} - {}".format(asset.name, self.name),
+ "ref": f"{asset.name} - {self.name}",
"journal_id": asset.profile_id.journal_id.id,
}
return move_data
diff --git a/account_asset_management/models/account_move.py b/account_asset_management/models/account_move.py
index d4eeeb666..d4b60d7cd 100644
--- a/account_asset_management/models/account_move.py
+++ b/account_asset_management/models/account_move.py
@@ -256,6 +256,6 @@ class AccountMoveLine(models.Model):
aml = self.with_context(check_move_validity=False)
qty = self.quantity
name = self.name
- aml.write({"quantity": 1, "name": "{} {}".format(name, 1)})
+ aml.write({"quantity": 1, "name": f"{name} {1}"})
for i in range(1, int(qty)):
- aml.copy({"name": "{} {}".format(name, i + 1)})
+ aml.copy({"name": f"{name} {i + 1}"})
diff --git a/account_asset_management/pyproject.toml b/account_asset_management/pyproject.toml
new file mode 100644
index 000000000..4231d0ccc
--- /dev/null
+++ b/account_asset_management/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["whool"]
+build-backend = "whool.buildapi"
diff --git a/account_asset_management/readme/CONTRIBUTORS.md b/account_asset_management/readme/CONTRIBUTORS.md
new file mode 100644
index 000000000..33ed0f081
--- /dev/null
+++ b/account_asset_management/readme/CONTRIBUTORS.md
@@ -0,0 +1,21 @@
+- OpenERP SA
+- Luc De Meyer (Noviat)
+- Frédéric Clementi (camptocamp)
+- Florian Dacosta (Akretion)
+- Stéphane Bidoul (Acsone)
+- Adrien Peiffer (Acsone)
+- Akim Juillerat \<\>
+- Henrik Norlin (Apps2GROW)
+- Maxence Groine \<\>
+- Kitti Upariphutthiphong \<\>
+- Saran Lim. \<\>
+- [Tecnativa](https://www.tecnativa.com):
+ - Ernesto Tejeda
+ - Pedro M. Baeza
+ - João Marques
+ - Víctor Martínez
+- [ForgeFlow](https://www.forgeflow.com):
+ - Jordi Ballester \<\>
+ - Miquel Raïch \<\>
+- [Sygel](https://www.sygel.es):
+ - Manuel Regidor \<\>
diff --git a/account_asset_management/readme/CONTRIBUTORS.rst b/account_asset_management/readme/CONTRIBUTORS.rst
deleted file mode 100644
index 5f2ab0135..000000000
--- a/account_asset_management/readme/CONTRIBUTORS.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-* OpenERP SA
-* Luc De Meyer (Noviat)
-* Frédéric Clementi (camptocamp)
-* Florian Dacosta (Akretion)
-* Stéphane Bidoul (Acsone)
-* Adrien Peiffer (Acsone)
-* Akim Juillerat
-* Henrik Norlin (Apps2GROW)
-* Maxence Groine
-* Kitti Upariphutthiphong
-* Saran Lim.
-* `Tecnativa `_:
-
- * Ernesto Tejeda
- * Pedro M. Baeza
- * João Marques
- * Víctor Martínez
-
-* `ForgeFlow `_:
-
- * Jordi Ballester
- * Miquel Raïch
-
-* `Sygel `_:
-
- * Manuel Regidor
diff --git a/account_asset_management/readme/DESCRIPTION.md b/account_asset_management/readme/DESCRIPTION.md
new file mode 100644
index 000000000..4f19b11f4
--- /dev/null
+++ b/account_asset_management/readme/DESCRIPTION.md
@@ -0,0 +1,20 @@
+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.
diff --git a/account_asset_management/readme/DESCRIPTION.rst b/account_asset_management/readme/DESCRIPTION.rst
deleted file mode 100644
index 1875b4a7d..000000000
--- a/account_asset_management/readme/DESCRIPTION.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-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.
diff --git a/account_asset_management/readme/HISTORY.md b/account_asset_management/readme/HISTORY.md
new file mode 100644
index 000000000..07a63a3c7
--- /dev/null
+++ b/account_asset_management/readme/HISTORY.md
@@ -0,0 +1,41 @@
+## 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)
diff --git a/account_asset_management/readme/HISTORY.rst b/account_asset_management/readme/HISTORY.rst
deleted file mode 100644
index 9dd4bf99a..000000000
--- a/account_asset_management/readme/HISTORY.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-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)
diff --git a/account_asset_management/readme/USAGE.rst b/account_asset_management/readme/USAGE.md
similarity index 100%
rename from account_asset_management/readme/USAGE.rst
rename to account_asset_management/readme/USAGE.md
diff --git a/account_asset_management/report/account_asset_report_xls.py b/account_asset_management/report/account_asset_report_xls.py
index 64550cb95..03ae7aadb 100644
--- a/account_asset_management/report/account_asset_report_xls.py
+++ b/account_asset_management/report/account_asset_report_xls.py
@@ -30,7 +30,6 @@ class AssetReportXlsx(models.AbstractModel):
return [s1, s2, s3]
def _get_asset_template(self):
-
asset_template = {
"account": {
"header": {"type": "string", "value": _("Account")},
@@ -296,7 +295,6 @@ class AssetReportXlsx(models.AbstractModel):
return asset_template
def _get_acquisition_ws_params(self, wb, data, wiz):
-
acquisition_template = self._get_asset_template()
acquisition_template.update(
self.env["account.asset"]._xls_acquisition_template()
@@ -316,7 +314,6 @@ class AssetReportXlsx(models.AbstractModel):
}
def _get_active_ws_params(self, wb, data, wiz):
-
active_template = self._get_asset_template()
active_template.update(self.env["account.asset"]._xls_active_template())
wl_act = self.env["account.asset"]._xls_active_fields()
@@ -334,7 +331,6 @@ class AssetReportXlsx(models.AbstractModel):
}
def _get_removal_ws_params(self, wb, data, wiz):
-
removal_template = self._get_asset_template()
removal_template.update(self.env["account.asset"]._xls_removal_template())
wl_dsp = self.env["account.asset"]._xls_removal_fields()
@@ -352,8 +348,7 @@ class AssetReportXlsx(models.AbstractModel):
}
def _get_title(self, wiz, report, frmt="normal"):
-
- prefix = "{} - {}".format(wiz.date_from, wiz.date_to)
+ prefix = f"{wiz.date_from} - {wiz.date_to}"
if report == "acquisition":
if frmt == "normal":
title = prefix + " : " + _("New Acquisitions")
@@ -461,7 +456,7 @@ class AssetReportXlsx(models.AbstractModel):
report = ws_params["report_type"]
def asset_filter(asset):
- filt = getattr(self, "{}_filter".format(report))
+ filt = getattr(self, f"{report}_filter")
return filt(wiz, asset)
def _has_assets(group, group_val):
@@ -560,7 +555,7 @@ class AssetReportXlsx(models.AbstractModel):
row_pos = self._report_title(ws, row_pos, ws_params, data, wiz)
def asset_filter(asset):
- filt = getattr(self, "{}_filter".format(report))
+ filt = getattr(self, f"{report}_filter")
return filt(wiz, asset)
assets = data["assets"].filtered(asset_filter)
@@ -618,7 +613,6 @@ class AssetReportXlsx(models.AbstractModel):
processed = []
for entry in entries:
-
period_start_value_cell = period_start_value_pos and self._rowcol_to_cell(
row_pos, period_start_value_pos
)
diff --git a/account_asset_management/static/description/index.html b/account_asset_management/static/description/index.html
index 63c465b92..a7ba84ad3 100644
--- a/account_asset_management/static/description/index.html
+++ b/account_asset_management/static/description/index.html
@@ -369,22 +369,23 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:843676bebe20651c6131f76d504144b859ebaca41703b5b8a63f97a7b4998070
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

-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
+

+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:
+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.
+The module contains a large number of functional enhancements compared
+to the standard account_asset module from Odoo.
Table of contents
@@ -417,15 +418,16 @@ the standard account_asset module from Odoo.
-- [BREAKING] Removed all functionality associated with account.fiscal.year
+- [BREAKING] Removed all functionality associated with
+account.fiscal.year
-- Allow to reverse the posting of a depreciation line instead of deleting the
-journal entry.
+- Allow to reverse the posting of a depreciation line instead of
+deleting the journal entry.
@@ -438,17 +440,18 @@ journal entry.
- 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 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.
+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.
@@ -461,8 +464,10 @@ allow the module to be uninstalled by unchecking that configuration option.
-- [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)
+- [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)
@@ -471,7 +476,7 @@ allow the module to be uninstalled by unchecking that configuration option.
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -521,7 +526,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
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 project on GitHub.
+
This module is part of the OCA/account-financial-tools project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_asset_management/tests/test_asset_management_xls.py b/account_asset_management/tests/test_asset_management_xls.py
index 5365717fa..4160e1615 100644
--- a/account_asset_management/tests/test_asset_management_xls.py
+++ b/account_asset_management/tests/test_asset_management_xls.py
@@ -15,7 +15,7 @@ class TestAssetManagementXls(AccountTestInvoicingCommon):
super(TestAssetManagementXls, cls).setUpClass()
module = __name__.split("addons.")[1].split(".")[0]
- cls.xls_report_name = "{}.asset_report_xls".format(module)
+ cls.xls_report_name = f"{module}.asset_report_xls"
cls.wiz_model = cls.env["wiz.account.asset.report"]
cls.company = cls.env.ref("base.main_company")
# Ensure we have something to report on
diff --git a/account_asset_management/wizard/account_asset_compute.py b/account_asset_management/wizard/account_asset_compute.py
index df51489de..aef987224 100644
--- a/account_asset_management/wizard/account_asset_compute.py
+++ b/account_asset_management/wizard/account_asset_compute.py
@@ -25,9 +25,7 @@ class AccountAssetCompute(models.TransientModel):
if error_log:
module = __name__.split("addons.")[1].split(".")[0]
- result_view = self.env.ref(
- "{}.{}_view_form_result".format(module, self._table)
- )
+ result_view = self.env.ref(f"{module}.{self._table}_view_form_result")
self.note = _("Compute Assets errors") + ":\n" + error_log
return {
"name": _("Compute Assets result"),
diff --git a/account_asset_management/wizard/account_asset_remove.py b/account_asset_management/wizard/account_asset_remove.py
index e49996c4f..04f46b915 100644
--- a/account_asset_management/wizard/account_asset_remove.py
+++ b/account_asset_management/wizard/account_asset_remove.py
@@ -161,9 +161,7 @@ class AccountAssetRemove(models.TransientModel):
asset_id = self.env.context.get("active_id")
asset = self.env["account.asset"].browse(asset_id)
- asset_ref = (
- asset.code and "{} (ref: {})".format(asset.name, asset.code) or asset.name
- )
+ asset_ref = asset.code and f"{asset.name} (ref: {asset.code})" or asset.name
if self.env.context.get("early_removal"):
residual_value = self._prepare_early_removal(asset)
diff --git a/account_asset_management/wizard/wiz_account_asset_report.py b/account_asset_management/wizard/wiz_account_asset_report.py
index 29d4a53c1..986913d85 100644
--- a/account_asset_management/wizard/wiz_account_asset_report.py
+++ b/account_asset_management/wizard/wiz_account_asset_report.py
@@ -60,7 +60,7 @@ class WizAccountAssetReport(models.TransientModel):
.decode("ascii")
)
prefix = "".join(x for x in prefix if x.isalnum())
- report_file = "{}_asset_report".format(prefix)
+ report_file = f"{prefix}_asset_report"
else:
report_file = "asset_report"
report = {
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000000000..7d41f1be0
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+# generated from manifests external_dependencies
+python-dateutil