mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[11.0][MIG] account_reconcile_restrict_partner_mismatch: migrate
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import report
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
@@ -6,7 +5,7 @@
|
||||
'name': 'Reconcile restrict partner mismatch',
|
||||
'summary': 'Restrict reconciliation on receivable '
|
||||
'and payable accounts to the same partner',
|
||||
'version': '10.0.1.0.0',
|
||||
'version': '11.0.1.0.0',
|
||||
'depends': ['account'],
|
||||
'author': 'Camptocamp, Odoo Community Association (OCA)',
|
||||
'website': 'http://www.github.com/OCA/account-reconcile',
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_move_line
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
@@ -14,8 +13,7 @@ class AccountMoveLine(models.Model):
|
||||
def reconcile(self, writeoff_acc_id=False, writeoff_journal_id=False):
|
||||
if (config['test_enable']
|
||||
and not self.env.context.get('test_partner_mismatch')):
|
||||
return super(AccountMoveLine, self).reconcile(
|
||||
writeoff_acc_id, writeoff_journal_id)
|
||||
return super().reconcile(writeoff_acc_id, writeoff_journal_id)
|
||||
|
||||
# to be consistent with parent method
|
||||
if not self:
|
||||
@@ -27,5 +25,5 @@ class AccountMoveLine(models.Model):
|
||||
if len(partners) > 1:
|
||||
raise UserError(_('The partner has to be the same on all'
|
||||
' lines for receivable and payable accounts!'))
|
||||
return super(AccountMoveLine, self).reconcile(
|
||||
return super().reconcile(
|
||||
writeoff_acc_id, writeoff_journal_id)
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import report_reconciled_lines
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
@@ -9,7 +8,7 @@ from odoo.exceptions import UserError
|
||||
class TestReconciliation(AccountingTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestReconciliation, self).setUp()
|
||||
super().setUp()
|
||||
self.env = self.env(context=dict(
|
||||
self.env.context, tracking_disable=True,
|
||||
test_partner_mismatch=True)
|
||||
|
||||
Reference in New Issue
Block a user