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
1=== modified file 'account_corrections/wizard/analytic_distribution_wizard.py'
2--- account_corrections/wizard/analytic_distribution_wizard.py 2015-03-25 15:26:28 +0000
3+++ account_corrections/wizard/analytic_distribution_wizard.py 2015-03-26 15:01:40 +0000
4@@ -224,12 +224,12 @@
5 create_date = ml.date
6 # create the ana line (pay attention to take original date as posting date as UF-2199 said it.
7 name = False
8- if to_reverse:
9+ if period_closed:
10 create_date = wizard.date
11 name = self.pool.get('account.analytic.line').join_without_redundancy(ml.name, 'COR')
12 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)
13 # Set right analytic correction journal to these lines
14- if to_reverse:
15+ if period_closed:
16 self.pool.get('account.analytic.line').write(cr, uid, created_analytic_line_ids[new_distrib_line], {'journal_id': correction_journal_id})
17 have_been_created.append(created_analytic_line_ids[new_distrib_line])
18
19
20=== modified file 'analytic_override/analytic_line.py'
21--- analytic_override/analytic_line.py 2015-02-19 17:00:37 +0000
22+++ analytic_override/analytic_line.py 2015-03-26 15:01:40 +0000
23@@ -226,7 +226,7 @@
24 self._check_document_date(cr, uid, ids)
25 return res
26
27- def reverse(self, cr, uid, ids, posting_date=strftime('%Y-%m-%d'), context=None):
28+ def reverse(self, cr, uid, ids, posting_date=None, context=None):
29 """
30 Reverse an analytic line:
31 - keep date as source_date
32@@ -236,6 +236,8 @@
33 context = {}
34 if isinstance(ids, (int, long)):
35 ids = [ids]
36+ if posting_date is None:
37+ posting_date = strftime('%Y-%m-%d')
38 res = []
39 for al in self.browse(cr, uid, ids, context=context):
40 vals = {

Subscribers

People subscribed via source and target branches