[IMP] Change the way moves are set to draft after invoice validation -> Use the same philosophy than in bank-statement rather than using the post method.

[DEL] Remove the po file as they are empty.
[DOC] Add a clearer description in the module
This commit is contained in:
Joel Grand-Guillaume
2013-01-21 15:32:40 +01:00
parent 6d75a71721
commit 7bb515c38e
6 changed files with 43 additions and 126 deletions

View File

@@ -15,23 +15,24 @@
#
# 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 fields, orm
from tools.translate import _
class account_bank_statement(orm.Model):
class AccountBankStatement(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)
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id,
st_line_number, context=None):
move_ids = super(AccountBankStatement,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: