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

Proposed by jftempo
Status: Merged
Merged at revision: 5656
Proposed branch: lp:~julie-w/unifield-server/US-7085
Merge into: lp:unifield-server
Diff against target: 14 lines (+3/-1)
1 file modified
bin/addons/finance/stock.py (+3/-1)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-7085
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+380499@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/finance/stock.py'
2--- bin/addons/finance/stock.py 2017-11-07 14:36:21 +0000
3+++ bin/addons/finance/stock.py 2020-03-10 17:00:44 +0000
4@@ -54,7 +54,9 @@
5
6 self.pool.get('account.invoice.line').write(cr, uid, [invoice_line_id], values)
7
8- if move_line.picking_id and move_line.picking_id.purchase_id and move_line.picking_id.purchase_id.order_type == 'in_kind':
9+ order_type = move_line.picking_id and move_line.picking_id.purchase_id and move_line.picking_id.purchase_id.order_type
10+ is_intersection = move_line.picking_id and move_line.picking_id.partner_id and move_line.picking_id.partner_id.partner_type == 'section'
11+ if order_type == 'in_kind' or (order_type in ['donation_exp', 'donation_st'] and is_intersection):
12 order_line = move_line.purchase_line_id or False
13 account_id = (order_line.product_id and order_line.product_id.donation_expense_account and order_line.product_id.donation_expense_account.id) \
14 or (order_line.product_id.categ_id and order_line.product_id.categ_id.donation_expense_account and order_line.product_id.categ_id.donation_expense_account.id) \

Subscribers

People subscribed via source and target branches