Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] account_invoice_warn_message: Migration to 18.0 #1867

Open
wants to merge 22 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
302e680
[13.0][ADD] account_invoice_warn_message
HviorForgeFlow Apr 2, 2020
2dbac3c
[UPD] Update account_invoice_warn_message.pot
oca-travis Jul 18, 2020
1254932
[UPD] README.rst
OCA-git-bot Jul 18, 2020
c42904b
[FIX] website key in account_invoice_warn_message
sbidoul Jul 19, 2020
1c2ff90
Added translation using Weblate (Spanish)
anasuarez1 Mar 10, 2021
f2c9ede
Translated using Weblate (Spanish)
anasuarez1 Mar 10, 2021
d146dcf
fix calculation when parent has message but partner not
Rad0van May 13, 2021
3951862
account_invoice_warn_message 13.0.1.0.1
OCA-git-bot Nov 23, 2021
da345b2
[UPD] README.rst
OCA-git-bot Sep 3, 2023
54d2e6e
[MIG]account_invoice_warn_message: Migration to 15.0
manuelregidor Oct 30, 2023
91d4a5e
[UPD] Update account_invoice_warn_message.pot
Oct 31, 2023
daa01fa
[BOT] post-merge updates
OCA-git-bot Oct 31, 2023
fe4499d
Update translation files
weblate Oct 31, 2023
a500590
Translated using Weblate (Spanish)
Ivorra78 Nov 1, 2023
11fadca
[IMP] account_invoice_warn_message: black, isort, prettier
JasminSForgeFlow Mar 5, 2024
d9f2c41
[MIG] account_invoice_warn_message: Migration to 17.0
JasminSForgeFlow Mar 5, 2024
5bbdad6
[UPD] Update account_invoice_warn_message.pot
May 2, 2024
0838e14
[BOT] post-merge updates
OCA-git-bot May 2, 2024
6ab78b5
Added translation using Weblate (Italian)
mymage May 3, 2024
0bb7db5
Translated using Weblate (Italian)
mymage May 3, 2024
1f1309d
[IMP] account_invoice_warn_message: pre-commit auto fixes
HeliconiaSolutions Dec 30, 2024
ee78d80
[MIG] account_invoice_warn_message: Migration to 18.0
HeliconiaSolutions Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions account_invoice_warn_message/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
============================
Account Invoice Warn Message
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:eca5433430d160325f358354f076943cfe552784afde295c9959682e98ddee0b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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%2Faccount--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/18.0/account_invoice_warn_message
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-account_invoice_warn_message
: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-invoicing&target_branch=18.0
:alt: Try me on Runboat

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

This module add a warning popup on invoice to ensure warning is
populated no only when partner is changed.

**Table of contents**

.. contents::
:local:

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

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

* ForgeFlow

Contributors
------------

- Héctor Villarreal <[email protected]>
- Manuel Regidor <[email protected]>
- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

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.

This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/18.0/account_invoice_warn_message>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions account_invoice_warn_message/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions account_invoice_warn_message/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Account Invoice Warn Message",
"summary": """
Add a popup warning on invoice to ensure warning is populated""",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-invoicing",
"depends": ["account"],
"data": ["views/account_move_views.xml"],
}
33 changes: 33 additions & 0 deletions account_invoice_warn_message/i18n/account_invoice_warn_message.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_warn_message
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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: account_invoice_warn_message
#: model_terms:ir.ui.view,arch_db:account_invoice_warn_message.view_move_form
msgid ""
"<i class=\"fa fa-info-circle\"/>\n"
" &amp;nbsp;"
msgstr ""

#. module: account_invoice_warn_message
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_bank_statement_line__invoice_warn_msg
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_move__invoice_warn_msg
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_payment__invoice_warn_msg
msgid "Invoice Warn Msg"
msgstr ""

#. module: account_invoice_warn_message
#: model:ir.model,name:account_invoice_warn_message.model_account_move
msgid "Journal Entry"
msgstr ""
41 changes: 41 additions & 0 deletions account_invoice_warn_message/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_warn_message
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-01 21:37+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\n"
"Language: es\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.17\n"

#. module: account_invoice_warn_message
#: model_terms:ir.ui.view,arch_db:account_invoice_warn_message.view_move_form
msgid ""
"<i class=\"fa fa-info-circle\"/>\n"
" &amp;nbsp;"
msgstr ""
"<i class=\"fa fa-info-circle\"/>\n"
" &amp;nbsp;"

#. module: account_invoice_warn_message
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_bank_statement_line__invoice_warn_msg
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_move__invoice_warn_msg
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_payment__invoice_warn_msg
msgid "Invoice Warn Msg"
msgstr "Mensaje Aviso Factura"

#. module: account_invoice_warn_message
#: model:ir.model,name:account_invoice_warn_message.model_account_move
msgid "Journal Entry"
msgstr "Entrada Diaria"

#~ msgid "Journal Entries"
#~ msgstr "Asientos contables"
38 changes: 38 additions & 0 deletions account_invoice_warn_message/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_warn_message
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-03 09:36+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\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.17\n"

#. module: account_invoice_warn_message
#: model_terms:ir.ui.view,arch_db:account_invoice_warn_message.view_move_form
msgid ""
"<i class=\"fa fa-info-circle\"/>\n"
" &amp;nbsp;"
msgstr ""
"<i class=\"fa fa-info-circle\"/>\n"
" &amp;nbsp;"

#. module: account_invoice_warn_message
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_bank_statement_line__invoice_warn_msg
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_move__invoice_warn_msg
#: model:ir.model.fields,field_description:account_invoice_warn_message.field_account_payment__invoice_warn_msg
msgid "Invoice Warn Msg"
msgstr "Messaggio avviso fattura"

#. module: account_invoice_warn_message
#: model:ir.model,name:account_invoice_warn_message.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"
1 change: 1 addition & 0 deletions account_invoice_warn_message/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_move
36 changes: 36 additions & 0 deletions account_invoice_warn_message/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


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

invoice_warn_msg = fields.Text(compute="_compute_invoice_warn_msg")

@api.depends(
"move_type",
"state",
"partner_id.invoice_warn",
"partner_id.parent_id.invoice_warn",
)
def _compute_invoice_warn_msg(self):
for rec in self:
if (
rec.partner_id
and rec.move_type in ("out_invoice", "out_refund")
and rec.state == "draft"
):
if (
rec.partner_id.parent_id
and rec.partner_id.parent_id.invoice_warn == "warning"
):
rec.invoice_warn_msg = rec.partner_id.parent_id.invoice_warn_msg
if rec.partner_id.invoice_warn == "warning":
rec.invoice_warn_msg += f"\n{rec.partner_id.invoice_warn_msg}"
continue
elif rec.partner_id.invoice_warn == "warning":
rec.invoice_warn_msg = rec.partner_id.invoice_warn_msg
continue
rec.invoice_warn_msg = False
3 changes: 3 additions & 0 deletions account_invoice_warn_message/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions account_invoice_warn_message/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Héctor Villarreal \<<[email protected]>\>
- Manuel Regidor \<<[email protected]>\>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_
2 changes: 2 additions & 0 deletions account_invoice_warn_message/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module add a warning popup on invoice to ensure warning is
populated no only when partner is changed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading