diff --git a/base_accounting_kit/__manifest__.py b/base_accounting_kit/__manifest__.py index e865757ac..7d7c6a701 100644 --- a/base_accounting_kit/__manifest__.py +++ b/base_accounting_kit/__manifest__.py @@ -22,7 +22,7 @@ { 'name': 'Odoo 15 Full Accounting Kit', - 'version': '15.0.2.2.3', + 'version': '15.0.2.2.4', 'category': 'Accounting', 'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs', 'summary': """ Asset and Budget Management, diff --git a/base_accounting_kit/doc/RELEASE_NOTES.md b/base_accounting_kit/doc/RELEASE_NOTES.md index 699b0396f..dd53138e0 100644 --- a/base_accounting_kit/doc/RELEASE_NOTES.md +++ b/base_accounting_kit/doc/RELEASE_NOTES.md @@ -19,4 +19,9 @@ #### 11.04.2023 #### Version 15.0.2.2.3 #### FIX -- Profit and Loss report issue fix \ No newline at end of file +- Profit and Loss report issue fix + +#### 28.04.2023 +#### Version 15.0.2.2.4 +#### FIX +- asset closing issue is fixed \ No newline at end of file diff --git a/base_accounting_kit/models/account_asset.py b/base_accounting_kit/models/account_asset.py index 6ec6393d8..c63de14bf 100644 --- a/base_accounting_kit/models/account_asset.py +++ b/base_accounting_kit/models/account_asset.py @@ -694,7 +694,7 @@ class AccountAssetDepreciationLine(models.Model): if post_move and created_moves: created_moves.filtered(lambda m: any( m.asset_depreciation_ids.mapped( - 'asset_id.category_id.open_asset'))).post() + 'asset_id.category_id.open_asset'))).action_post() return [x.id for x in created_moves] def create_grouped_move(self, post_move=True): @@ -742,7 +742,7 @@ class AccountAssetDepreciationLine(models.Model): if post_move and created_moves: self.post_lines_and_close_asset() - created_moves.post() + created_moves.action_post() return [x.id for x in created_moves] def post_lines_and_close_asset(self): diff --git a/base_accounting_kit/models/account_move.py b/base_accounting_kit/models/account_move.py index 845a072f0..eeefb9941 100644 --- a/base_accounting_kit/models/account_move.py +++ b/base_accounting_kit/models/account_move.py @@ -65,6 +65,7 @@ class AccountMove(models.Model): return res def action_post(self): + self.mapped('asset_depreciation_ids').post_lines_and_close_asset() result = super(AccountMove, self).action_post() for inv in self: