[RFR] License and API

This commit is contained in:
Stefan Rijnhart
2013-05-28 15:41:42 +02:00
parent fd6cac4854
commit 0bc3cdaa8f
3 changed files with 51 additions and 9 deletions

View File

@@ -1,6 +1,29 @@
# -*- coding: utf-8 -*-
from osv import osv, fields
from tools.translate import _
##############################################################################
#
# Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
#
# All other contributions are (C) by their respective contributors
#
# All Rights Reserved
#
# 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.osv import orm, fields
from openerp.tools.translate import _
"""
This module adds support for Direct debit orders as applicable
@@ -98,7 +121,7 @@ Two cases need to be distinguisted:
open invoices with a matured invoice- or due date.
"""
class account_invoice(osv.osv):
class account_invoice(orm.Model):
_inherit = "account.invoice"
def __init__(self, pool, cr):
@@ -139,5 +162,3 @@ class account_invoice(osv.osv):
if not invoice['reconciled']:
return False
return True
account_invoice()

View File

@@ -1 +1,2 @@
# -*- coding: utf-8 -*-
import payment_order

View File

@@ -1,8 +1,30 @@
# -*- coding: utf-8 -*-
from osv import osv, fields
##############################################################################
#
# Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
#
# All other contributions are (C) by their respective contributors
#
# All Rights Reserved
#
# 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/>.
#
##############################################################################
class payment_order_create(osv.osv_memory):
from osv import orm
class payment_order_create(orm.TransientModel):
_inherit = 'payment.order.create'
def default_get(self, cr, uid, fields_list, context=None):
@@ -27,5 +49,3 @@ class payment_order_create(osv.osv_memory):
res['entries'] = context['line_ids']
return res
payment_order_create()