Skip to content

Commit

Permalink
Merge PR #2268 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Jan 31, 2023
2 parents 1fe8706 + 23db094 commit 17392b4
Show file tree
Hide file tree
Showing 24 changed files with 954 additions and 0 deletions.
114 changes: 114 additions & 0 deletions l10n_br_account_due_list/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
==========================
Brazilian Account Due List
==========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_account_due_list
:alt: OCA/l10n-brazil
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-brazil-14-0/l10n-brazil-14-0-l10n_br_account_due_list
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/124/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module creates the financial_move_line_ids field to list the payable or receivable account move line on invoices.

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to:

* do this ...

Configuration
=============

This module does not need any configuration.

Usage
=====

In the invoice form view, there will be two tabs:

* Receivable in the case of customer invoices and payable in the case of supplier invoices:

.. image:: https://raw.githubusercontent.com/OCA/l10n-brazil/14.0/l10n_br_account_due_list/static/img/l10n_br_account_due_list_receivable.png

* Payments with list of invoice payments:

.. image:: https://raw.githubusercontent.com/OCA/l10n-brazil/14.0/l10n_br_account_due_list/static/img/l10n_br_account_due_list_payable.png

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-brazil/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 <https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_account_due_list%0Aversion:%2014.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.

Credits
=======

Authors
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* `AKRETION <https://akretion.com/pt-BR/>`_:

* Renato Lima <[email protected]>
* Raphaël Valyi <[email protected]>

* Antonio Neto <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-renatonlima| image:: https://github.com/renatonlima.png?size=40px
:target: https://github.com/renatonlima
:alt: renatonlima
.. |maintainer-rvalyi| image:: https://github.com/rvalyi.png?size=40px
:target: https://github.com/rvalyi
:alt: rvalyi

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-renatonlima| |maintainer-rvalyi|

This module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_account_due_list>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions l10n_br_account_due_list/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
19 changes: 19 additions & 0 deletions l10n_br_account_due_list/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2021 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Brazilian Account Due List",
"category": "Localisation",
"development_status": "Production/Stable",
"license": "AGPL-3",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-brazil",
"version": "16.0.1.0.0",
"depends": ["account_due_list"],
"data": [
"views/account_invoice_view.xml",
],
"installable": True,
"auto_install": True,
"maintainers": ["renatonlima", "rvalyi"],
}
63 changes: 63 additions & 0 deletions l10n_br_account_due_list/i18n/l10n_br_account_due_list.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_br_account_due_list
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__display_name
msgid "Display Name"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__financial_move_line_ids
msgid "Financial Move Lines"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__id
msgid "ID"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model,name:l10n_br_account_due_list.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move____last_update
msgid "Last Modified on"
msgstr ""

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payables"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__payment_move_line_ids
msgid "Payment Move Lines"
msgstr ""

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payments"
msgstr ""

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Receivables"
msgstr ""
66 changes: 66 additions & 0 deletions l10n_br_account_due_list/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_br_account_due_list
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-01-07 20:39+0000\n"
"Last-Translator: Marcel Savegnago <[email protected]>\n"
"Language-Team: none\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__display_name
msgid "Display Name"
msgstr "Nome Exibido"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__financial_move_line_ids
msgid "Financial Move Lines"
msgstr "Linhas de Movimentação Financeira"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__id
msgid "ID"
msgstr "ID"

#. module: l10n_br_account_due_list
#: model:ir.model,name:l10n_br_account_due_list.model_account_move
msgid "Journal Entry"
msgstr "Lançamento de Diário"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move____last_update
msgid "Last Modified on"
msgstr "Última Modificação em"

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payables"
msgstr "Contas a Pagar"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__payment_move_line_ids
msgid "Payment Move Lines"
msgstr "Linhas de Movimento para Pagamento"

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payments"
msgstr "Pagamentos"

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Receivables"
msgstr "Contas a Receber"
3 changes: 3 additions & 0 deletions l10n_br_account_due_list/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import account_invoice
41 changes: 41 additions & 0 deletions l10n_br_account_due_list/models/account_invoice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (C) 2021 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import api, fields, models


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

financial_move_line_ids = fields.Many2many(
comodel_name="account.move.line",
relation="account_invoice_account_financial_move_line_rel",
compute="_compute_financial",
store=True,
string="Financial Move Lines",
)

payment_move_line_ids = fields.Many2many(
"account.move.line",
string="Payment Move Lines",
compute="_compute_payments",
store=True,
)

@api.depends("line_ids", "state")
def _compute_financial(self):
for move in self:
lines = move.line_ids.filtered(
lambda l: l.account_id.account_type
in ("asset_receivable", "liability_payable")
)
move.financial_move_line_ids = lines.sorted()

@api.depends("line_ids.amount_residual")
def _compute_payments(self):
for move in self:
(
invoice_partials,
exchange_diff_moves,
) = move._get_reconciled_invoices_partials()
move.payment_move_line_ids = [partial[2].id for partial in invoice_partials]
1 change: 1 addition & 0 deletions l10n_br_account_due_list/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module does not need any configuration.
6 changes: 6 additions & 0 deletions l10n_br_account_due_list/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* `AKRETION <https://akretion.com/pt-BR/>`_:

* Renato Lima <[email protected]>
* Raphaël Valyi <[email protected]>

* Antonio Neto <[email protected]>
1 change: 1 addition & 0 deletions l10n_br_account_due_list/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module creates the financial_move_line_ids field to list the payable or receivable account move line on invoices.
Empty file.
3 changes: 3 additions & 0 deletions l10n_br_account_due_list/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To install this module, you need to:

* do this ...
Empty file.
9 changes: 9 additions & 0 deletions l10n_br_account_due_list/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
In the invoice form view, there will be two tabs:

* Receivable in the case of customer invoices and payable in the case of supplier invoices:

.. image:: ../static/img/l10n_br_account_due_list_receivable.png

* Payments with list of invoice payments:

.. image:: ../static/img/l10n_br_account_due_list_payable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 17392b4

Please sign in to comment.