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

Proposed by jftempo
Status: Merged
Merged at revision: 2768
Proposed branch: lp:~jfb-tempo-consulting/unifield-wm/us-828
Merge into: lp:unifield-wm
Diff against target: 52 lines (+5/-18)
1 file modified
account_corrections/wizard/analytic_distribution_wizard.py (+5/-18)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-wm/us-828
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+285725@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 2016-02-05 09:06:52 +0000
3+++ account_corrections/wizard/analytic_distribution_wizard.py 2016-02-11 14:02:28 +0000
4@@ -360,13 +360,6 @@
5 amount_cur = (ml.credit_currency - ml.debit_currency) * line.percentage / 100
6 amount = self.pool.get('res.currency').compute(cr, uid, ml.currency_id.id, company_currency_id, amount_cur, round=False, context=ctx)
7
8- date_to_use = orig_date
9- if ml.journal_id.type == 'hq':
10- # US-773: keep date when correcting hq entry
11- date_to_use = False
12- # UFTP-169: Use the correction line date in case we are correcting a line that is a correction of another line.
13- if ml.corrected_line_id:
14- date_to_use = ml.date
15 vals = {
16 'account_id': line.analytic_id.id,
17 'cost_center_id': line.cost_center_id.id,
18@@ -374,21 +367,15 @@
19 'amount_currency': amount_cur,
20 'amount': amount,
21 }
22- if date_to_use:
23+
24+ # UFTP-169: Use the correction line date in case we are correcting a line that is a correction of another line.
25+ if ml.corrected_line_id:
26 vals.update({
27- 'date': date_to_use,
28+ 'date': ml.date,
29 'source_date': orig_date,
30 'document_date': orig_document_date,
31 })
32 self.pool.get('account.analytic.line').write(cr, uid, to_override_ids, vals)
33- # UTP-1118: Fix problem of entry_sequence that is not the right one regarding the journal
34-
35- # UFTP-373: The block below is commented out, as there is no reason to replace the Seq in here
36-# for ana_line in self.pool.get('account.analytic.line').browse(cr, uid, to_override_ids, context=context):
37-# prefix = ana_line.instance_id.move_prefix
38-# seqnum = ana_line.entry_sequence.split('-')[2]
39-# entry_seq = "%s-%s-%s" % (prefix, ana_line.journal_id.code, seqnum)
40-# cr.execute('UPDATE account_analytic_line SET entry_sequence = %s WHERE id = %s', (entry_seq, ana_line.id))
41 # update the distib line
42 self.pool.get('funding.pool.distribution.line').write(cr, uid, [line.distribution_line_id.id], {
43 'analytic_id': line.analytic_id.id,
44@@ -398,7 +385,7 @@
45 })
46 if greater_amount['gap_amount'] and greater_amount['wl'] and greater_amount['wl'].id == line.id:
47 greater_amount['aji_id'] = to_override_ids[0]
48- greater_amount['date'] = date_to_use
49+ greater_amount['date'] = orig_date
50
51 #####
52 # US-676

Subscribers

People subscribed via source and target branches