Merge lp:~jfb-tempo-consulting/unifield-wm/us-159 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 2455
Proposed branch: lp:~jfb-tempo-consulting/unifield-wm/us-159
Merge into: lp:unifield-wm
Diff against target: 40 lines (+5/-3)
2 files modified
account_corrections/wizard/analytic_distribution_wizard.py (+2/-2)
analytic_override/analytic_line.py (+3/-1)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-wm/us-159
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+254267@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_corrections/wizard/analytic_distribution_wizard.py'
--- account_corrections/wizard/analytic_distribution_wizard.py 2015-03-25 15:26:28 +0000
+++ account_corrections/wizard/analytic_distribution_wizard.py 2015-03-26 15:01:40 +0000
@@ -224,12 +224,12 @@
224 create_date = ml.date224 create_date = ml.date
225 # create the ana line (pay attention to take original date as posting date as UF-2199 said it.225 # create the ana line (pay attention to take original date as posting date as UF-2199 said it.
226 name = False226 name = False
227 if to_reverse:227 if period_closed:
228 create_date = wizard.date228 create_date = wizard.date
229 name = self.pool.get('account.analytic.line').join_without_redundancy(ml.name, 'COR')229 name = self.pool.get('account.analytic.line').join_without_redundancy(ml.name, 'COR')
230 created_analytic_line_ids = self.pool.get('funding.pool.distribution.line').create_analytic_lines(cr, uid, [new_distrib_line], ml.id, date=create_date, document_date=orig_document_date, source_date=orig_date, name=name, context=context)230 created_analytic_line_ids = self.pool.get('funding.pool.distribution.line').create_analytic_lines(cr, uid, [new_distrib_line], ml.id, date=create_date, document_date=orig_document_date, source_date=orig_date, name=name, context=context)
231 # Set right analytic correction journal to these lines231 # Set right analytic correction journal to these lines
232 if to_reverse:232 if period_closed:
233 self.pool.get('account.analytic.line').write(cr, uid, created_analytic_line_ids[new_distrib_line], {'journal_id': correction_journal_id})233 self.pool.get('account.analytic.line').write(cr, uid, created_analytic_line_ids[new_distrib_line], {'journal_id': correction_journal_id})
234 have_been_created.append(created_analytic_line_ids[new_distrib_line])234 have_been_created.append(created_analytic_line_ids[new_distrib_line])
235235
236236
=== modified file 'analytic_override/analytic_line.py'
--- analytic_override/analytic_line.py 2015-02-19 17:00:37 +0000
+++ analytic_override/analytic_line.py 2015-03-26 15:01:40 +0000
@@ -226,7 +226,7 @@
226 self._check_document_date(cr, uid, ids)226 self._check_document_date(cr, uid, ids)
227 return res227 return res
228228
229 def reverse(self, cr, uid, ids, posting_date=strftime('%Y-%m-%d'), context=None):229 def reverse(self, cr, uid, ids, posting_date=None, context=None):
230 """230 """
231 Reverse an analytic line:231 Reverse an analytic line:
232 - keep date as source_date232 - keep date as source_date
@@ -236,6 +236,8 @@
236 context = {}236 context = {}
237 if isinstance(ids, (int, long)):237 if isinstance(ids, (int, long)):
238 ids = [ids]238 ids = [ids]
239 if posting_date is None:
240 posting_date = strftime('%Y-%m-%d')
239 res = []241 res = []
240 for al in self.browse(cr, uid, ids, context=context):242 for al in self.browse(cr, uid, ids, context=context):
241 vals = {243 vals = {

Subscribers

People subscribed via source and target branches