-
-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
18 changed files
with
732 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
======================= | ||
Account Invoice CRM Tag | ||
======================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:841df5b6ec6c5547b7ff726b3f1bfd002910fc4b1b51e1779b387eaf874d801b | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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_invoice_crm_tag | ||
: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_invoice_crm_tag | ||
: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| | ||
|
||
This module links the tags assigned to sale_orders with its respective invoices. These tags | ||
are also linked to the return if it is made. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
#. Configure a sale_order | ||
#. Go to *Other info* -> *Tags* and add your desired tags to the sale order. | ||
#. When you create an invoice of the sale order, its assigned tags will be linked to | ||
the created invoice | ||
|
||
|
||
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_crm_tag%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 | ||
~~~~~~~ | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Stefan Ungureanu | ||
|
||
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/16.0/account_invoice_crm_tag>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import models | ||
from . import report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2023 Tecnativa - Stefan Ungureanu | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Account Invoice CRM Tag", | ||
"version": "15.0.1.0.0", | ||
"category": "Accounting", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/account-invoicing", | ||
"license": "AGPL-3", | ||
"depends": ["sale"], | ||
"data": [ | ||
"views/account_invoice_views.xml", | ||
"report/account_invoice_report.xml", | ||
], | ||
"application": False, | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * account_invoice_crm_tag | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-07-14 06:55+0000\n" | ||
"PO-Revision-Date: 2023-07-14 06:55+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: account_invoice_crm_tag | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_invoice_report__tag_ids | ||
msgid "Invoice CRM Tags" | ||
msgstr "" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_bank_statement_line__tags_ids | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_move__tags_ids | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_payment__tags_ids | ||
msgid "Invoice CRM tags" | ||
msgstr "" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model,name:account_invoice_crm_tag.model_account_invoice_report | ||
msgid "Invoices Statistics" | ||
msgstr "" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model,name:account_invoice_crm_tag.model_account_move | ||
msgid "Journal Entry" | ||
msgstr "" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model,name:account_invoice_crm_tag.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * account_invoice_crm_tag | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-07-14 06:55+0000\n" | ||
"PO-Revision-Date: 2023-07-14 08:57+0200\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: es_ES\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Generator: Poedit 3.0.1\n" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_invoice_report__tag_ids | ||
msgid "Invoice CRM Tags" | ||
msgstr "Etiquetas CRM de facturas" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_bank_statement_line__tags_ids | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_move__tags_ids | ||
#: model:ir.model.fields,field_description:account_invoice_crm_tag.field_account_payment__tags_ids | ||
msgid "Invoice CRM tags" | ||
msgstr "Etiquetas CRM de facturas" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model,name:account_invoice_crm_tag.model_account_invoice_report | ||
msgid "Invoices Statistics" | ||
msgstr "Estadísticas de facturas" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model,name:account_invoice_crm_tag.model_account_move | ||
msgid "Journal Entry" | ||
msgstr "Asiento contable" | ||
|
||
#. module: account_invoice_crm_tag | ||
#: model:ir.model,name:account_invoice_crm_tag.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Pedido de venta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import account_move | ||
from . import sale_order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2023 Tecnativa - Stefan Ungureanu | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from odoo import fields, models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
tag_ids = fields.Many2many(comodel_name="crm.tag", string="Invoice CRM tags") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2023 Tecnativa - Stefan Ungureanu | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from odoo import models | ||
|
||
|
||
class SaleOrder(models.Model): | ||
_inherit = "sale.order" | ||
|
||
def _prepare_invoice(self): | ||
vals = super()._prepare_invoice() | ||
if self.tag_ids: | ||
vals["tag_ids"] = [(6, 0, self.tag_ids.ids)] | ||
return vals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Stefan Ungureanu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module links the tags assigned to sale_orders with its respective invoices. These tags | ||
are also linked to the return if it is made. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#. Configure a sale_order | ||
#. Go to *Other info* -> *Tags* and add your desired tags to the sale order. | ||
#. When you create an invoice of the sale order, its assigned tags will be linked to | ||
the created invoice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import account_invoice_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2023 Tecnativa - Stefan Ungureanu | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class AccountInvoiceReport(models.Model): | ||
_inherit = "account.invoice.report" | ||
|
||
tag_ids = fields.Many2many( | ||
comodel_name="crm.tag", | ||
relation="account_move_crm_tag_rel", | ||
column1="account_move_id", | ||
column2="crm_tag_id", | ||
string="Invoice CRM Tags", | ||
readonly=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
Copyright 2023 Tecnativa - Stefan Ungureanu | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<odoo noupdate="1"> | ||
<record id="view_account_invoice_report_search" model="ir.ui.view"> | ||
<field name="name">account.invoice.report.search</field> | ||
<field name="model">account.invoice.report</field> | ||
<field name="inherit_id" ref="account.view_account_invoice_report_search" /> | ||
<field name="arch" type="xml"> | ||
<field name="partner_id" position="after"> | ||
<field name="tag_ids" /> | ||
</field> | ||
<filter name="category_product" position="after"> | ||
<filter | ||
string="CRM Tags" | ||
name="tag_ids" | ||
context="{'group_by': 'tag_ids'}" | ||
/> | ||
</filter> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
Oops, something went wrong.