[MIG] account_asset_compute_batch: Migration to 15.0

This commit is contained in:
ps-tubtim
2023-02-17 13:38:35 +07:00
committed by ps-tubtim
parent c481f0c3e4
commit db6733913f
8 changed files with 29 additions and 36 deletions

View File

@@ -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 <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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_asset_compute_batch%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_asset_compute_batch%0Aversion:%2015.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.
@@ -74,6 +74,7 @@ Contributors
* `Ecosoft <http://ecosoft.co.th>`_:
* Kitti U. <kittiu@ecosoft.co.th>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
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 <https://github.com/OCA/account-financial-tools/tree/14.0/account_asset_compute_batch>`_ project on GitHub.
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/15.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

@@ -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)",

View File

@@ -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,
)

View File

@@ -1,3 +1,4 @@
* `Ecosoft <http://ecosoft.co.th>`_:
* Kitti U. <kittiu@ecosoft.co.th>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>

View File

@@ -1,12 +1,10 @@
<odoo>
<data 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>
</data>
<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

@@ -3,7 +3,7 @@
<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 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Assets - Compute Depre. in Batch</title>
<style type="text/css">
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/14.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" href="https://translation.odoo-community.org/projects/account-financial-tools-14-0/account-financial-tools-14-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" href="https://runbot.odoo-community.org/runbot/92/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" 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" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/15.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" href="https://translation.odoo-community.org/projects/account-financial-tools-15-0/account-financial-tools-15-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" href="https://runboat.odoo-community.org/webui/builds.html?repo=OCA/account-financial-tools&amp;target_branch=15.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">
@@ -410,7 +410,7 @@ ul.auto-toc {
<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 smashing 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:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_asset_compute_batch%0Aversion:%2015.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">
@@ -426,6 +426,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<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>
@@ -437,7 +438,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<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/14.0/account_asset_compute_batch">OCA/account-financial-tools</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/15.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>

View File

@@ -99,7 +99,7 @@
<field name="name">account.asset.compute.batch.tree</field>
<field name="model">account.asset.compute.batch</field>
<field name="arch" type="xml">
<tree string="Asset Compute Batch">
<tree>
<field name="name" />
<field name="description" />
<field name="date_end" />

View File

@@ -9,12 +9,9 @@ class AccountAssetCompute(models.TransientModel):
use_batch = fields.Boolean(string="Create Batch", help="Use batch opton")
batch_name = fields.Char(
string="Batch Name",
help="If batch name is specified, computation will be tracked by a batch",
)
description = fields.Char(
string="Description",
)
description = fields.Char()
profile_ids = fields.Many2many(
comodel_name="account.asset.profile",
string="Profiles",