Remove module that is not useful in v10

This commit is contained in:
Alexis de Lattre
2016-11-22 09:31:40 +01:00
parent 9e3d62b4ba
commit 4e4d02aa14
4 changed files with 0 additions and 121 deletions

View File

@@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-
from . import stock

View File

@@ -1,43 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Stock Invoice Try Again module for Odoo
# Copyright (C) 2013-2015 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Stock Invoice Try Again',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Add a button to set a picking back to "To Be Invoiced"',
'description': """
Stock Invoice Try Again
=======================
When the sale order has 'Create Invoice' set to 'On Delivery Order', there is a button 'Create Invoice' on the Delivery Order once the goods are shipped. When the user clicks on this button, OpenERP creates a draft invoice. If the user deletes this draft invoice by mistake, he cannot re-create the invoice. This module is the solution : if the invoice has been deleted, the user can set the picking back to 'To Be Invoiced' and create the invoice again.
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['stock_picking_invoice_link', 'stock_account'],
'data': ['stock_view.xml'],
'installable': False,
}

View File

@@ -1,45 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Stock Invoice Try Again module for Odoo
# Copyright (C) 2013-2015 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, api, _
from openerp.exceptions import Warning as UserError
class StockPicking(models.Model):
_inherit = 'stock.picking'
@api.multi
def revert_to_tobeinvoiced(self):
self.ensure_one()
if self.invoice_state == 'invoiced':
if self.invoice_id:
raise UserError(_(
"This picking is linked to the invoice with "
"description '%s'. You should first delete this "
"invoice and try again.")
% self.invoice_id.name)
self.invoice_state = '2binvoiced'
else:
raise UserError(_(
"You can only do this when the Delivery Order "
"has 'Invoice State' = 'Invoiced'."))
return True

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013-2015 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_picking_inherit_form2" model="ir.ui.view">
<field name="name">stock_invoice_try_again.view_picking_form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock_account.view_picking_inherit_form2"/>
<field name="arch" type="xml">
<button string="Create Invoice" position="after">
<button name="revert_to_tobeinvoiced"
string="Revert to To be Invoiced"
type="object"
confirm="Are you sure you want to revert the 'Invoice Control' to 'To be Invoiced' ?"
attrs="{'invisible': [('invoice_state', '!=', 'invoiced')]}"
groups="account.group_account_invoice" />
</button>
</field>
</record>
</data>
</openerp>