From db6733913fb47757c975bdd14ba14349737c53ed Mon Sep 17 00:00:00 2001 From: ps-tubtim Date: Fri, 17 Feb 2023 13:38:35 +0700 Subject: [PATCH] [MIG] account_asset_compute_batch: Migration to 15.0 --- account_asset_compute_batch/README.rst | 15 +++++++------- account_asset_compute_batch/__manifest__.py | 2 +- .../models/account_asset_compute_batch.py | 11 +++------- .../readme/CONTRIBUTORS.rst | 1 + .../security/account_asset_security.xml | 20 +++++++++---------- .../static/description/index.html | 9 +++++---- .../views/account_asset_compute_batch.xml | 2 +- .../wizard/account_asset_compute.py | 5 +---- 8 files changed, 29 insertions(+), 36 deletions(-) diff --git a/account_asset_compute_batch/README.rst b/account_asset_compute_batch/README.rst index 3467a97c0..3675a9814 100644 --- a/account_asset_compute_batch/README.rst +++ b/account_asset_compute_batch/README.rst @@ -14,14 +14,14 @@ Assets - Compute Depre. in Batch :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/14.0/account_asset_compute_batch + :target: https://github.com/OCA/account-financial-tools/tree/15.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-14-0/account-financial-tools-14-0-account_asset_compute_batch + :target: https://translation.odoo-community.org/projects/account-financial-tools-15-0/account-financial-tools-15-0-account_asset_compute_batch :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/92/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/account-financial-tools&target_branch=15.0 + :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -56,7 +56,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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -74,6 +74,7 @@ Contributors * `Ecosoft `_: * Kitti U. + * Pimolnat Suntian Maintainers ~~~~~~~~~~~ @@ -88,6 +89,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_compute_batch/__manifest__.py b/account_asset_compute_batch/__manifest__.py index 094058e77..fc6ce9a50 100644 --- a/account_asset_compute_batch/__manifest__.py +++ b/account_asset_compute_batch/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Assets - Compute Depre. in Batch", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "license": "AGPL-3", "depends": ["account_asset_management"], "author": "Ecosoft, Odoo Community Association (OCA)", diff --git a/account_asset_compute_batch/models/account_asset_compute_batch.py b/account_asset_compute_batch/models/account_asset_compute_batch.py index ed27749be..60482ce7d 100644 --- a/account_asset_compute_batch/models/account_asset_compute_batch.py +++ b/account_asset_compute_batch/models/account_asset_compute_batch.py @@ -17,13 +17,11 @@ class AssetComputeBatch(models.Model): _check_company_auto = True name = fields.Char( - string="Name", required=True, readonly=True, states={"draft": [("readonly", False)]}, ) description = fields.Char( - string="Description", required=True, readonly=True, states={"draft": [("readonly", False)]}, @@ -58,7 +56,6 @@ class AssetComputeBatch(models.Model): "by setting auto_post=True, to be posted by cron job", ) auto_compute = fields.Boolean( - string="Auto Compute", readonly=True, states={"draft": [("readonly", False)]}, help="Auto compute draft batches with 'Date' up to today, by cron job", @@ -173,10 +170,9 @@ class AssetComputeBatch(models.Model): exc_info()[0] tb = "".join(format_exception(*exc_info())) batch_ref = ", ".join(batches.mapped("name")) - error_msg = _("Error while processing batches '%s': \n\n%s") % ( - batch_ref, - tb, - ) + error_msg = _( + "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) @@ -200,7 +196,6 @@ class AccountAssetComputeBatchProfileReport(models.Model): readonly=True, ) amount = fields.Monetary( - string="Amount", readonly=True, ) diff --git a/account_asset_compute_batch/readme/CONTRIBUTORS.rst b/account_asset_compute_batch/readme/CONTRIBUTORS.rst index 28f80dc65..3348ede9d 100644 --- a/account_asset_compute_batch/readme/CONTRIBUTORS.rst +++ b/account_asset_compute_batch/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * `Ecosoft `_: * Kitti U. + * Pimolnat Suntian diff --git a/account_asset_compute_batch/security/account_asset_security.xml b/account_asset_compute_batch/security/account_asset_security.xml index 5115213c9..cba72449a 100644 --- a/account_asset_compute_batch/security/account_asset_security.xml +++ b/account_asset_compute_batch/security/account_asset_security.xml @@ -1,12 +1,10 @@ - - - - Asset Compute Batch multi-company - - - ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] - - + + + Asset Compute Batch multi-company + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + diff --git a/account_asset_compute_batch/static/description/index.html b/account_asset_compute_batch/static/description/index.html index 8bfefbca0..5034e9cdb 100644 --- a/account_asset_compute_batch/static/description/index.html +++ b/account_asset_compute_batch/static/description/index.html @@ -3,7 +3,7 @@ - + Assets - Compute Depre. in Batch