Skip to content

Commit

Permalink
[MIG] account_statement_import_move_line: Migration to version 17.0
Browse files Browse the repository at this point in the history
TT51242
  • Loading branch information
pilarvargas-tecnativa committed Oct 25, 2024
1 parent 8f6b3e3 commit 7bc5bbe
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions account_statement_import_move_line/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

{
"name": "Bank statement import move lines",
"version": "15.0.1.0.0",
"version": "17.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_statement_base"],
"data": [
"security/ir.model.access.csv",
"wizards/account_statement_line_create_view.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@
class TestAccountBankStatementImportMoveLine(TransactionCase):
@classmethod
def setUpClass(cls):
super(TestAccountBankStatementImportMoveLine, cls).setUpClass()

cls.account_type = cls.env["account.account.type"].create(
{"name": "Test Account Type", "type": "other", "internal_group": "asset"}
)

super().setUpClass()
cls.a_receivable = cls.env["account.account"].create(
{
"code": "TAA",
"name": "Test Receivable Account",
"internal_type": "receivable",
"user_type_id": cls.account_type.id,
"account_type": "asset_receivable",
"reconcile": "True",
}
)
cls.partner = cls.env["res.partner"].create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
<record id="view_bank_statement_form" model="ir.ui.view">
<field name="name">account.bank.statement.form.population</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_form" />
<field
name="inherit_id"
ref="account_statement_base.view_bank_statement_form"
/>
<field name="arch" type="xml">
<field name="all_lines_reconciled" position="after">
<button name="open_entries" position="after">
<button
name="%(account_statement_line_create_action)d"
string="Import Journal Items"
type="action"
class="oe_highlight"
attrs="{'invisible':[('state', '!=', 'open')]}"
class="oe_stat_button"
icon="fa-upload"
invisible="not id"
groups="account.group_account_user"
/>
</field>
>
<div class="o_stat_info">
<span class="o_stat_text">Import Journal Items</span>
</div>
</button>
</button>
</field>
</record>
</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ def _prepare_move_line_domain(self):
self.ensure_one()
domain = [
("reconciled", "=", False),
("account_id.internal_type", "in", ("payable", "receivable")),
(
"account_id.account_type",
"in",
("asset_receivable", "liability_payable"),
),
("company_id", "=", self.env.company.id),
]
if self.journal_ids:
Expand Down

0 comments on commit 7bc5bbe

Please sign in to comment.