Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions purchase_order_type_maintenance_equipment_link/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
==============================================
Purchase Order Type Maintenance Equipment Link
==============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ac16c1235c81dc48a53dc1403aefa455ed0f7fcb14d44e229536c47f428e8d37
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-solvosci%2Fslv--purchase-lightgray.png?logo=github
:target: https://github.com/solvosci/slv-purchase/tree/17.0/purchase_order_type_maintenance_equipment_link
:alt: solvosci/slv-purchase

|badge1| |badge2| |badge3|

Controls the visibility of maintenance equipments in purchase order
lines based on the purchase order type.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/solvosci/slv-purchase/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/solvosci/slv-purchase/issues/new?body=module:%20purchase_order_type_maintenance_equipment_link%0Aversion:%2017.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
-------

* Solvos

Contributors
------------

- Dante Pereyra <dante.pereyra@solvos.es>

Maintainers
-----------

This module is part of the `solvosci/slv-purchase <https://github.com/solvosci/slv-purchase/tree/17.0/purchase_order_type_maintenance_equipment_link>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions purchase_order_type_maintenance_equipment_link/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions purchase_order_type_maintenance_equipment_link/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
# License AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
{
"name": "Purchase Order Type Maintenance Equipment Link",
"summary": """
Controls the visibility of maintenanc _equipments
in purchase order lines based on the purchase order type.
""",
"author": "Solvos",
"license": "AGPL-3",
"version": "17.0.1.0.0",
"category": "Purchases",
"website": "https://github.com/solvosci/slv-purchase",
"depends": [
"purchase_order_maintenance_equipment_link",
"purchase_order_type"
],
"data": [
"views/purchase_order_type_views.xml",
"views/purchase_order_views.xml",
],

}
37 changes: 37 additions & 0 deletions purchase_order_type_maintenance_equipment_link/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_type_maintenance_equipment_link
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 14:56+0000\n"
"PO-Revision-Date: 2025-03-20 14:56+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: purchase_order_type_maintenance_equipment_link
#: model:ir.model,name:purchase_order_type_maintenance_equipment_link.model_purchase_order
msgid "Purchase Order"
msgstr "Orden de Compra"

#. module: purchase_order_type_maintenance_equipment_link
#: model:ir.model,name:purchase_order_type_maintenance_equipment_link.model_purchase_order_type
msgid "Type of purchase order"
msgstr "Tipo de pedido de compra"

#. module: purchase_order_type_maintenance_equipment_link
#: model_terms:ir.ui.view,arch_db:purchase_order_type_maintenance_equipment_link.view_purchase_order_type_tree
msgid "Use Eq."
msgstr "Usar Eq."

#. module: purchase_order_type_maintenance_equipment_link
#: model:ir.model.fields,field_description:purchase_order_type_maintenance_equipment_link.field_purchase_order__show_maintenance_equipment
#: model:ir.model.fields,field_description:purchase_order_type_maintenance_equipment_link.field_purchase_order_type__use_maintenance_equipment
msgid "Use Maintenance Equipment"
msgstr "Usar Equipo de Mantenimiento"
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_type_maintenance_equipment_link
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 14:56+0000\n"
"PO-Revision-Date: 2025-03-20 14:56+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: purchase_order_type_maintenance_equipment_link
#: model:ir.model,name:purchase_order_type_maintenance_equipment_link.model_purchase_order
msgid "Purchase Order"
msgstr ""

#. module: purchase_order_type_maintenance_equipment_link
#: model:ir.model,name:purchase_order_type_maintenance_equipment_link.model_purchase_order_type
msgid "Type of purchase order"
msgstr ""

#. module: purchase_order_type_maintenance_equipment_link
#: model_terms:ir.ui.view,arch_db:purchase_order_type_maintenance_equipment_link.view_purchase_order_type_tree
msgid "Use Eq."
msgstr ""

#. module: purchase_order_type_maintenance_equipment_link
#: model:ir.model.fields,field_description:purchase_order_type_maintenance_equipment_link.field_purchase_order__show_maintenance_equipment
#: model:ir.model.fields,field_description:purchase_order_type_maintenance_equipment_link.field_purchase_order_type__use_maintenance_equipment
msgid "Use Maintenance Equipment"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import purchase_order_type
from . import purchase_order
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import models, fields, api


class PurchaseOrder(models.Model):
_inherit = 'purchase.order'

show_maintenance_equipment = fields.Boolean(
related="order_type.use_maintenance_equipment",
store=True,
)

@api.onchange('show_maintenance_equipment')
def _onchange_show_maintenance_equipment(self):
for record in self:
if not record.show_maintenance_equipment:
record.maintenance_equipment_default_id = False
for order_line in record.order_line:
order_line.maintenance_equipment_ids = False
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import models, fields


class PurchaseOrderType(models.Model):
_inherit = 'purchase.order.type'

use_maintenance_equipment = fields.Boolean(default=False)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Dante Pereyra \<dante.pereyra@solvos.es\>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Controls the visibility of maintenance equipments in purchase order lines based on the purchase order type.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading