diff --git a/addons/account_payment/__init__.py b/addons/account_payment/__init__.py index 3724590e5f5..82a05aa73e9 100644 --- a/addons/account_payment/__init__.py +++ b/addons/account_payment/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -23,11 +23,10 @@ # Init Sales #---------------------------------------------------------- -import payment +import account_payment import wizard import account_move_line import account_invoice import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index 98b76d05088..cd0e162df17 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -41,11 +41,11 @@ 'wizard/account_payment_pay_view.xml', 'wizard/account_payment_populate_statement_view.xml', 'wizard/account_payment_create_order_view.xml', - 'payment_view.xml', - 'payment_workflow.xml', - 'payment_sequence.xml', + 'account_payment_view.xml', + 'account_payment_workflow.xml', + 'account_payment_sequence.xml', 'account_invoice_view.xml', - 'payment_report.xml', + 'account_payment_report.xml', ], 'demo_xml': [], 'test': ['test/account_payment.yml'], diff --git a/addons/account_payment/payment.py b/addons/account_payment/account_payment.py similarity index 98% rename from addons/account_payment/payment.py rename to addons/account_payment/account_payment.py index 8e300f7072a..20d8ff1afd7 100644 --- a/addons/account_payment/payment.py +++ b/addons/account_payment/account_payment.py @@ -18,29 +18,25 @@ # along with this program. If not, see . # ############################################################################## - -from osv import fields -from osv import osv import time -import netsvc -import pooler +from osv import osv, fields +import netsvc class payment_type(osv.osv): _name= 'payment.type' _description= 'Payment Type' _columns= { - 'name': fields.char('Name', size=64, required=True,help='Payment Type'), - 'code': fields.char('Code', size=64, required=True,help='Specifies the Code for Payment Type'), + 'name': fields.char('Name', size=64, required=True, help='Payment Type'), + 'code': fields.char('Code', size=64, required=True, help='Specifies the Code for Payment Type'), 'suitable_bank_types': fields.many2many('res.partner.bank.type', 'bank_type_payment_type_rel', 'pay_type_id','bank_type_id', 'Suitable bank types') - } + } payment_type() - class payment_mode(osv.osv): _name= 'payment.mode' _description= 'Payment Mode' @@ -66,16 +62,14 @@ class payment_mode(osv.osv): where pm.id = %s """, [payment_code]) return [x[0] for x in cr.fetchall()] - payment_mode() - class payment_order(osv.osv): _name = 'payment.order' _description = 'Payment Order' _rec_name = 'reference' - def get_wizard(self,type): + def get_wizard(self, type): logger = netsvc.Logger() logger.notifyChannel("warning", netsvc.LOG_WARNING, "No wizard found for the payment type '%s'." % type) @@ -146,7 +140,6 @@ class payment_order(osv.osv): payment_order() - class payment_line(osv.osv): _name = 'payment.line' _description = 'Payment Line' diff --git a/addons/account_payment/payment_report.xml b/addons/account_payment/account_payment_report.xml similarity index 100% rename from addons/account_payment/payment_report.xml rename to addons/account_payment/account_payment_report.xml diff --git a/addons/account_payment/payment_sequence.xml b/addons/account_payment/account_payment_sequence.xml similarity index 100% rename from addons/account_payment/payment_sequence.xml rename to addons/account_payment/account_payment_sequence.xml diff --git a/addons/account_payment/payment_view.xml b/addons/account_payment/account_payment_view.xml similarity index 100% rename from addons/account_payment/payment_view.xml rename to addons/account_payment/account_payment_view.xml diff --git a/addons/account_payment/payment_workflow.xml b/addons/account_payment/account_payment_workflow.xml similarity index 100% rename from addons/account_payment/payment_workflow.xml rename to addons/account_payment/account_payment_workflow.xml diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 5e37bd79488..81f5e4a570f 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -110,8 +110,7 @@ class payment_order_create(osv.osv_memory): context.update({'line_ids': line_ids}) model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_create_payment_order_lines')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - return { - 'name': ('Entrie Lines'), + return {'name': ('Entrie Lines'), 'context': context, 'view_type': 'form', 'view_mode': 'form', diff --git a/addons/account_payment/wizard/account_payment_pay.py b/addons/account_payment/wizard/account_payment_pay.py index 74e1566520c..20e1e10f882 100644 --- a/addons/account_payment/wizard/account_payment_pay.py +++ b/addons/account_payment/wizard/account_payment_pay.py @@ -18,16 +18,13 @@ # along with this program. If not, see . # ############################################################################## -import time from osv import fields, osv class account_payment_make_payment(osv.osv_memory): _name = 'account.payment.make.payment' _description = 'Account make payment' - _columns = { - } - def launch_wizard(self, cr, uid, ids, context): + def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch according to the type. If type is manual. just confirm the order. @@ -35,8 +32,8 @@ class account_payment_make_payment(osv.osv_memory): obj_payment_order = self.pool.get('payment.order') obj_model = self.pool.get('ir.model.data') obj_act = self.pool.get('ir.actions.act_window') - order= obj_payment_order.browse(cr,uid,context['active_id'],context) - t= order.mode and order.mode.type.code or 'manual' + order= obj_payment_order.browse(cr, uid, context['active_id'], context) + t = order.mode and order.mode.type.code or 'manual' if t == 'manual' : obj_payment_order.set_done(cr,uid,context['active_id'],context) return {} @@ -49,12 +46,10 @@ class account_payment_make_payment(osv.osv_memory): module, wizard= gw result = mod_obj._get_id(cr, uid, module, wizard) id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] - result = act_obj.read(cr, uid, [id])[0] + return act_obj.read(cr, uid, [id])[0] #result['context'] = str({'fiscalyear': data['form']['fiscalyear']}) - return result account_payment_make_payment() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file