From 3d271656a96d9705b4cd06290d4f75284e3c6156 Mon Sep 17 00:00:00 2001 From: Aaron Henriquez Date: Thu, 9 May 2019 14:21:57 +0200 Subject: [PATCH 1/2] [ADD]rma_purchase_operating_unit [FIX]rma_purchase_analytic --- rma_purchase_operating_unit/README.rst | 28 +++++++++++++++++++ rma_purchase_operating_unit/__init__.py | 4 +++ rma_purchase_operating_unit/__manifest__.py | 17 +++++++++++ .../wizards/__init__.py | 5 ++++ .../wizards/rma_line_make_purchase_order.py | 15 ++++++++++ 5 files changed, 69 insertions(+) create mode 100644 rma_purchase_operating_unit/README.rst create mode 100644 rma_purchase_operating_unit/__init__.py create mode 100644 rma_purchase_operating_unit/__manifest__.py create mode 100644 rma_purchase_operating_unit/wizards/__init__.py create mode 100644 rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py diff --git a/rma_purchase_operating_unit/README.rst b/rma_purchase_operating_unit/README.rst new file mode 100644 index 00000000..f6f45939 --- /dev/null +++ b/rma_purchase_operating_unit/README.rst @@ -0,0 +1,28 @@ +.. image:: https://img.shields.io/badge/license-LGPLv3-blue.svg + :target: https://www.gnu.org/licenses/lgpl.html + :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 + + +Maintainer +---------- + +This module is maintained by Eficent. diff --git a/rma_purchase_operating_unit/__init__.py b/rma_purchase_operating_unit/__init__.py new file mode 100644 index 00000000..5f13e3ea --- /dev/null +++ b/rma_purchase_operating_unit/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from . import wizards diff --git a/rma_purchase_operating_unit/__manifest__.py b/rma_purchase_operating_unit/__manifest__.py new file mode 100644 index 00000000..ab2ed568 --- /dev/null +++ b/rma_purchase_operating_unit/__manifest__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# © 2017 Eficent Business and IT Consulting Services S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +{ + "name": "Analytic Account in RMA purchase", + "version": "10.0.1.0.0", + "author": "Eficent," + "Odoo Community Association (OCA)", + "license": "LGPL-3", + "website": "http://www.eficent.com", + "category": "Analytic", + "depends": ["rma_operating_unit", "rma_purchase"], + "data": [ + ], + 'installable': True, +} diff --git a/rma_purchase_operating_unit/wizards/__init__.py b/rma_purchase_operating_unit/wizards/__init__.py new file mode 100644 index 00000000..4ae587e0 --- /dev/null +++ b/rma_purchase_operating_unit/wizards/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2018 Eficent Business and IT Consulting Services S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) + +from . import rma_line_make_purchase_order diff --git a/rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py b/rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py new file mode 100644 index 00000000..9a26dc4c --- /dev/null +++ b/rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# © 2018 Eficent Business and IT Consulting Services 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 From 7f126d089399be5972945f75b38d317132e9c11c Mon Sep 17 00:00:00 2001 From: mreficent Date: Wed, 20 Nov 2019 17:14:39 +0100 Subject: [PATCH 2/2] [MIG] rma_purchase_operating_unit: Migration to 12.0 --- rma_purchase_operating_unit/README.rst | 8 ++++---- rma_purchase_operating_unit/__init__.py | 1 - rma_purchase_operating_unit/__manifest__.py | 7 +++---- rma_purchase_operating_unit/wizards/__init__.py | 2 -- .../wizards/rma_line_make_purchase_order.py | 4 ++-- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/rma_purchase_operating_unit/README.rst b/rma_purchase_operating_unit/README.rst index f6f45939..cefa139c 100644 --- a/rma_purchase_operating_unit/README.rst +++ b/rma_purchase_operating_unit/README.rst @@ -1,5 +1,5 @@ -.. image:: https://img.shields.io/badge/license-LGPLv3-blue.svg - :target: https://www.gnu.org/licenses/lgpl.html +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.png + :target: https://www.gnu.org/licenses/lgpl :alt: License: LGPL-3 ================================= @@ -8,12 +8,12 @@ RMA Purchase with Operating Units This module introduces the following features: -* Adds the operating unit to the quotation +* Adds the operating unit to the quotation. Usage ===== -* No changes +* No changes. Contributors diff --git a/rma_purchase_operating_unit/__init__.py b/rma_purchase_operating_unit/__init__.py index 5f13e3ea..36998361 100644 --- a/rma_purchase_operating_unit/__init__.py +++ b/rma_purchase_operating_unit/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import wizards diff --git a/rma_purchase_operating_unit/__manifest__.py b/rma_purchase_operating_unit/__manifest__.py index ab2ed568..b997f6e2 100644 --- a/rma_purchase_operating_unit/__manifest__.py +++ b/rma_purchase_operating_unit/__manifest__.py @@ -1,15 +1,14 @@ -# -*- coding: utf-8 -*- # © 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). { - "name": "Analytic Account in RMA purchase", - "version": "10.0.1.0.0", + "name": "RMA Purchase with Operating Units", + "version": "12.0.1.0.0", "author": "Eficent," "Odoo Community Association (OCA)", "license": "LGPL-3", "website": "http://www.eficent.com", - "category": "Analytic", + "category": "RMA", "depends": ["rma_operating_unit", "rma_purchase"], "data": [ ], diff --git a/rma_purchase_operating_unit/wizards/__init__.py b/rma_purchase_operating_unit/wizards/__init__.py index 4ae587e0..be04699d 100644 --- a/rma_purchase_operating_unit/wizards/__init__.py +++ b/rma_purchase_operating_unit/wizards/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# © 2018 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) from . import rma_line_make_purchase_order diff --git a/rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py b/rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py index 9a26dc4c..1b0e38cc 100644 --- a/rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py +++ b/rma_purchase_operating_unit/wizards/rma_line_make_purchase_order.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2018 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) @@ -10,6 +9,7 @@ class RmaLineMakePurchaseOrder(models.TransientModel): @api.model def _prepare_purchase_order(self, item): - res = super(RmaLineMakePurchaseOrder, self)._prepare_purchase_order(item) + res = super(RmaLineMakePurchaseOrder, self)._prepare_purchase_order( + item) res.update(operating_unit_id=item.line_id.operating_unit_id.id) return res