Skip to content

Commit

Permalink
[MIG] account_cash_invoice: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-lopez-tecnativa committed Jul 1, 2024
1 parent d176a16 commit 824b2ff
Show file tree
Hide file tree
Showing 18 changed files with 241 additions and 374 deletions.
25 changes: 13 additions & 12 deletions account_cash_invoice/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Account cash invoice
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github
:target: https://github.com/OCA/account-payment/tree/14.0/account_cash_invoice
:target: https://github.com/OCA/account-payment/tree/16.0/account_cash_invoice
:alt: OCA/account-payment
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-payment-14-0/account-payment-14-0-account_cash_invoice
:target: https://translation.odoo-community.org/projects/account-payment-16-0/account-payment-16-0-account_cash_invoice
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-payment&target_branch=14.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-payment&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -42,28 +42,26 @@ Usage
#. Go to *Settings* and activate the developer mode.
#. Go to *Settings / Users & Companies / Users* and set the flag
'Show Full Accounting Features'.
#. Go to *Invoicing / Dashboard* and create and/or open an existing
Cash Statement from a Cash Journal.
#. Press the button **Pay Invoice** to pay a Supplier Invoice or a Customer
Refund. You will need to select the expected Journal
#. Select **Collect Payment from Invoice** in to receive a payment of an
existing Customer Invoice or a Supplier Refund.
#. Press **Validate** on the statement. The payment will then be reconciled
#. Go to *Invoicing / Dashboard* from a Cash Journal.
#. On the Additional options, Press the button **Pay Invoice** to pay a Supplier a Customer Invoice/Refund.
#. Select the invoice type and select invoice to pay.
#. Press **Pay invoice** on the statement. The payment will then be reconciled
with the invoice.

Known issues / Roadmap
======================

* Cannot pay invoices in a different currency than that defined in the journal
associated to the payment method used to pay/collect payment.
* Cannot select a specific journal item on invoice with some lines(i.e. when use Payment terms)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-payment/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-payment/issues/new?body=module:%20account_cash_invoice%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-payment/issues/new?body=module:%20account_cash_invoice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -82,6 +80,9 @@ Contributors
* Jordi Ballester <jordi.ballester@eficent.com>
* Jaime Arroyo <jaime.arroyo@creublanca.es>
* Manuel Alejandro <buzondemam@gmail.com>
* `Tecnativa <https://www.tecnativa.com>`_:

* Carlos Lopez<carlos.lopez@tecnativa.com>

Maintainers
~~~~~~~~~~~
Expand All @@ -96,6 +97,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/account-payment <https://github.com/OCA/account-payment/tree/14.0/account_cash_invoice>`_ project on GitHub.
This module is part of the `OCA/account-payment <https://github.com/OCA/account-payment/tree/16.0/account_cash_invoice>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
6 changes: 3 additions & 3 deletions account_cash_invoice/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Account cash invoice",
"version": "14.0.1.3.0",
"version": "16.0.1.0.0",
"category": "Accounting",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-payment",
Expand All @@ -12,7 +12,7 @@
"depends": ["account"],
"data": [
"security/ir.model.access.csv",
"wizard/cash_invoice_out.xml",
"wizard/cash_invoice_in.xml",
"wizard/cash_pay_invoice.xml",
"views/account_journal_dashboard_view.xml",
],
}
2 changes: 1 addition & 1 deletion account_cash_invoice/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from . import account_bank_statement_line
from . import account_bank_statement
from . import account_move
20 changes: 0 additions & 20 deletions account_cash_invoice/models/account_bank_statement.py

This file was deleted.

23 changes: 23 additions & 0 deletions account_cash_invoice/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2021 Creu Blanca
# Copyright (C) 2024 Tecnativa <https://tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class AccountMove(models.Model):
_inherit = "account.move"

def _post(self, soft=True):
statement_lines_to_reconcile = self.filtered(
lambda move: move.state != "posted" and move.statement_line_id.invoice_id
).mapped("statement_line_id")
result = super()._post(soft=soft)
for statement_line in statement_lines_to_reconcile:
(
statement_line.invoice_id.line_ids | statement_line.move_id.line_ids
).filtered(
lambda l: l.account_id.account_type
in ("asset_receivable", "liability_payable")
).reconcile()
return result
3 changes: 3 additions & 0 deletions account_cash_invoice/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
* Jordi Ballester <jordi.ballester@eficent.com>
* Jaime Arroyo <jaime.arroyo@creublanca.es>
* Manuel Alejandro <buzondemam@gmail.com>
* `Tecnativa <https://www.tecnativa.com>`_:

* Carlos Lopez<carlos.lopez@tecnativa.com>
1 change: 1 addition & 0 deletions account_cash_invoice/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* Cannot pay invoices in a different currency than that defined in the journal
associated to the payment method used to pay/collect payment.
* Cannot select a specific journal item on invoice with some lines(i.e. when use Payment terms)
11 changes: 4 additions & 7 deletions account_cash_invoice/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#. Go to *Settings* and activate the developer mode.
#. Go to *Settings / Users & Companies / Users* and set the flag
'Show Full Accounting Features'.
#. Go to *Invoicing / Dashboard* and create and/or open an existing
Cash Statement from a Cash Journal.
#. Press the button **Pay Invoice** to pay a Supplier Invoice or a Customer
Refund. You will need to select the expected Journal
#. Select **Collect Payment from Invoice** in to receive a payment of an
existing Customer Invoice or a Supplier Refund.
#. Press **Validate** on the statement. The payment will then be reconciled
#. Go to *Invoicing / Dashboard* from a Cash Journal.
#. On the Additional options, Press the button **Pay Invoice** to pay a Supplier a Customer Invoice/Refund.
#. Select the invoice type and select invoice to pay.
#. Press **Pay invoice** on the statement. The payment will then be reconciled
with the invoice.
3 changes: 1 addition & 2 deletions account_cash_invoice/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_cash_invoice_in,access_cash_invoice_in,model_cash_invoice_in,base.group_user,1,1,1,1
access_cash_invoice_out,access_cash_invoice_out,model_cash_invoice_out,base.group_user,1,1,1,1
access_cash_pay_invoice,access_cash_pay_invoice,model_cash_pay_invoice,base.group_user,1,1,1,1
38 changes: 23 additions & 15 deletions account_cash_invoice/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -369,7 +368,7 @@ <h1 class="title">Account cash invoice</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3c80cda9cf12062ae728ee9d546c9363dc87f09fba3248d8ed5867f63ca777e3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-payment/tree/14.0/account_cash_invoice"><img alt="OCA/account-payment" src="https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-payment-14-0/account-payment-14-0-account_cash_invoice"><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-payment&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-payment/tree/16.0/account_cash_invoice"><img alt="OCA/account-payment" src="https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-payment-16-0/account-payment-16-0-account_cash_invoice"><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-payment&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 modules allows to pay an existing Supplier Invoice / Customer Refund, or
to collect payment for an existing Customer Invoice from a Cash Statement.</p>
<p><strong>Table of contents</strong></p>
Expand All @@ -392,13 +391,10 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<li>Go to <em>Settings</em> and activate the developer mode.</li>
<li>Go to <em>Settings / Users &amp; Companies / Users</em> and set the flag
‘Show Full Accounting Features’.</li>
<li>Go to <em>Invoicing / Dashboard</em> and create and/or open an existing
Cash Statement from a Cash Journal.</li>
<li>Press the button <strong>Pay Invoice</strong> to pay a Supplier Invoice or a Customer
Refund. You will need to select the expected Journal</li>
<li>Select <strong>Collect Payment from Invoice</strong> in to receive a payment of an
existing Customer Invoice or a Supplier Refund.</li>
<li>Press <strong>Validate</strong> on the statement. The payment will then be reconciled
<li>Go to <em>Invoicing / Dashboard</em> from a Cash Journal.</li>
<li>On the Additional options, Press the button <strong>Pay Invoice</strong> to pay a Supplier a Customer Invoice/Refund.</li>
<li>Select the invoice type and select invoice to pay.</li>
<li>Press <strong>Pay invoice</strong> on the statement. The payment will then be reconciled
with the invoice.</li>
</ol>
</div>
Expand All @@ -407,14 +403,15 @@ <h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>Cannot pay invoices in a different currency than that defined in the journal
associated to the payment method used to pay/collect payment.</li>
<li>Cannot select a specific journal item on invoice with some lines(i.e. when use Payment terms)</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-payment/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-payment/issues/new?body=module:%20account_cash_invoice%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-payment/issues/new?body=module:%20account_cash_invoice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -427,11 +424,22 @@ <h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul>
<li><p class="first">Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</p>
</li>
<li><p class="first">Jordi Ballester &lt;<a class="reference external" href="mailto:jordi.ballester&#64;eficent.com">jordi.ballester&#64;eficent.com</a>&gt;</p>
</li>
<li><p class="first">Jaime Arroyo &lt;<a class="reference external" href="mailto:jaime.arroyo&#64;creublanca.es">jaime.arroyo&#64;creublanca.es</a>&gt;</p>
</li>
<li><p class="first">Manuel Alejandro &lt;<a class="reference external" href="mailto:buzondemam&#64;gmail.com">buzondemam&#64;gmail.com</a>&gt;</p>
</li>
<li><p class="first"><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</p>
<blockquote>
<ul class="simple">
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
<li>Jordi Ballester &lt;<a class="reference external" href="mailto:jordi.ballester&#64;eficent.com">jordi.ballester&#64;eficent.com</a>&gt;</li>
<li>Jaime Arroyo &lt;<a class="reference external" href="mailto:jaime.arroyo&#64;creublanca.es">jaime.arroyo&#64;creublanca.es</a>&gt;</li>
<li>Manuel Alejandro &lt;<a class="reference external" href="mailto:buzondemam&#64;gmail.com">buzondemam&#64;gmail.com</a>&gt;</li>
<li>Carlos Lopez&lt;<a class="reference external" href="mailto:carlos.lopez&#64;tecnativa.com">carlos.lopez&#64;tecnativa.com</a>&gt;</li>
</ul>
</blockquote>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -441,7 +449,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-payment/tree/14.0/account_cash_invoice">OCA/account-payment</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-payment/tree/16.0/account_cash_invoice">OCA/account-payment</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Loading

0 comments on commit 824b2ff

Please sign in to comment.