Skip to content

Commit

Permalink
[ADD] account_move_partner_name_history
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAionTech committed Apr 9, 2024
1 parent 70985f1 commit 0676621
Show file tree
Hide file tree
Showing 15 changed files with 667 additions and 0 deletions.
91 changes: 91 additions & 0 deletions account_move_partner_name_history/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
=================================
Account move partner name history
=================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bb99c2a9012b00c6af9cf23906a9d4e323ae62b9da662461d62af3a24c032f89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/16.0/account_move_partner_name_history
: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-16-0/account-invoicing-16-0-account_move_partner_name_history
: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=16.0
:alt: Try me on Runboat

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

Allow to show name of partners at the time of the invoice date.

**Table of contents**

.. contents::
:local:

Usage
=====

Add `use_partner_history_name` to the context and the name of the partner of the account moves will be the one at the invoice date's time.

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_move_partner_name_history%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
~~~~~~~

* Aion Tech

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

* `Aion Tech <https://aiontech.company/>`_:

* Simone Rubino <[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-SirAionTech| image:: https://github.com/SirAionTech.png?size=40px
:target: https://github.com/SirAionTech
:alt: SirAionTech

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

|maintainer-SirAionTech|

This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/16.0/account_move_partner_name_history>`_ 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 account_move_partner_name_history/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)

from . import models
18 changes: 18 additions & 0 deletions account_move_partner_name_history/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 Simone Rubino - Aion Tech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Account move partner name history",
"summary": "Allow to show name of partners at the time of the invoice date.",
"version": "16.0.1.0.0",
"category": "Accounts",
"website": "https://github.com/OCA/account-invoicing",
"author": "Aion Tech, Odoo Community Association (OCA)",
"maintainers": [
"SirAionTech",
],
"license": "AGPL-3",
"depends": [
"account",
"partner_name_history",
],
}
4 changes: 4 additions & 0 deletions account_move_partner_name_history/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import account_move
from . import account_move_line
11 changes: 11 additions & 0 deletions account_move_partner_name_history/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 Simone Rubino - Aion Tech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class AccountMove(models.Model):
_inherit = "account.move"
_partner_name_history_field_map = {
"partner_id": "invoice_date",
}
13 changes: 13 additions & 0 deletions account_move_partner_name_history/models/account_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2024 Simone Rubino - Aion Tech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountMoveLine(models.Model):
_inherit = "account.move.line"
_partner_name_history_field_map = {
"partner_id": "name_history_invoice_date",
}

name_history_invoice_date = fields.Date(related="move_id.invoice_date")
3 changes: 3 additions & 0 deletions account_move_partner_name_history/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Aion Tech <https://aiontech.company/>`_:

* Simone Rubino <[email protected]>
1 change: 1 addition & 0 deletions account_move_partner_name_history/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow to show name of partners at the time of the invoice date.
1 change: 1 addition & 0 deletions account_move_partner_name_history/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `use_partner_history_name` to the context and the name of the partner of the account moves will be the one at the invoice date's time.
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 0676621

Please sign in to comment.