diff --git a/rma_purchase_analytic/__init__.py b/rma_purchase_analytic/__init__.py index 380a90533..69f54da63 100644 --- a/rma_purchase_analytic/__init__.py +++ b/rma_purchase_analytic/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import models diff --git a/rma_purchase_analytic/__manifest__.py b/rma_purchase_analytic/__manifest__.py index b1742e527..70b19ff10 100644 --- a/rma_purchase_analytic/__manifest__.py +++ b/rma_purchase_analytic/__manifest__.py @@ -1,17 +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", - "author": "Eficent," - "Odoo Community Association (OCA)", + "author": "Eficent," "Odoo Community Association (OCA)", "license": "LGPL-3", - "website": "http://www.eficent.com", + "website": "https://github.com/ForgeFlow/stock-rma", "category": "Analytic", "depends": ["rma_account", "rma_analytic", "purchase_analytic"], - "data": [ - ], - 'installable': True, + "data": [], + "installable": True, } diff --git a/rma_purchase_analytic/models/__init__.py b/rma_purchase_analytic/models/__init__.py index 7ea713ef6..6d34d49d6 100644 --- a/rma_purchase_analytic/models/__init__.py +++ b/rma_purchase_analytic/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import purchase_order_line diff --git a/rma_purchase_analytic/models/purchase_order_line.py b/rma_purchase_analytic/models/purchase_order_line.py index 044600f9a..e1e953f14 100644 --- a/rma_purchase_analytic/models/purchase_order_line.py +++ b/rma_purchase_analytic/models/purchase_order_line.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). @@ -8,11 +7,13 @@ class PurchaseOrderLine(models.Model): _inherit = "purchase.order.line" - @api.constrains('account_analytic_id') + @api.constrains("account_analytic_id") def check_analytic(self): for line in self.filtered(lambda p: p.rma_line_id): - if (line.account_analytic_id != - line.rma_line_id.analytic_account_id): + if line.account_analytic_id != line.rma_line_id.analytic_account_id: raise exceptions.ValidationError( - _("The analytic account in the PO line it's not the same" - " as in the rma line")) + _( + "The analytic account in the PO line it's not the same" + " as in the rma line" + ) + ) diff --git a/rma_purchase_analytic/wizards/__init__.py b/rma_purchase_analytic/wizards/__init__.py index c23b3717c..4be361297 100644 --- a/rma_purchase_analytic/wizards/__init__.py +++ b/rma_purchase_analytic/wizards/__init__.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) diff --git a/rma_purchase_analytic/wizards/rma_add_purchase.py b/rma_purchase_analytic/wizards/rma_add_purchase.py index 9bce48e30..75766ec34 100644 --- a/rma_purchase_analytic/wizards/rma_add_purchase.py +++ b/rma_purchase_analytic/wizards/rma_add_purchase.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) @@ -6,7 +5,7 @@ class RmaAddPurchase(models.TransientModel): - _inherit = 'rma_add_purchase' + _inherit = "rma_add_purchase" @api.model def _prepare_rma_line_from_po_line(self, line): @@ -21,8 +20,8 @@ class RmaLineMakePurchaseOrder(models.TransientModel): @api.model def _prepare_purchase_order_line(self, po, item): - res = super( - RmaLineMakePurchaseOrder, self)._prepare_purchase_order_line( - po, item) - res['account_analytic_id'] = item.line_id.analytic_account_id.id + res = super(RmaLineMakePurchaseOrder, self)._prepare_purchase_order_line( + po, item + ) + res["account_analytic_id"] = item.line_id.analytic_account_id.id return res diff --git a/setup/rma_purchase_analytic/odoo/__init__.py b/setup/rma_purchase_analytic/odoo/__init__.py new file mode 100644 index 000000000..de40ea7ca --- /dev/null +++ b/setup/rma_purchase_analytic/odoo/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/rma_purchase_analytic/odoo/addons/__init__.py b/setup/rma_purchase_analytic/odoo/addons/__init__.py new file mode 100644 index 000000000..de40ea7ca --- /dev/null +++ b/setup/rma_purchase_analytic/odoo/addons/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/rma_purchase_analytic/odoo/addons/rma_purchase_analytic b/setup/rma_purchase_analytic/odoo/addons/rma_purchase_analytic new file mode 120000 index 000000000..f3df8c9ec --- /dev/null +++ b/setup/rma_purchase_analytic/odoo/addons/rma_purchase_analytic @@ -0,0 +1 @@ +../../../../rma_purchase_analytic \ No newline at end of file diff --git a/setup/rma_purchase_analytic/setup.py b/setup/rma_purchase_analytic/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/rma_purchase_analytic/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)