Merge lp:~julie-w/unifield-server/US-3679 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4727
Proposed branch: lp:~julie-w/unifield-server/US-3679
Merge into: lp:unifield-server
Diff against target: 40 lines (+10/-4)
1 file modified
bin/addons/account/account_move_line.py (+10/-4)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-3679
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+337066@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 'bin/addons/account/account_move_line.py'
2--- bin/addons/account/account_move_line.py 2018-01-11 10:03:28 +0000
3+++ bin/addons/account/account_move_line.py 2018-02-02 13:26:06 +0000
4@@ -1315,9 +1315,10 @@
5 Returns a JI view with all the JIs related to the selected one, i.e.:
6 1) those having the same Entry Sequence as the selected JI (including the selected JI itself)
7 2) those having the same reference as one of the JIs found in 1)
8- 3) those being partially or totally reconciled with one of the JIs found in 1)
9- 4) those whose reference contains EXACTLY the Entry Sequence of the selected JI
10- 5) those having the same Entry Sequence as one of the JIs found in 2), 3) or 4)
11+ 3) those having an Entry Sequence matching exactly with the reference of one of the JIs found in 1)
12+ 4) those being partially or totally reconciled with one of the JIs found in 1)
13+ 5) those whose reference contains EXACTLY the Entry Sequence of the selected JI
14+ 6) those having the same Entry Sequence as one of the JIs found in 2), 3) 4) or 5)
15 """
16 if context is None:
17 context = {}
18@@ -1328,6 +1329,7 @@
19 raise osv.except_osv(_('Error'),
20 _('The related entries feature can only be used with one Journal Item.'))
21 ir_model_obj = self.pool.get('ir.model.data')
22+ am_obj = self.pool.get('account.move')
23 related_amls = set()
24 selected_aml = self.browse(cr, uid, ids[0], fields_to_fetch=['move_id'], context=context)
25 selected_entry_seq = selected_aml.move_id.name
26@@ -1346,9 +1348,13 @@
27 aml.reconcile_id and set_of_reconcile_ids.add(aml.reconcile_id.id)
28 aml.reconcile_partial_id and set_of_reconcile_ids.add(aml.reconcile_partial_id.id)
29
30- domain_related_jis = ['|', '|', '|',
31+ # JEs with Entry Sequence = ref of one of the JIs of the account_move
32+ je_ids = am_obj.search(cr, uid, [('name', 'in', list(set_of_refs))], order='NO_ORDER', context=context)
33+
34+ domain_related_jis = ['|', '|', '|', '|',
35 '&', ('ref', 'in', list(set_of_refs)), ('ref', '!=', ''),
36 ('ref', '=', selected_entry_seq),
37+ ('move_id', 'in', je_ids),
38 ('reconcile_id', 'in', list(set_of_reconcile_ids)),
39 ('reconcile_partial_id', 'in', list(set_of_reconcile_ids))]
40 related_ji_ids = self.search(cr, uid, domain_related_jis, order='NO_ORDER', context=context)

Subscribers

People subscribed via source and target branches