[ADD]rma_purchase_operating_unit

[FIX]rma_purchase_analytic
This commit is contained in:
Aaron Henriquez
2019-05-09 14:21:57 +02:00
committed by Aaron ForgeFlow
parent 4e7ebc7609
commit a41f6390b2
5 changed files with 69 additions and 0 deletions

View File

@@ -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 <ahenriquez@eficent.com>
Maintainer
----------
This module is maintained by Eficent.

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import wizards

View File

@@ -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,
}

View File

@@ -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

View File

@@ -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