Skip to content

Commit

Permalink
[NEW] contract_invoice_auto_post: to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelcalerosolis committed Oct 26, 2023
1 parent 38b3557 commit 1f06eb0
Show file tree
Hide file tree
Showing 14 changed files with 756 additions and 0 deletions.
86 changes: 86 additions & 0 deletions contract_invoice_auto_post/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
==========================
Contract Invoice Auto Post
==========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fcontract-lightgray.png?logo=github
:target: https://github.com/OCA/contract/tree/16.0/contract_invoice_auto_post
:alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_invoice_auto_post
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/110/16.0
:alt: Try me on Runbot

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

This module gets the value of the auto post variable in client contract and it
automatically transfers the value of the variable to the invoice. Moreover,
it will check periodically the status of this value and will confirm the
invoice when it is programed to happen.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/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/contract/issues/new?body=module:%20contract_invoice_auto_post%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.

Credits
=======

Authors
~~~~~~~

* Xtendoo

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

* `Xtendoo <https://www.xtendoo.es>`_:

* Carlos Camacho

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-florian-dacosta| image:: https://github.com/florian-dacosta.png?size=40px
:target: https://github.com/florian-dacosta
:alt: florian-dacosta

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

|maintainer-florian-dacosta|

This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/16.0/contract_invoice_auto_post>`_ 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 contract_invoice_auto_post/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions contract_invoice_auto_post/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2019-2020 Akretion France (http://www.akretion.com/)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Contract Invoice Auto Post",
"version": "16.0.1.0.0",
"category": "Contract Management",
"author": "Xtendoo, Odoo Community Association (OCA)",
"maintainers": ["florian-dacosta"],
"website": "https://github.com/OCA/contract",
"depends": [
"contract",
],
"data": [
"views/contract_view.xml",
],
"license": "AGPL-3",
"installable": True,
}
58 changes: 58 additions & 0 deletions contract_invoice_auto_post/i18n/contract_invoice_auto_post.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_invoice_auto_post
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-24 12:23+0000\n"
"PO-Revision-Date: 2023-10-24 12:23+0000\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: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__at_date
msgid "At Date"
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model.fields,field_description:contract_invoice_auto_post.field_contract_contract__auto_post
msgid "Auto-post"
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model,name:contract_invoice_auto_post.model_contract_contract
msgid "Contract"
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__monthly
msgid "Monthly"
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__no
msgid "No"
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__quarterly
msgid "Quarterly"
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model.fields,help:contract_invoice_auto_post.field_contract_contract__auto_post
msgid ""
"Specify whether this entry is posted automatically on its accounting date, "
"and any similar recurring invoices."
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__yearly
msgid "Yearly"
msgstr ""
60 changes: 60 additions & 0 deletions contract_invoice_auto_post/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_invoice_auto_post
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-24 12:23+0000\n"
"PO-Revision-Date: 2023-10-24 12:23+0000\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: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__at_date
msgid "At Date"
msgstr "En fecha"

#. module: contract_invoice_auto_post
#: model:ir.model.fields,field_description:contract_invoice_auto_post.field_contract_contract__auto_post
msgid "Auto-post"
msgstr "Publicar automáticamente"

#. module: contract_invoice_auto_post
#: model:ir.model,name:contract_invoice_auto_post.model_contract_contract
msgid "Contract"
msgstr "Contrato"

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__monthly
msgid "Monthly"
msgstr "Mensual"

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__no
msgid "No"
msgstr ""

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__quarterly
msgid "Quarterly"
msgstr "Trimestralmente"

#. module: contract_invoice_auto_post
#: model:ir.model.fields,help:contract_invoice_auto_post.field_contract_contract__auto_post
msgid ""
"Specify whether this entry is posted automatically on its accounting date, "
"and any similar recurring invoices."
msgstr ""
"Indica si esta entrada se contabiliza automáticamente en su fecha contable "
"y en facturas recurrentes similares."

#. module: contract_invoice_auto_post
#: model:ir.model.fields.selection,name:contract_invoice_auto_post.selection__contract_contract__auto_post__yearly
msgid "Yearly"
msgstr "Anualmente"
1 change: 1 addition & 0 deletions contract_invoice_auto_post/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import contract
35 changes: 35 additions & 0 deletions contract_invoice_auto_post/models/contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2019-2020 Akretion France (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ContractContract(models.Model):
_inherit = "contract.contract"

auto_post = fields.Selection(
string="Auto-post",
selection=[
("no", "No"),
("at_date", "At Date"),
("monthly", "Monthly"),
("quarterly", "Quarterly"),
("yearly", "Yearly"),
],
default="no",
required=True,
copy=False,
help="Specify whether this entry is posted automatically on its accounting date, and any similar recurring invoices.",
)

def _prepare_invoice(self, date_invoice, journal=None):
invoice_vals = super()._prepare_invoice(
date_invoice=date_invoice, journal=journal
)
if self.auto_post:
invoice_vals.update(
{
"auto_post": self.auto_post,
}
)
return invoice_vals
3 changes: 3 additions & 0 deletions contract_invoice_auto_post/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Xtendoo <https://www.xtendoo.es>`_:

* Carlos Camacho
4 changes: 4 additions & 0 deletions contract_invoice_auto_post/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module gets the value of the auto post variable in client contract and it
automatically transfers the value of the variable to the invoice. Moreover,
it will check periodically the status of this value and will confirm the
invoice when it is programed to happen.
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 1f06eb0

Please sign in to comment.