forked from OCA/purchase-workflow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1379 from OCA/16.0
Syncing from upstream OCA/purchase-workflow (16.0)
- Loading branch information
Showing
21 changed files
with
741 additions
and
8 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
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,93 @@ | ||
====================================== | ||
Purchase Order Product Attachment Mgmt | ||
====================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:3b99953fa3e56e77c59c9651ee8563722114f897992de016c9af80e3672e2c1e | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/purchase_order_product_attachment_mgmt | ||
: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-purchase_order_product_attachment_mgmt | ||
: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 module allows to get all attachments from all products of a purchase on a view. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
#. Go to *Purchase -> Orders > Purchase Orders* and create or edit some record. | ||
#. The smart-button "Attachments" display the attachments of the product lines. | ||
|
||
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:%20purchase_order_product_attachment_mgmt%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/purchase_order_product_attachment_mgmt>`_ 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": "Purchase Order Product Attachment Mgmt", | ||
"version": "16.0.1.0.0", | ||
"category": "Purchases", | ||
"website": "https://github.com/OCA/purchase-workflow", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"depends": ["purchase"], | ||
"installable": True, | ||
"data": [ | ||
"views/purchase_order_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,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_order_product_attachment_mgmt | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-03-14 16:21+0000\n" | ||
"PO-Revision-Date: 2022-03-14 17:23+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: \n" | ||
"X-Generator: Poedit 2.3\n" | ||
|
||
#. module: purchase_order_product_attachment_mgmt | ||
#: model:ir.actions.server,name:purchase_order_product_attachment_mgmt.action_see_purchase_order_attachments | ||
#: model_terms:ir.ui.view,arch_db:purchase_order_product_attachment_mgmt.purchase_order_form | ||
msgid "Attachments" | ||
msgstr "Adjuntos" | ||
|
||
#. module: purchase_order_product_attachment_mgmt | ||
#: model:ir.model,name:purchase_order_product_attachment_mgmt.model_purchase_order | ||
msgid "Purchase Order" | ||
msgstr "Pedido de compra" | ||
|
||
#~ msgid "Display Name" | ||
#~ msgstr "Nombre mostrado" | ||
|
||
#~ msgid "ID" | ||
#~ msgstr "ID" | ||
|
||
#~ msgid "Last Modified on" | ||
#~ msgstr "Última modificación el" |
25 changes: 25 additions & 0 deletions
25
purchase_order_product_attachment_mgmt/i18n/purchase_order_product_attachment_mgmt.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,25 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_order_product_attachment_mgmt | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.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: purchase_order_product_attachment_mgmt | ||
#: model:ir.actions.server,name:purchase_order_product_attachment_mgmt.action_see_purchase_order_attachments | ||
#: model_terms:ir.ui.view,arch_db:purchase_order_product_attachment_mgmt.purchase_order_form | ||
msgid "Attachments" | ||
msgstr "" | ||
|
||
#. module: purchase_order_product_attachment_mgmt | ||
#: model:ir.model,name:purchase_order_product_attachment_mgmt.model_purchase_order | ||
msgid "Purchase 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 @@ | ||
from . import purchase_order |
27 changes: 27 additions & 0 deletions
27
purchase_order_product_attachment_mgmt/models/purchase_order.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,27 @@ | ||
# Copyright 2022 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import models | ||
|
||
|
||
class PurchaseOrder(models.Model): | ||
_inherit = "purchase.order" | ||
|
||
def _action_see_purchase_order_attachments(self, products): | ||
domain = [ | ||
"|", | ||
"&", | ||
("res_model", "=", "product.product"), | ||
("res_id", "in", products.ids), | ||
"&", | ||
("res_model", "=", "product.template"), | ||
("res_id", "in", products.mapped("product_tmpl_id").ids), | ||
] | ||
res = self.env["ir.actions.act_window"]._for_xml_id("base.action_attachment") | ||
ctx = {"create": False, "edit": False} | ||
res.update({"domain": domain, "context": ctx}) | ||
return res | ||
|
||
def action_see_purchase_order_attachments(self): | ||
return self._action_see_purchase_order_attachments( | ||
self.mapped("order_line.product_id") | ||
) |
4 changes: 4 additions & 0 deletions
4
purchase_order_product_attachment_mgmt/readme/CONTRIBUTORS.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,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 module allows to get all attachments from all products of a purchase on a view. |
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 @@ | ||
#. Go to *Purchase -> Orders > Purchase Orders* and create or edit some record. | ||
#. The smart-button "Attachments" display the attachments of the product lines. |
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.