Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][MIG] rma_purchase_operating_unit #448

Merged
merged 3 commits into from
Sep 29, 2023
Merged
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
28 changes: 28 additions & 0 deletions rma_purchase_operating_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: https://www.gnu.org/licenses/lgpl
:alt: License: LGPL-3

=================================
RMA Purchase with Operating Units
=================================

This module introduces the following features:

* Adds the operating unit to the quotation.

Usage
=====

* No changes.


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

* Aaron Henriquez <[email protected]>


Maintainer
----------

This module is maintained by ForgeFlow.
3 changes: 3 additions & 0 deletions rma_purchase_operating_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import wizards
14 changes: 14 additions & 0 deletions rma_purchase_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

{
"name": "RMA Purchase with Operating Units",
"version": "15.0.1.0.0",
"author": "ForgeFlow," "Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/ForgeFlow/stock-rma",
"category": "RMA",
"depends": ["rma_operating_unit", "rma_purchase", "purchase_operating_unit"],
"data": [],
"installable": True,
}
3 changes: 3 additions & 0 deletions rma_purchase_operating_unit/wizards/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)

from . import rma_line_make_purchase_order
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)

from odoo import api, models


class RmaLineMakePurchaseOrder(models.TransientModel):
_inherit = "rma.order.line.make.purchase.order"

@api.model
def _prepare_purchase_order(self, item):
res = super(RmaLineMakePurchaseOrder, self)._prepare_purchase_order(item)
res.update(operating_unit_id=item.line_id.operating_unit_id.id)
return res
6 changes: 6 additions & 0 deletions setup/rma_purchase_operating_unit/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading