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

Proposed by jftempo
Status: Merged
Merged at revision: 5604
Proposed branch: lp:~julie-w/unifield-server/US-6626
Merge into: lp:unifield-server
Diff against target: 47 lines (+7/-5)
2 files modified
bin/addons/register_accounting/account_bank_statement.py (+3/-3)
bin/addons/register_accounting/wizard/wizard_cash_return.py (+4/-2)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-6626
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+378503@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/register_accounting/account_bank_statement.py'
2--- bin/addons/register_accounting/account_bank_statement.py 2019-10-30 16:33:21 +0000
3+++ bin/addons/register_accounting/account_bank_statement.py 2020-02-04 10:20:44 +0000
4@@ -1796,7 +1796,7 @@
5 """
6 If the statement line...
7 - is being hardposted
8- - has a Partner Third Party
9+ - has a Partner Third Party being neither Intermission nor Intersection
10 - is booked on an income or expense account
11 ... this method creates automated entries on partner payable or receivable account (JI), adds them to the
12 regline JE, and returns a list of their ids that will have to be reconciled once the JE will be posted.
13@@ -1806,8 +1806,8 @@
14 if not st_line:
15 return False
16 automated_entries_ids = []
17- if posttype == 'hard' and st_line.partner_id and st_line.account_id.user_type.code in ('expense', 'income') and \
18- st_line.direct_invoice is False:
19+ if posttype == 'hard' and st_line.partner_id and st_line.partner_id.partner_type not in ('intermission', 'section') and \
20+ st_line.account_id.user_type.code in ('expense', 'income') and st_line.direct_invoice is False:
21 # Prepare some elements
22 move_line_obj = self.pool.get('account.move.line')
23 current_date = time.strftime('%Y-%m-%d')
24
25=== modified file 'bin/addons/register_accounting/wizard/wizard_cash_return.py'
26--- bin/addons/register_accounting/wizard/wizard_cash_return.py 2020-01-21 17:24:12 +0000
27+++ bin/addons/register_accounting/wizard/wizard_cash_return.py 2020-02-04 10:20:44 +0000
28@@ -926,7 +926,8 @@
29 if partner:
30 if partner._name == 'res.partner':
31 partner_id = partner.id
32- advances_with_supplier.setdefault(adv_move, []).append(advance)
33+ if partner.partner_type not in ('intermission', 'section'):
34+ advances_with_supplier.setdefault(adv_move, []).append(advance)
35 elif partner._name == 'hr.employee':
36 line_employee_id = partner.id
37 debit = abs(advance.amount)
38@@ -945,7 +946,8 @@
39 account_id, debit, credit, adv_return_ref, adv_move, distrib_id, context=context)
40 adv_move_data.append((adv_move, adv_id))
41
42- # if advance lines have a Partner Third Party: create Payable Entries and add them to the advance closing JE
43+ # if advance lines have a Partner Third Party being neither Intermission nor Intersection:
44+ # create Payable Entries and add them to the advance closing JE
45 to_reconcile = {} # per advance line
46 payable_lines = []
47 for adv_move in advances_with_supplier:

Subscribers

People subscribed via source and target branches