From fc8d27402e791e44b0bb71eb3a888b8ea6d06b59 Mon Sep 17 00:00:00 2001 From: aheficent Date: Wed, 3 Jan 2018 15:20:45 +0100 Subject: [PATCH] [ADD]rma_purchase_analytic [FIX]various --- rma_sale_analytic/__init__.py | 2 +- rma_sale_analytic/__manifest__.py | 7 ++++--- rma_sale_analytic/models/sale_order_line.py | 3 ++- rma_sale_analytic/wizards/rma_add_sale.py | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/rma_sale_analytic/__init__.py b/rma_sale_analytic/__init__.py index c5d44257..380a9053 100644 --- a/rma_sale_analytic/__init__.py +++ b/rma_sale_analytic/__init__.py @@ -2,4 +2,4 @@ # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import models -from . import tests +from . import wizards diff --git a/rma_sale_analytic/__manifest__.py b/rma_sale_analytic/__manifest__.py index 56f4fbd4..7d638c93 100644 --- a/rma_sale_analytic/__manifest__.py +++ b/rma_sale_analytic/__manifest__.py @@ -3,13 +3,14 @@ # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). { - "name": "Analytic Account in RMA", + "name": "Analytic Account in RMA sale", "version": "10.0.1.0.0", - "author": "Eficent", + "author": "Eficent," + "Odoo Community Association (OCA)", "license": "LGPL-3", "website": "http://www.eficent.com", "category": "Analytic", - "depends": ["rma_account", "rma_analytic", "stock_analytic_account"], + "depends": ["rma_account", "rma_analytic"], "data": [ ], 'installable': True, diff --git a/rma_sale_analytic/models/sale_order_line.py b/rma_sale_analytic/models/sale_order_line.py index 6446a672..dc10578c 100644 --- a/rma_sale_analytic/models/sale_order_line.py +++ b/rma_sale_analytic/models/sale_order_line.py @@ -11,7 +11,8 @@ class SaleOrderLine(models.Model): @api.constrains('analytic_account_id') def check_analytic(self): for line in self: - if line.analytic_account_id != line.rma_line_id.analytic_account_id: + if (line.analytic_account_id != + line.rma_line_id.analytic_account_id): raise exceptions.ValidationError( _("The analytic account in the sale line it's not the same" " as in the rma line")) diff --git a/rma_sale_analytic/wizards/rma_add_sale.py b/rma_sale_analytic/wizards/rma_add_sale.py index dbf794ff..3af15856 100644 --- a/rma_sale_analytic/wizards/rma_add_sale.py +++ b/rma_sale_analytic/wizards/rma_add_sale.py @@ -10,7 +10,7 @@ class RmaAddSale(models.TransientModel): @api.model def _prepare_rma_line_from_sale_order_line(self, line): - data = super(RmaAddInvoice, self).\ + data = super(RmaAddSale, self).\ _prepare_rma_line_from_sale_order_line(line) data.update(analytic_account_id=line.analytic_account_id.id) return data