[FIX] account_loan: Use the proper tree on the loan view

[BOT] post-merge updates
This commit is contained in:
Enric Tobella
2023-10-17 16:12:22 +02:00
committed by Víctor Martínez
parent 311a63b0be
commit e8b08a7bef
5 changed files with 79 additions and 73 deletions

View File

@@ -7,7 +7,7 @@ Account Loan management
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0dab443fe08c3c4ec036abf6fb0c92c55d0828b818fb4d92555d6bc7da49f0bb
!! source digest: sha256:9d9d51c74c42f5705d82ebe5c4b6d546f2a8b378874d0ac2c3c88af99abfa3fe
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png

View File

@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Loan management",
"version": "16.0.1.0.1",
"version": "16.0.1.0.2",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",
"license": "AGPL-3",

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0dab443fe08c3c4ec036abf6fb0c92c55d0828b818fb4d92555d6bc7da49f0bb
!! source digest: sha256:9d9d51c74c42f5705d82ebe5c4b6d546f2a8b378874d0ac2c3c88af99abfa3fe
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/account-financial-tools/tree/16.0/account_loan"><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 image-reference" href="https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_loan"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of accounting to support loans.

View File

@@ -1,5 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="account_loan_line_tree" model="ir.ui.view">
<field name="name">account.loan.line.tree</field>
<field name="model">account.loan.line</field>
<field name="priority">99</field>
<field name="arch" type="xml">
<tree create="0">
<field name="sequence" />
<field name="date" />
<field name="rate" />
<field name="pending_principal_amount" />
<field name="payment_amount" sum="Total payments" />
<field name="principal_amount" />
<field name="interests_amount" sum="Total interests" />
<field
name="long_term_pending_principal_amount"
attrs="{'invisible': [('long_term_loan_account_id', '=', False)]}"
/>
<field
name="long_term_principal_amount"
attrs="{'invisible': [('long_term_loan_account_id', '=', False)]}"
/>
<field name="long_term_loan_account_id" invisible="1" />
<field name="loan_state" invisible="1" />
<field name="is_leasing" invisible="1" />
<field name="has_invoices" invisible="1" />
<field name="has_moves" invisible="1" />
<field name="currency_id" invisible="1" />
<button
name="view_account_values"
string="Values"
type="object"
icon="fa-eye"
attrs="{'invisible': [('has_moves', '=', False), ('has_invoices', '=', False)]}"
/>
<button
name="view_process_values"
string="Process"
type="object"
icon="fa-cogs"
attrs="{'invisible': ['|', '|', ('has_moves', '=', True), ('has_invoices', '=', True), ('loan_state', '!=', 'posted')]}"
/>
</tree>
</field>
</record>
<record id="account_loan_line_form" model="ir.ui.view">
<field name="name">account.loan.line.form</field>
<field name="model">account.loan.line</field>
<field name="arch" type="xml">
<form>
<group>
<field name="sequence" />
<field name="rate" />
<field name="date" />
</group>
<group>
<group>
<field name="pending_principal_amount" />
<field name="payment_amount" />
<field name="principal_amount" />
<field name="interests_amount" />
<field name="final_pending_principal_amount" />
</group>
<group>
<field name="long_term_pending_principal_amount" />
<field name="long_term_principal_amount" />
</group>
</group>
</form>
</field>
</record>
<record id="account_loan_lines_view" model="ir.ui.view">
<field name="name">account.loan.lines.view</field>
<field name="model">account.loan.line</field>

View File

@@ -130,7 +130,10 @@
</group>
<notebook>
<page string="Items" id="items">
<field name="line_ids" />
<field
name="line_ids"
context="{'tree_view_ref': 'account_loan.account_loan_line_tree'}"
/>
</page>
<page string="Accounts" id="accounting">
<group>
@@ -182,75 +185,7 @@
</form>
</field>
</record>
<record id="account_loan_line_tree" model="ir.ui.view">
<field name="name">account.loan.line.tree</field>
<field name="model">account.loan.line</field>
<field name="arch" type="xml">
<tree create="0">
<field name="sequence" />
<field name="date" />
<field name="rate" />
<field name="pending_principal_amount" />
<field name="payment_amount" sum="Total payments" />
<field name="principal_amount" />
<field name="interests_amount" sum="Total interests" />
<field
name="long_term_pending_principal_amount"
attrs="{'invisible': [('long_term_loan_account_id', '=', False)]}"
/>
<field
name="long_term_principal_amount"
attrs="{'invisible': [('long_term_loan_account_id', '=', False)]}"
/>
<field name="long_term_loan_account_id" invisible="1" />
<field name="loan_state" invisible="1" />
<field name="is_leasing" invisible="1" />
<field name="has_invoices" invisible="1" />
<field name="has_moves" invisible="1" />
<field name="currency_id" invisible="1" />
<button
name="view_account_values"
string="Values"
type="object"
icon="fa-eye"
attrs="{'invisible': [('has_moves', '=', False), ('has_invoices', '=', False)]}"
/>
<button
name="view_process_values"
string="Process"
type="object"
icon="fa-cogs"
attrs="{'invisible': ['|', '|', ('has_moves', '=', True), ('has_invoices', '=', True), ('loan_state', '!=', 'posted')]}"
/>
</tree>
</field>
</record>
<record id="account_loan_line_form" model="ir.ui.view">
<field name="name">account.loan.line.form</field>
<field name="model">account.loan.line</field>
<field name="arch" type="xml">
<form>
<group>
<field name="sequence" />
<field name="rate" />
<field name="date" />
</group>
<group>
<group>
<field name="pending_principal_amount" />
<field name="payment_amount" />
<field name="principal_amount" />
<field name="interests_amount" />
<field name="final_pending_principal_amount" />
</group>
<group>
<field name="long_term_pending_principal_amount" />
<field name="long_term_principal_amount" />
</group>
</group>
</form>
</field>
</record>
<record id="account_loan_action" model="ir.actions.act_window">
<field name="name">Loans</field>
<field name="res_model">account.loan</field>