From 9525f29722099f9e7a0c35c26dc23ac97b8d08e5 Mon Sep 17 00:00:00 2001 From: aheficent Date: Wed, 22 Aug 2018 13:36:20 +0200 Subject: [PATCH] [MIG]rma_sale to v11 --- rma_sale/__init__.py | 3 +-- rma_sale/__manifest__.py | 5 ++--- rma_sale/models/__init__.py | 3 +-- rma_sale/models/rma_operation.py | 3 +-- rma_sale/models/rma_order.py | 3 +-- rma_sale/models/rma_order_line.py | 3 +-- rma_sale/models/sale_order_line.py | 4 +--- rma_sale/tests/__init__.py | 3 +-- rma_sale/tests/test_rma_sale.py | 3 +-- rma_sale/wizards/__init__.py | 3 +-- rma_sale/wizards/rma_add_sale.py | 3 +-- rma_sale/wizards/rma_make_picking.py | 3 +-- .../wizards/rma_order_line_make_sale_order.py | 17 +++++++---------- .../rma_order_line_make_sale_order_view.xml | 19 ++++--------------- rma_sale/wizards/rma_refund.py | 3 +-- 15 files changed, 25 insertions(+), 53 deletions(-) diff --git a/rma_sale/__init__.py b/rma_sale/__init__.py index 4105ff51..44815ecb 100644 --- a/rma_sale/__init__.py +++ b/rma_sale/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) from . import models from . import wizards diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py index ae8c06ba..19cee716 100644 --- a/rma_sale/__manifest__.py +++ b/rma_sale/__manifest__.py @@ -1,10 +1,9 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) { 'name': 'RMA Sale', - 'version': '10.0.2.0.0', + 'version': '11.0.1.0.0', 'license': 'LGPL-3', 'category': 'RMA', 'summary': 'Links RMA with Sales Orders', diff --git a/rma_sale/models/__init__.py b/rma_sale/models/__init__.py index 0ec7edb9..6108253c 100644 --- a/rma_sale/models/__init__.py +++ b/rma_sale/models/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) from . import sale_order_line from . import rma_order_line diff --git a/rma_sale/models/rma_operation.py b/rma_sale/models/rma_operation.py index 8f2ed4e5..14e086f8 100644 --- a/rma_sale/models/rma_operation.py +++ b/rma_sale/models/rma_operation.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) from odoo import fields, models diff --git a/rma_sale/models/rma_order.py b/rma_sale/models/rma_order.py index 952bcbcc..db4d6a7a 100644 --- a/rma_sale/models/rma_order.py +++ b/rma_sale/models/rma_order.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 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, fields, models diff --git a/rma_sale/models/rma_order_line.py b/rma_sale/models/rma_order_line.py index ef72c913..078e57e1 100644 --- a/rma_sale/models/rma_order_line.py +++ b/rma_sale/models/rma_order_line.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 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, fields, models, _ from odoo.exceptions import ValidationError diff --git a/rma_sale/models/sale_order_line.py b/rma_sale/models/sale_order_line.py index 2b8c1551..645fc4fa 100644 --- a/rma_sale/models/sale_order_line.py +++ b/rma_sale/models/sale_order_line.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 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, fields, models diff --git a/rma_sale/tests/__init__.py b/rma_sale/tests/__init__.py index 83ee6fd7..fae781a4 100644 --- a/rma_sale/tests/__init__.py +++ b/rma_sale/tests/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) from . import test_rma_sale diff --git a/rma_sale/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py index e4389bae..5cc3096d 100644 --- a/rma_sale/tests/test_rma_sale.py +++ b/rma_sale/tests/test_rma_sale.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-18 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) from openerp.tests import common diff --git a/rma_sale/wizards/__init__.py b/rma_sale/wizards/__init__.py index 40e8ecb8..631e0330 100644 --- a/rma_sale/wizards/__init__.py +++ b/rma_sale/wizards/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) from . import rma_order_line_make_sale_order diff --git a/rma_sale/wizards/rma_add_sale.py b/rma_sale/wizards/rma_add_sale.py index de4ce988..0946b082 100644 --- a/rma_sale/wizards/rma_add_sale.py +++ b/rma_sale/wizards/rma_add_sale.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 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, fields, models diff --git a/rma_sale/wizards/rma_make_picking.py b/rma_sale/wizards/rma_make_picking.py index 85ec2f71..32011807 100644 --- a/rma_sale/wizards/rma_make_picking.py +++ b/rma_sale/wizards/rma_make_picking.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 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, fields, models diff --git a/rma_sale/wizards/rma_order_line_make_sale_order.py b/rma_sale/wizards/rma_order_line_make_sale_order.py index cb958eb4..b16760c2 100644 --- a/rma_sale/wizards/rma_order_line_make_sale_order.py +++ b/rma_sale/wizards/rma_order_line_make_sale_order.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- -# Copyright 2016 Eficent Business and IT Consulting Services S.L. -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0). +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) import odoo.addons.decimal_precision as dp from odoo import _, api, exceptions, fields, models @@ -129,20 +128,18 @@ class RmaLineMakeSaleOrderItem(models.TransientModel): _description = "RMA Line Make Sale Order Item" wiz_id = fields.Many2one( - comodel_name='rma.order.line.make.sale.order', string='Wizard', - required=True, readonly=True) + comodel_name='rma.order.line.make.sale.order', string='Wizard') line_id = fields.Many2one( - comodel_name='rma.order.line', string='RMA Line', required=True) + comodel_name='rma.order.line', string='RMA Line') rma_id = fields.Many2one( - comodel_name='rma.order', related='line_id.rma_id', - string='RMA Order', readonly=True) + comodel_name='rma.order', related='line_id.rma_id') product_id = fields.Many2one( comodel_name='product.product', string='Product') - name = fields.Char(string='Description', required=True, readonly=True) + name = fields.Char(string='Description') product_qty = fields.Float( string='Quantity to sell', digits=dp.get_precision('Product UoS')) product_uom_id = fields.Many2one( - comodel_name='product.uom', string='UoM', readonly=True) + comodel_name='product.uom', string='UoM') out_warehouse_id = fields.Many2one( comodel_name='stock.warehouse', string='Outbound Warehouse') free_of_charge = fields.Boolean(string='Free of Charge') diff --git a/rma_sale/wizards/rma_order_line_make_sale_order_view.xml b/rma_sale/wizards/rma_order_line_make_sale_order_view.xml index 395e6275..308e6e7c 100644 --- a/rma_sale/wizards/rma_order_line_make_sale_order_view.xml +++ b/rma_sale/wizards/rma_order_line_make_sale_order_view.xml @@ -13,8 +13,8 @@ /> + domain="[('partner_id','=', partner_id)]" + context="{'partner_id': partner_id}"/> - - +
@@ -60,16 +59,6 @@ new - - - Create RFQ - client_action_multi - - action - rma.order.line - - diff --git a/rma_sale/wizards/rma_refund.py b/rma_sale/wizards/rma_refund.py index 7ab7d032..2240b3f9 100644 --- a/rma_sale/wizards/rma_refund.py +++ b/rma_sale/wizards/rma_refund.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 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, fields, models