From 22a0d2b41b892118aa84ca5804f8e906889c0dff Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 19 Dec 2017 18:47:23 +0100 Subject: [PATCH] Remove module purchase_auto_invoice_method which is useless in v10 --- purchase_auto_invoice_method/__init__.py | 3 -- purchase_auto_invoice_method/__manifest__.py | 46 -------------------- purchase_auto_invoice_method/purchase.py | 38 ---------------- 3 files changed, 87 deletions(-) delete mode 100644 purchase_auto_invoice_method/__init__.py delete mode 100644 purchase_auto_invoice_method/__manifest__.py delete mode 100644 purchase_auto_invoice_method/purchase.py diff --git a/purchase_auto_invoice_method/__init__.py b/purchase_auto_invoice_method/__init__.py deleted file mode 100644 index b46d7f4..0000000 --- a/purchase_auto_invoice_method/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import purchase diff --git a/purchase_auto_invoice_method/__manifest__.py b/purchase_auto_invoice_method/__manifest__.py deleted file mode 100644 index 0a209f5..0000000 --- a/purchase_auto_invoice_method/__manifest__.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Purchase auto invoice method module for Odoo -# Copyright (C) 2013-2015 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Purchase Auto Invoice Method', - 'version': '0.1', - 'category': 'Purchase', - 'license': 'AGPL-3', - 'summary': "Set Invoice Method of PO to 'picking', unless if it's service-only", - 'description': """ -Purchase Auto Invoice Method -============================ - -This module is usefull for the companies that have set the *Default invoicing control method* to *Based on incoming shipments* in the menu *Settings > Configuration > Purchase*. - -When you confirm a purchase order, if the *Invoicing Control* is *Based on incoming shipments* and the PO only contains service lines, the *Invoicing Control* is automatically switched to *Based on generated draft invoice*. - -This module has been written by Alexis de Lattre from Akretion -. - """, - 'author': 'Akretion', - 'website': 'http://www.akretion.com', - 'depends': ['purchase'], - 'data': [], - 'installable': False, -} diff --git a/purchase_auto_invoice_method/purchase.py b/purchase_auto_invoice_method/purchase.py deleted file mode 100644 index b054869..0000000 --- a/purchase_auto_invoice_method/purchase.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Purchase Auto Invoice Method module for Odoo -# Copyright (C) 2013-2015 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp import models, api - - -class PurchaseOrder(models.Model): - _inherit = 'purchase.order' - - @api.multi - def wkf_confirm_order(self): - for po in self: - if ( - po.invoice_method == 'picking' and all([ - line.product_id and - line.product_id.type == 'service' - for line in po.order_line])): - po.invoice_method = 'order' - return super(PurchaseOrder, self).wkf_confirm_order()