Ashvin Rathod (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-789984-ara into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #789984 in OpenERP Addons: "Wrong effective date on journal entry when 
importing invoices in bank statement"
  https://bugs.launchpad.net/openobject-addons/+bug/789984

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-789984-ara/+merge/63085

Hello,

Fix: Wrong effective date on journal entry when importing invoices in bank 
statement

Thanks,
ara
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-789984-ara/+merge/63085
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-789984-ara.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2011-05-30 14:14:51 +0000
+++ account/account_move_line.py	2011-06-01 09:33:31 +0000
@@ -1143,7 +1143,7 @@
         if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']:
             raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!'))
         if update_check:
-            if ('account_id' in vals) or ('journal_id' in vals) or ('period_id' in vals) or ('move_id' in vals) or ('debit' in vals) or ('credit' in vals) or ('date' in vals):
+            if ('account_id' in vals) or ('journal_id' in vals) or ('period_id' in vals) or ('move_id' in vals) or ('debit' in vals) or ('credit' in vals):
                 self._update_check(cr, uid, ids, context)
 
         todo_date = None

=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2011-04-20 06:07:17 +0000
+++ account_voucher/account_voucher.py	2011-06-01 09:33:31 +0000
@@ -951,7 +951,7 @@
                 'move_ids': [(4, v.move_id.id, False)]
             })
 
-            return move_line_obj.write(cr, uid, [x.id for x in v.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
+            return move_line_obj.write(cr, uid, [x.id for x in v.move_ids], {'statement_id': st_line.statement_id.id, 'date': st_line.date}, context=context)
         return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
 
 account_bank_statement()

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to