diff --git a/account_bank_statement_import_move_line/README.rst b/account_bank_statement_import_move_line/README.rst index a17f9602..59efa85e 100644 --- a/account_bank_statement_import_move_line/README.rst +++ b/account_bank_statement_import_move_line/README.rst @@ -14,13 +14,13 @@ Bank statement import move lines :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github - :target: https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_import_move_line + :target: https://github.com/OCA/bank-statement-import/tree/13.0/account_bank_statement_import_move_line :alt: OCA/bank-statement-import .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/bank-statement-import-12-0/bank-statement-import-12-0-account_bank_statement_import_move_line + :target: https://translation.odoo-community.org/projects/bank-statement-import-13-0/bank-statement-import-13-0-account_bank_statement_import_move_line :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/174/12.0 + :target: https://runbot.odoo-community.org/runbot/174/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -61,7 +61,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. @@ -80,6 +80,9 @@ Contributors * Luis M. Ontalba * Victor M.M. Torres + * João Marques + +* Pedro Gonzalez Maintainers ~~~~~~~~~~~ @@ -102,6 +105,6 @@ Current `maintainer `__: |maintainer-pedrobaeza| -This module is part of the `OCA/bank-statement-import `_ project on GitHub. +This module is part of the `OCA/bank-statement-import `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_bank_statement_import_move_line/__manifest__.py b/account_bank_statement_import_move_line/__manifest__.py index 39c65c12..4a30bbd7 100644 --- a/account_bank_statement_import_move_line/__manifest__.py +++ b/account_bank_statement_import_move_line/__manifest__.py @@ -3,13 +3,13 @@ { "name": "Bank statement import move lines", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "category": "Accounting", "summary": "Import journal items into bank statement", "author": "Tecnativa, " "Odoo Community Association (OCA)", "maintainers": ["pedrobaeza"], "website": "https://github.com/OCA/bank-statement-import", - "depends": ["account",], + "depends": ["account"], "data": [ "wizards/account_statement_line_create_view.xml", "views/account_bank_statement_view.xml", diff --git a/account_bank_statement_import_move_line/i18n/account_bank_statement_import_move_line.pot b/account_bank_statement_import_move_line/i18n/account_bank_statement_import_move_line.pot index bdcd3f34..8d92b2ca 100644 --- a/account_bank_statement_import_move_line/i18n/account_bank_statement_import_move_line.pot +++ b/account_bank_statement_import_move_line/i18n/account_bank_statement_import_move_line.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" diff --git a/account_bank_statement_import_move_line/models/account_move_line.py b/account_bank_statement_import_move_line/models/account_move_line.py index 042c1644..67128fb0 100644 --- a/account_bank_statement_import_move_line/models/account_move_line.py +++ b/account_bank_statement_import_move_line/models/account_move_line.py @@ -1,13 +1,12 @@ # Copyright 2017 Tecnativa - Luis M. Ontalba # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -from odoo import api, models +from odoo import models class AccountMoveLine(models.Model): _inherit = "account.move.line" - @api.multi def _prepare_statement_line_vals(self, statement): self.ensure_one() amount = 0.0 @@ -27,7 +26,6 @@ class AccountMoveLine(models.Model): } return vals - @api.multi def create_statement_line_from_move_line(self, statement): abslo = self.env["account.bank.statement.line"] for mline in self: diff --git a/account_bank_statement_import_move_line/readme/CONTRIBUTORS.rst b/account_bank_statement_import_move_line/readme/CONTRIBUTORS.rst index 1fb12070..49f723c9 100644 --- a/account_bank_statement_import_move_line/readme/CONTRIBUTORS.rst +++ b/account_bank_statement_import_move_line/readme/CONTRIBUTORS.rst @@ -2,3 +2,6 @@ * Luis M. Ontalba * Victor M.M. Torres + * João Marques + +* Pedro Gonzalez diff --git a/account_bank_statement_import_move_line/static/description/index.html b/account_bank_statement_import_move_line/static/description/index.html index b5c19c47..3d42dc73 100644 --- a/account_bank_statement_import_move_line/static/description/index.html +++ b/account_bank_statement_import_move_line/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

+

Production/Stable License: AGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

This module adds a button to bank statement form view to open a wizard to allow filtering, selecting and importing lines form journal items into the bank statement.

@@ -412,7 +412,7 @@ lines filtered by the criteria.

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.

@@ -429,8 +429,10 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Tecnativa:
    • Luis M. Ontalba
    • Victor M.M. Torres
    • +
    • João Marques
  • +
  • Pedro Gonzalez <pegonzalezs@gmail.com>
  • @@ -442,7 +444,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

    Current maintainer:

    pedrobaeza

    -

    This module is part of the OCA/bank-statement-import project on GitHub.

    +

    This module is part of the OCA/bank-statement-import project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py b/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py index ef9cff86..30554ac8 100644 --- a/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py +++ b/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py @@ -9,9 +9,11 @@ class TestAccountBankStatementImportMoveLine(common.SavepointCase): @classmethod def setUpClass(cls): super(TestAccountBankStatementImportMoveLine, cls).setUpClass() + cls.account_type = cls.env["account.account.type"].create( - {"name": "Test Account Type"} + {"name": "Test Account Type", "type": "other", "internal_group": "asset"} ) + cls.a_receivable = cls.env["account.account"].create( { "code": "TAA", @@ -21,12 +23,12 @@ class TestAccountBankStatementImportMoveLine(common.SavepointCase): } ) cls.partner = cls.env["res.partner"].create( - {"name": "Test Partner 2", "parent_id": False,} + {"name": "Test Partner 2", "parent_id": False} ) cls.journal = cls.env["account.journal"].create( - {"name": "Test Journal", "type": "bank",} + {"name": "Test Journal", "type": "sale", "code": "TJS0"} ) - cls.invoice = cls.env["account.invoice"].create( + cls.invoice = cls.env["account.move"].create( { "name": "Test Invoice 3", "partner_id": cls.partner.id, @@ -51,13 +53,12 @@ class TestAccountBankStatementImportMoveLine(common.SavepointCase): ) def test_global(self): - self.invoice.action_invoice_open() - self.assertTrue(self.invoice.move_id) - self.invoice.move_id.post() + self.invoice.post() + self.assertTrue(self.invoice.id) wizard_o = self.env["account.statement.line.create"] context = wizard_o._context.copy() context.update( - {"active_model": "account.bank.statement", "active_id": self.statement.id,} + {"active_model": "account.bank.statement", "active_id": self.statement.id} ) wizard = wizard_o.with_context(context).create( { diff --git a/account_bank_statement_import_move_line/wizards/account_statement_line_create.py b/account_bank_statement_import_move_line/wizards/account_statement_line_create.py index 7b8d97dc..31f9c6a4 100644 --- a/account_bank_statement_import_move_line/wizards/account_statement_line_create.py +++ b/account_bank_statement_import_move_line/wizards/account_statement_line_create.py @@ -16,13 +16,13 @@ class AccountStatementLineCreate(models.TransientModel): ) journal_ids = fields.Many2many("account.journal", string="Journals Filter") target_move = fields.Selection( - [("posted", "All Posted Entries"), ("all", "All Entries"),], + [("posted", "All Posted Entries"), ("all", "All Entries")], string="Target Moves", ) allow_blocked = fields.Boolean(string="Allow Litigation Move Lines") invoice = fields.Boolean(string="Linked to an Invoice or Refund") date_type = fields.Selection( - [("due", "Due Date"), ("move", "Move Date"),], + [("due", "Due Date"), ("move", "Move Date")], string="Type of Date Filter", required=True, ) @@ -51,7 +51,6 @@ class AccountStatementLineCreate(models.TransientModel): ) return res - @api.multi def _prepare_move_line_domain(self): self.ensure_one() domain = [ @@ -79,7 +78,7 @@ class AccountStatementLineCreate(models.TransientModel): elif self.date_type == "move": domain.append(("date", "<=", self.move_date)) if self.invoice: - domain.append(("invoice_id", "!=", False)) + domain.append(("move_id", "!=", False)) paylines = self.env["account.payment"].search( [ ("state", "in", ("draft", "posted", "sent")), @@ -91,7 +90,6 @@ class AccountStatementLineCreate(models.TransientModel): domain += [("id", "not in", move_in_payment_ids)] return domain - @api.multi def populate(self): domain = self._prepare_move_line_domain() lines = self.env["account.move.line"].search(domain) @@ -123,7 +121,6 @@ class AccountStatementLineCreate(models.TransientModel): res = {"domain": {"move_line_ids": domain}} return res - @api.multi def create_statement_lines(self): for rec in self: if rec.move_line_ids and rec.statement_id: