diff --git a/account_default_draft_move/__init__.py b/account_default_draft_move/__init__.py index 2e0d691e4..57bf09648 100644 --- a/account_default_draft_move/__init__.py +++ b/account_default_draft_move/__init__.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright (c) 2012 Camptocamp (http://www.camptocamp.com) -# All Right Reserved -# -# Author : Vincent Renaville (Camptocamp) +# Author Vincent Renaville. Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,8 +18,6 @@ # ############################################################################## - -import account -import account_bank_statement -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +from . import account +from . import account_bank_statement +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/account_default_draft_move/__openerp__.py b/account_default_draft_move/__openerp__.py index c2fec8c7e..28f503cfc 100644 --- a/account_default_draft_move/__openerp__.py +++ b/account_default_draft_move/__openerp__.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright (c) 2012 Camptocamp (http://www.camptocamp.com) -# All Right Reserved -# -# Author : Vincent Renaville (Camptocamp) +# Author Vincent Renaville. Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,19 +17,15 @@ # along with this program. If not, see . # ############################################################################## - { "name" : "Move in draft state by default", "version" : "1.0", "depends" : ["base", "account"], - "author" : "CamptoCamp", + "author" : "Camptocamp", "description": """Let move in draft on invoice and bank statement """, - 'website': 'http://www.openerp.com', - 'init_xml': [], - 'update_xml': [ - ], - 'demo_xml': [], + 'website': 'http://www.camptocamp.com', + 'data' : [], 'installable': True, 'active': False, } diff --git a/account_default_draft_move/account.py b/account_default_draft_move/account.py index c056d77f4..464c9ee14 100644 --- a/account_default_draft_move/account.py +++ b/account_default_draft_move/account.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright (c) 2012 Camptocamp (http://www.camptocamp.com) -# All Right Reserved -# -# Author : Vincent Renaville (Camptocamp) +# Author Vincent Renaville. Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,12 +18,11 @@ # ############################################################################## - -from openerp.osv.orm import TransientModel, fields -from osv import osv +from openerp.osv import fields, orm, osv from tools.translate import _ -class account_move(TransientModel): + +class account_move(orm.Model): _inherit = "account.move" def post(self, cr, uid, ids, context=None): @@ -61,6 +57,4 @@ class account_move(TransientModel): move_obj = self.pool.get('account.move') move_obj.write(cr, uid, ids, {'state': 'draft'}, context=context) return True - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/account_default_draft_move/account_bank_statement.py b/account_default_draft_move/account_bank_statement.py index 02486f3f9..ada6141c0 100644 --- a/account_default_draft_move/account_bank_statement.py +++ b/account_default_draft_move/account_bank_statement.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright (c) 2012 Camptocamp (http://www.camptocamp.com) -# All Right Reserved -# -# Author : Vincent Renaville (Camptocamp) +# Author Vincent Renaville. Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,20 +18,20 @@ # ############################################################################## -import time - -from openerp.osv.orm import TransientModel, fields +from openerp.osv import fields, orm from tools.translate import _ -class account_bank_statement(TransientModel): + +class account_bank_statement(orm.Model): _inherit = "account.bank.statement" def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None): - move_ids = super(account_bank_statement,self).create_move_from_st_line(cr, uid, st_line_id, company_currency_id, st_line_number, context) + move_ids = super(account_bank_statement,self).create_move_from_st_line(cr, uid, st_line_id, + company_currency_id, + st_line_number, context) ## We receive the move created for the bank statement, we set it to draft if move_ids: move_obj = self.pool.get('account.move') move_obj.write(cr, uid, move_ids, {'state': 'draft'}, context=context) return move_ids - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file