-
-
Notifications
You must be signed in to change notification settings - Fork 800
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
21 changed files
with
937 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,107 @@ | ||
======================================== | ||
Access supplied products from the vendor | ||
======================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:81e7b1583ab5a956c6d36307cfaa71717d2b022905a7bd41a3232c5cdc86ddea | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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%2Fpurchase--workflow-lightgray.png?logo=github | ||
:target: https://github.com/OCA/purchase-workflow/tree/16.0/partner_supplierinfo_smartbutton | ||
:alt: OCA/purchase-workflow | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-partner_supplierinfo_smartbutton | ||
: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/purchase-workflow&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This addon adds a smart-button in the vendors with the supplied products. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Installation | ||
============ | ||
|
||
To use this module, you need to install "contacts" and "purchase" addons. | ||
|
||
Configuration | ||
============= | ||
|
||
#. Go to *Purchase > Products > Products*. | ||
#. Access one of them clicking on it. | ||
#. Go to "Purchase" tab and add some vendors (Azure Interior for example). | ||
|
||
Usage | ||
===== | ||
|
||
#. Go to *Contacts* or *Purchase > Orders > Vendors*. | ||
#. Access one of them clicking on it. | ||
#. If it has supplier products, you will see an smart-button in the top part called "Products Supplied". | ||
#. Clicking on it, you will be see all products supplied. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/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/purchase-workflow/issues/new?body=module:%20partner_supplierinfo_smartbutton%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>`_: | ||
|
||
* Víctor Martínez | ||
* Pedro M. Baeza | ||
|
||
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-victoralmau| image:: https://github.com/victoralmau.png?size=40px | ||
:target: https://github.com/victoralmau | ||
:alt: victoralmau | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-victoralmau| | ||
|
||
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/16.0/partner_supplierinfo_smartbutton>`_ 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 @@ | ||
from . import models |
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,16 @@ | ||
# Copyright 2022 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Access supplied products from the vendor", | ||
"version": "16.0.1.0.0", | ||
"category": "Purchase Management", | ||
"website": "https://github.com/OCA/purchase-workflow", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"depends": ["product"], | ||
"installable": True, | ||
"data": [ | ||
"views/res_partner_view.xml", | ||
], | ||
"maintainers": ["victoralmau"], | ||
} |
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,49 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * partner_supplierinfo_smartbutton | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-04-29 13:03+0000\n" | ||
"PO-Revision-Date: 2022-04-29 16:03+0200\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: \n" | ||
"X-Generator: Poedit 2.3\n" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model,name:partner_supplierinfo_smartbutton.model_res_partner | ||
msgid "Contact" | ||
msgstr "Contacto" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__display_name | ||
msgid "Display Name" | ||
msgstr "Nombre mostrado" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner____last_update | ||
msgid "Last Modified on" | ||
msgstr "Última modificación el" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__product_supplied_count | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_users__product_supplied_count | ||
msgid "Product Supplied Count" | ||
msgstr "Total productos suministrados" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model_terms:ir.ui.view,arch_db:partner_supplierinfo_smartbutton.view_partner_form | ||
msgid "Products Supplied" | ||
msgstr "Productos suministrados" |
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,48 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * partner_supplierinfo_smartbutton | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-01-02 15:44+0000\n" | ||
"Last-Translator: Paul_Goubert <paul.goubert@akretion.com>\n" | ||
"Language-Team: none\n" | ||
"Language: fr\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.14.1\n" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model,name:partner_supplierinfo_smartbutton.model_res_partner | ||
msgid "Contact" | ||
msgstr "Contact" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__display_name | ||
msgid "Display Name" | ||
msgstr "Nom affiché" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner____last_update | ||
msgid "Last Modified on" | ||
msgstr "Dernière modification le" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__product_supplied_count | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_users__product_supplied_count | ||
msgid "Product Supplied Count" | ||
msgstr "Articles fournis somme" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model_terms:ir.ui.view,arch_db:partner_supplierinfo_smartbutton.view_partner_form | ||
msgid "Products Supplied" | ||
msgstr "Articles fournis" |
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,48 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * partner_supplierinfo_smartbutton | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-01-20 13:45+0000\n" | ||
"Last-Translator: Francesco Foresti <francesco.foresti@ooops404.com>\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.14.1\n" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model,name:partner_supplierinfo_smartbutton.model_res_partner | ||
msgid "Contact" | ||
msgstr "Contatto" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__display_name | ||
msgid "Display Name" | ||
msgstr "Nome visualizzato" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner____last_update | ||
msgid "Last Modified on" | ||
msgstr "Ultima modifica il" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__product_supplied_count | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_users__product_supplied_count | ||
msgid "Product Supplied Count" | ||
msgstr "Conteggio prodotti forniti" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model_terms:ir.ui.view,arch_db:partner_supplierinfo_smartbutton.view_partner_form | ||
msgid "Products Supplied" | ||
msgstr "Prodotti forniti" |
45 changes: 45 additions & 0 deletions
45
partner_supplierinfo_smartbutton/i18n/partner_supplierinfo_smartbutton.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,45 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * partner_supplierinfo_smartbutton | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.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: partner_supplierinfo_smartbutton | ||
#: model:ir.model,name:partner_supplierinfo_smartbutton.model_res_partner | ||
msgid "Contact" | ||
msgstr "" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_partner__product_supplied_count | ||
#: model:ir.model.fields,field_description:partner_supplierinfo_smartbutton.field_res_users__product_supplied_count | ||
msgid "Product Supplied Count" | ||
msgstr "" | ||
|
||
#. module: partner_supplierinfo_smartbutton | ||
#: model_terms:ir.ui.view,arch_db:partner_supplierinfo_smartbutton.view_partner_form | ||
msgid "Products Supplied" | ||
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 @@ | ||
from . import res_partner |
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,34 @@ | ||
# Copyright 2022 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
product_supplied_count = fields.Integer(compute="_compute_product_supplied_count") | ||
|
||
def _compute_product_supplied_count(self): | ||
data = self.env["product.supplierinfo"].read_group( | ||
[("partner_id", "in", self.ids)], ["partner_id"], ["partner_id"] | ||
) | ||
mapping = {d["partner_id"][0]: d["partner_id_count"] for d in data} | ||
for item in self: | ||
item.product_supplied_count = mapping.get(item.id, 0) | ||
|
||
def action_see_products_by_seller(self): | ||
domain = [("partner_id", "=", self.id)] | ||
action = self.env["ir.actions.act_window"]._for_xml_id( | ||
"product.product_supplierinfo_type_action" | ||
) | ||
ctx = dict(self.env.context) | ||
ctx.update( | ||
{ | ||
"default_partner_id": self.id, | ||
"search_default_partner_id": self.id, | ||
"visible_product_tmpl_id": False, | ||
} | ||
) | ||
action.update({"domain": domain, "context": ctx}) | ||
return action |
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 @@ | ||
#. Go to *Purchase > Products > Products*. | ||
#. Access one of them clicking on it. | ||
#. Go to "Purchase" tab and add some vendors (Azure Interior for example). |
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 @@ | ||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Víctor Martínez | ||
* Pedro M. Baeza |
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 addon adds a smart-button in the vendors with the supplied products. |
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 @@ | ||
To use this module, you need to install "contacts" and "purchase" addons. |
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 @@ | ||
#. Go to *Contacts* or *Purchase > Orders > Vendors*. | ||
#. Access one of them clicking on it. | ||
#. If it has supplier products, you will see an smart-button in the top part called "Products Supplied". | ||
#. Clicking on it, you will be see all products supplied. |
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.