mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[MIG] account_move_so_import: Migration to 14.0
This commit is contained in:
committed by
clementmbr
parent
2250957fd7
commit
64c9ecf750
@@ -14,13 +14,13 @@ Journal Entry Sale Order completion
|
||||
: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--reconcile-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/account-reconcile/tree/12.0/account_move_so_import
|
||||
:target: https://github.com/OCA/account-reconcile/tree/14.0/account_move_so_import
|
||||
:alt: OCA/account-reconcile
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_move_so_import
|
||||
:target: https://translation.odoo-community.org/projects/account-reconcile-14-0/account-reconcile-14-0-account_move_so_import
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/98/12.0
|
||||
:target: https://runbot.odoo-community.org/runbot/98/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -41,7 +41,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/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-reconcile/issues/new?body=module:%20account_move_so_import%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_move_so_import%0Aversion:%2014.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.
|
||||
|
||||
@@ -73,6 +73,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-reconcile <https://github.com/OCA/account-reconcile/tree/12.0/account_move_so_import>`_ project on GitHub.
|
||||
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/14.0/account_move_so_import>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
{
|
||||
"name": "Journal Entry Sale Order completion",
|
||||
"version": "12.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "Camptocamp,Odoo Community Association (OCA)",
|
||||
"maintainer": "Camptocamp",
|
||||
"category": "Finance",
|
||||
|
||||
@@ -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>Journal Entry Sale Order completion</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-reconcile/tree/12.0/account_move_so_import"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_move_so_import"><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/98/12.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-reconcile/tree/14.0/account_move_so_import"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-reconcile-14-0/account-reconcile-14-0-account_move_so_import"><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/98/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module extends the functionality of account_move_base_import
|
||||
to add support for completion rules based on Sale Orders. This was initially
|
||||
part of the module account_statement_base_completion, but is now separate to
|
||||
@@ -389,7 +389,7 @@ keep dependencies separate.</p>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-reconcile/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-reconcile/issues/new?body=module:%20account_move_so_import%0Aversion:%2012.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-reconcile/issues/new?body=module:%20account_move_so_import%0Aversion:%2014.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">
|
||||
@@ -415,7 +415,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-reconcile/tree/12.0/account_move_so_import">OCA/account-reconcile</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/14.0/account_move_so_import">OCA/account-reconcile</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>
|
||||
|
||||
@@ -71,25 +71,41 @@ class TestCompliteSO(SavepointCase):
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
cls.account_bank = cls.env["account.account"].search(
|
||||
[
|
||||
(
|
||||
"user_type_id",
|
||||
"=",
|
||||
cls.env.ref("account.data_account_type_liquidity").id,
|
||||
),
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
|
||||
def test_completion_so(self):
|
||||
self.order.action_confirm()
|
||||
aml = self.env["account.move.line"].create(
|
||||
{
|
||||
"name": self.order.name,
|
||||
"account_id": self.account_payable.id,
|
||||
"move_id": self.move.id,
|
||||
"credit": 0.0,
|
||||
}
|
||||
self.env["account.move.line"].create(
|
||||
[
|
||||
{
|
||||
"name": self.order.name,
|
||||
"account_id": self.account_payable.id,
|
||||
"move_id": self.move.id,
|
||||
"credit": 1,
|
||||
},
|
||||
{
|
||||
"name": "counter part",
|
||||
"account_id": self.account_bank.id,
|
||||
"move_id": self.move.id,
|
||||
"debit": 1,
|
||||
},
|
||||
]
|
||||
)
|
||||
aml.with_context(check_move_validity=False).write(
|
||||
{
|
||||
"credit": 1,
|
||||
}
|
||||
payable_aml = self.move.line_ids.filtered(
|
||||
lambda line: line.account_id == self.account_payable
|
||||
)
|
||||
self.assertFalse(self.move.partner_id)
|
||||
self.move.button_auto_completion()
|
||||
self.assertEqual(
|
||||
self.move.partner_id,
|
||||
payable_aml.partner_id,
|
||||
self.partner,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user