Merge lp:~pedro.baeza/openerp-spain/6.1-l10n_es_fiscal_year_closing-imp into lp:~openerp-spain-team/openerp-spain/6.1

Proposed by Pedro Manuel Baeza on 2014-04-30
Status: Merged
Merged at revision: 396
Proposed branch: lp:~pedro.baeza/openerp-spain/6.1-l10n_es_fiscal_year_closing-imp
Merge into: lp:~openerp-spain-team/openerp-spain/6.1
Diff against target: 22 lines (+7/-4)
1 file modified
l10n_es_fiscal_year_closing/fyc.py (+7/-4)
To merge this branch: bzr merge lp:~pedro.baeza/openerp-spain/6.1-l10n_es_fiscal_year_closing-imp
Reviewer Review Type Date Requested Status
OpenERP Spain Team 2014-04-30 Pending
Review via email: mp+217780@code.launchpad.net

Description of the change

Optimización de la conciliación de los asientos de cierre, apertura y PyG, tal como ya se hizo en la v7.

To post a comment you must log in.
Pedro Manuel Baeza (pedro.baeza) wrote :

Paso a hacer el merge tras un tiempo de prueba prudencial.

Un saludo.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_es_fiscal_year_closing/fyc.py'
2--- l10n_es_fiscal_year_closing/fyc.py 2013-07-18 16:08:37 +0000
3+++ l10n_es_fiscal_year_closing/fyc.py 2014-04-30 15:50:06 +0000
4@@ -644,11 +644,14 @@
5 # reconcile option of an account in the future)
6 #
7 netsvc.Logger().notifyChannel('fyc', netsvc.LOG_DEBUG, "Reconcile %s" % move.ref)
8- tmp_context = context.copy()
9- tmp_context['fy_closing'] = True # Fiscal year closing = reconcile everything
10 line_ids = [line.id for line in move.line_id]
11- self.pool.get('account.move.line').reconcile(cr, uid, line_ids, context=tmp_context)
12-
13+ r_id = self.pool['account.move.reconcile'].create(cr, uid,
14+ {'type': 'auto',
15+ 'opening_reconciliation': True})
16+ cr.execute("""UPDATE account_move_line
17+ SET reconcile_id = %s
18+ WHERE id in %s""",
19+ (r_id, tuple(line_ids),))
20 #
21 # Close the fiscal year and it's periods
22 #