-
-
Notifications
You must be signed in to change notification settings - Fork 202
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 rafaelbn
- Loading branch information
Showing
22 changed files
with
910 additions
and
0 deletions.
There are no files selected for viewing
132 changes: 132 additions & 0 deletions
132
partner_risk_insurance_product_sticker_invoice_report/README.rst
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,132 @@ | ||
====================================================== | ||
Product Sticker on Invoice Reports with Risk Insurance | ||
====================================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:49ffcf6ba9884b4035121f18dc2cd7b402501ee0384979b1ec5d7cf1c8dc8f87 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Alpha | ||
.. |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%2Fcredit--control-lightgray.png?logo=github | ||
:target: https://github.com/OCA/credit-control/tree/16.0/partner_risk_insurance_product_sticker_invoice_report | ||
:alt: OCA/credit-control | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-partner_risk_insurance_product_sticker_invoice_report | ||
: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/credit-control&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends the functionality of Risk Insurance to support | ||
display Insurance company logos and to allow you to reflect on your | ||
invoices that those operations are insured. | ||
|
||
.. IMPORTANT:: | ||
This is an alpha version, the data model and design can change at any time without warning. | ||
Only for development or testing purpose, do not use in production. | ||
`More details on development status <https://odoo-community.org/page/development-status>`_ | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Use Cases / Context | ||
=================== | ||
|
||
This module was developed because sometimes you want to reflect on your | ||
Invoices that some Insured company are insuring the invoice. | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
1. Set default Sticker Positions on Invoice Settings > Show Product | ||
Stickers. | ||
2. Enable Sales Credit Limit option on Invoice Settings > Invoicing > | ||
Customer Invoices. | ||
3. Go to Settings > Technical > Database Structure > Product Stickers | ||
4. Create a new sticker for your company and select a Credit Company or | ||
Create a new one | ||
5. Go to a partner and setup to this Credit Company with an Insurance | ||
State with Insure Invoices | ||
6. Create an Out Invoice and select Product Sticker position on Other | ||
Info tab > Invoices. | ||
7. Print invoice to see your Insured logo. | ||
8. Repeat the same process with another Partner without Insured invoices | ||
to see that is not shown. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
1. Set default Sticker Positions on Invoice Settings > Show Product | ||
Stickers. | ||
2. Go to Product Stickers and create a new one with an Insured Company. | ||
3. Set the insured company on your partner on the Risk Control section. | ||
4. Define a Insured state with Insured invoices check. | ||
5. Now all insured invoices will have your Insured Product Sticker. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/credit-control/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/credit-control/issues/new?body=module:%20partner_risk_insurance_product_sticker_invoice_report%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 | ||
------- | ||
|
||
* Moduon | ||
|
||
Contributors | ||
------------ | ||
|
||
- Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__) | ||
|
||
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-Shide| image:: https://github.com/Shide.png?size=40px | ||
:target: https://github.com/Shide | ||
:alt: Shide | ||
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px | ||
:target: https://github.com/rafaelbn | ||
:alt: rafaelbn | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-Shide| |maintainer-rafaelbn| | ||
|
||
This module is part of the `OCA/credit-control <https://github.com/OCA/credit-control/tree/16.0/partner_risk_insurance_product_sticker_invoice_report>`_ 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
1
partner_risk_insurance_product_sticker_invoice_report/__init__.py
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 models |
22 changes: 22 additions & 0 deletions
22
partner_risk_insurance_product_sticker_invoice_report/__manifest__.py
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,22 @@ | ||
# Copyright 2025 Moduon Team S.L. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) | ||
|
||
{ | ||
"name": "Product Sticker on Invoice Reports with Risk Insurance", | ||
"summary": "Display a Sticker on Invoice Reports secured with Risk Insurance", | ||
"version": "16.0.1.0.0", | ||
"development_status": "Alpha", | ||
"category": "Uncategorized", | ||
"website": "https://github.com/OCA/credit-control", | ||
"author": "Moduon, Odoo Community Association (OCA)", | ||
"maintainers": ["Shide", "rafaelbn"], | ||
"license": "AGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"auto_install": True, | ||
"depends": ["partner_risk_insurance", "account_invoice_report_product_sticker"], | ||
"data": [ | ||
"views/product_sticker_view.xml", | ||
"views/credit_policy_company_view.xml", | ||
], | ||
} |
53 changes: 53 additions & 0 deletions
53
partner_risk_insurance_product_sticker_invoice_report/i18n/es.po
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,53 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * partner_risk_insurance_product_sticker_invoice_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-02-11 11:31+0000\n" | ||
"PO-Revision-Date: 2025-02-11 12:33+0100\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: 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.4.4\n" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model,name:partner_risk_insurance_product_sticker_invoice_report.model_credit_policy_company | ||
msgid "Company of Credit Policies" | ||
msgstr "Compañías de las Políticas de crédito" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,field_description:partner_risk_insurance_product_sticker_invoice_report.field_product_sticker__credit_policy_company_id | ||
msgid "Credit Policy Company" | ||
msgstr "Compañías de la Política de crédito" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,help:partner_risk_insurance_product_sticker_invoice_report.field_product_sticker__credit_policy_company_id | ||
msgid "Display this Sticker only for the selected Credit Policy Company." | ||
msgstr "Muestra esta Pegatina solo para la Compañía Aseguradora de Crédito." | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model,name:partner_risk_insurance_product_sticker_invoice_report.model_account_move | ||
msgid "Journal Entry" | ||
msgstr "Asiento contable" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model,name:partner_risk_insurance_product_sticker_invoice_report.model_product_sticker | ||
msgid "Product Sticker" | ||
msgstr "Pegatinas de Producto" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,field_description:partner_risk_insurance_product_sticker_invoice_report.field_credit_policy_company__sticker_ids | ||
msgid "Product Stickers" | ||
msgstr "Pegatinas de producto" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,field_description:partner_risk_insurance_product_sticker_invoice_report.field_credit_policy_company__sticker_count | ||
msgid "Sticker Count" | ||
msgstr "Conteo de Pegatinas" |
51 changes: 51 additions & 0 deletions
51
...uct_sticker_invoice_report/i18n/partner_risk_insurance_product_sticker_invoice_report.pot
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,51 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * partner_risk_insurance_product_sticker_invoice_report | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2025-02-11 11:31+0000\n" | ||
"PO-Revision-Date: 2025-02-11 11:31+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: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model,name:partner_risk_insurance_product_sticker_invoice_report.model_credit_policy_company | ||
msgid "Company of Credit Policies" | ||
msgstr "" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,field_description:partner_risk_insurance_product_sticker_invoice_report.field_product_sticker__credit_policy_company_id | ||
msgid "Credit Policy Company" | ||
msgstr "" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,help:partner_risk_insurance_product_sticker_invoice_report.field_product_sticker__credit_policy_company_id | ||
msgid "Display this Sticker only for the selected Credit Policy Company." | ||
msgstr "" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model,name:partner_risk_insurance_product_sticker_invoice_report.model_account_move | ||
msgid "Journal Entry" | ||
msgstr "" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model,name:partner_risk_insurance_product_sticker_invoice_report.model_product_sticker | ||
msgid "Product Sticker" | ||
msgstr "" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,field_description:partner_risk_insurance_product_sticker_invoice_report.field_credit_policy_company__sticker_ids | ||
msgid "Product Stickers" | ||
msgstr "" | ||
|
||
#. module: partner_risk_insurance_product_sticker_invoice_report | ||
#: model:ir.model.fields,field_description:partner_risk_insurance_product_sticker_invoice_report.field_credit_policy_company__sticker_count | ||
msgid "Sticker Count" | ||
msgstr "" |
3 changes: 3 additions & 0 deletions
3
partner_risk_insurance_product_sticker_invoice_report/models/__init__.py
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 @@ | ||
from . import product_sticker | ||
from . import credit_policy_company | ||
from . import account_move |
22 changes: 22 additions & 0 deletions
22
partner_risk_insurance_product_sticker_invoice_report/models/account_move.py
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,22 @@ | ||
# Copyright 2025 Moduon Team S.L. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) | ||
|
||
from odoo import api, models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
@api.depends( | ||
"show_product_stickers", "line_ids.product_id", "credit_policy_state_id" | ||
) | ||
def _compute_sticker_ids(self): | ||
res = super()._compute_sticker_ids() | ||
for record in self: | ||
allowed_credit_company_ids = [False] | ||
if record.credit_policy_state_id.insure_invoices: | ||
allowed_credit_company_ids.append(record.credit_policy_company_id.id) | ||
record.sticker_ids -= record.sticker_ids.filtered_domain( | ||
[("credit_policy_company_id", "not in", allowed_credit_company_ids)] | ||
) | ||
return res |
13 changes: 13 additions & 0 deletions
13
partner_risk_insurance_product_sticker_invoice_report/models/credit_policy_company.py
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 2025 Moduon Team S.L. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class CreditPolicyCompany(models.Model): | ||
_name = "credit.policy.company" | ||
_inherit = ["credit.policy.company", "product.sticker.mixin"] | ||
|
||
sticker_ids = fields.One2many( | ||
inverse_name="credit_policy_company_id", | ||
) |
15 changes: 15 additions & 0 deletions
15
partner_risk_insurance_product_sticker_invoice_report/models/product_sticker.py
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,15 @@ | ||
# Copyright 2025 Moduon Team S.L. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ProductSticker(models.Model): | ||
_inherit = "product.sticker" | ||
|
||
credit_policy_company_id = fields.Many2one( | ||
comodel_name="credit.policy.company", | ||
string="Credit Policy Company", | ||
help="Display this Sticker only for the selected Credit Policy Company.", | ||
ondelete="set null", | ||
) |
10 changes: 10 additions & 0 deletions
10
partner_risk_insurance_product_sticker_invoice_report/readme/CONFIGURE.md
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,10 @@ | ||
To configure this module, you need to: | ||
|
||
1. Set default Sticker Positions on Invoice Settings > Show Product Stickers. | ||
2. Enable Sales Credit Limit option on Invoice Settings > Invoicing > Customer Invoices. | ||
3. Go to Settings > Technical > Database Structure > Product Stickers | ||
4. Create a new sticker for your company and select a Credit Company or Create a new one | ||
5. Go to a partner and setup to this Credit Company with an Insurance State with Insure Invoices | ||
5. Create an Out Invoice and select Product Sticker position on Other Info tab > Invoices. | ||
7. Print invoice to see your Insured logo. | ||
8. Repeat the same process with another Partner without Insured invoices to see that is not shown. |
2 changes: 2 additions & 0 deletions
2
partner_risk_insurance_product_sticker_invoice_report/readme/CONTEXT.md
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 was developed because sometimes you want to reflect on your Invoices that some Insured company are insuring the invoice. |
1 change: 1 addition & 0 deletions
1
partner_risk_insurance_product_sticker_invoice_report/readme/CONTRIBUTORS.md
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 @@ | ||
- Eduardo de Miguel ([Moduon](https://www.moduon.team/)) |
1 change: 1 addition & 0 deletions
1
partner_risk_insurance_product_sticker_invoice_report/readme/DESCRIPTION.md
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 @@ | ||
This module extends the functionality of Risk Insurance to support display Insurance company logos and to allow you to reflect on your invoices that those operations are insured. |
7 changes: 7 additions & 0 deletions
7
partner_risk_insurance_product_sticker_invoice_report/readme/USAGE.md
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,7 @@ | ||
To use this module, you need to: | ||
|
||
1. Set default Sticker Positions on Invoice Settings > Show Product Stickers. | ||
2. Go to Product Stickers and create a new one with an Insured Company. | ||
3. Set the insured company on your partner on the Risk Control section. | ||
4. Define a Insured state with Insured invoices check. | ||
4. Now all insured invoices will have your Insured Product Sticker. |
Binary file added
BIN
+9.23 KB
partner_risk_insurance_product_sticker_invoice_report/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.