[IMP] account_payment_partner: Add Payment mode to Invoices Analysis

This commit is contained in:
Víctor Martínez
2021-08-18 08:15:22 +02:00
parent 16d1f5c7f3
commit d740f6f9a6
8 changed files with 54 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ Account Payment Partner
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
This module adds severals fields: This module adds several fields:
* the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, * the *Supplier Payment Mode* and *Customer Payment Mode* on Partners,
@@ -37,6 +37,8 @@ This module adds severals fields:
* the *Bank account from journals* on Payment Mode. * the *Bank account from journals* on Payment Mode.
* the *Payment mode* on Invoices Analysis.
On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will
be filtered per Payment Mode. be filtered per Payment Mode.

View File

@@ -1,3 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models from . import models
from . import reports

View File

@@ -19,6 +19,7 @@
"views/account_move_line.xml", "views/account_move_line.xml",
"views/account_payment_mode.xml", "views/account_payment_mode.xml",
"views/report_invoice.xml", "views/report_invoice.xml",
"reports/account_invoice_report_view.xml",
], ],
"demo": ["demo/partner_demo.xml"], "demo": ["demo/partner_demo.xml"],
"installable": True, "installable": True,

View File

@@ -1,4 +1,4 @@
This module adds severals fields: This module adds several fields:
* the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, * the *Supplier Payment Mode* and *Customer Payment Mode* on Partners,
@@ -10,6 +10,8 @@ This module adds severals fields:
* the *Bank account from journals* on Payment Mode. * the *Bank account from journals* on Payment Mode.
* the *Payment mode* on Invoices Analysis.
On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will
be filtered per Payment Mode. be filtered per Payment Mode.

View File

@@ -0,0 +1 @@
from . import account_invoice_report

View File

@@ -0,0 +1,18 @@
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountInvoiceReport(models.Model):
_inherit = "account.invoice.report"
payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode",
string="Payment mode",
readonly=True,
)
def _select(self):
select_str = super()._select()
return "%s, move.payment_mode_id AS payment_mode_id" % select_str

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2021 Tecnativa - Víctor Martínez
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="view_account_invoice_report_search" model="ir.ui.view">
<field name="name">account.invoice.report.search</field>
<field name="model">account.invoice.report</field>
<field name="inherit_id" ref="account.view_account_invoice_report_search" />
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="payment_mode_id" />
</field>
<filter name="category_product" position="after">
<filter
string="Payment Mode"
name="payment_mode_id"
context="{'group_by': 'payment_mode_id'}"
/>
</filter>
</field>
</record>
</odoo>

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <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>Account Payment Partner</title> <title>Account Payment Partner</title>
<style type="text/css"> <style type="text/css">
@@ -368,13 +368,14 @@ ul.auto-toc {
!! changes will be overwritten. !! !! 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/bank-payment/tree/14.0/account_payment_partner"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_partner"><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/173/14.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/bank-payment/tree/14.0/account_payment_partner"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_partner"><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/173/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adds severals fields:</p> <p>This module adds several fields:</p>
<ul class="simple"> <ul class="simple">
<li>the <em>Supplier Payment Mode</em> and <em>Customer Payment Mode</em> on Partners,</li> <li>the <em>Supplier Payment Mode</em> and <em>Customer Payment Mode</em> on Partners,</li>
<li>the <em>Payment Mode</em> on Invoices.</li> <li>the <em>Payment Mode</em> on Invoices.</li>
<li>the <em>Show bank account</em> on Payment Mode.</li> <li>the <em>Show bank account</em> on Payment Mode.</li>
<li>the <em># of digits for customer bank account</em> on Payment Mode.</li> <li>the <em># of digits for customer bank account</em> on Payment Mode.</li>
<li>the <em>Bank account from journals</em> on Payment Mode.</li> <li>the <em>Bank account from journals</em> on Payment Mode.</li>
<li>the <em>Payment mode</em> on Invoices Analysis.</li>
</ul> </ul>
<p>On a Payment Order, in the wizard <em>Select Invoices to Pay</em>, the invoices will <p>On a Payment Order, in the wizard <em>Select Invoices to Pay</em>, the invoices will
be filtered per Payment Mode.</p> be filtered per Payment Mode.</p>