Merge lp:~unifield-team/unifield-wm/us-518 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 2726
Proposed branch: lp:~unifield-team/unifield-wm/us-518
Merge into: lp:unifield-wm
Diff against target: 22 lines (+12/-0)
1 file modified
register_accounting/account_bank_statement.py (+12/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/us-518
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+283071@code.launchpad.net
To post a comment you must log in.
lp:~unifield-team/unifield-wm/us-518 updated
2705. By Fabien MORIN

US-518 [IMP] display the warning message also for amount_in entries

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'register_accounting/account_bank_statement.py'
2--- register_accounting/account_bank_statement.py 2015-11-19 17:09:19 +0000
3+++ register_accounting/account_bank_statement.py 2016-01-22 11:40:01 +0000
4@@ -2162,6 +2162,18 @@
5 account_move_line.write(cr, uid, account_move_line_ids, {'state': 'draft'}, context=context, check=True, update_check=True)
6
7 if postype == "hard":
8+ if absl.imported_invoice_line_ids:
9+ # US-518/1.2
10+ imported_total_amount = 0
11+
12+ for inv_move_line in absl.imported_invoice_line_ids:
13+ imported_total_amount += inv_move_line.amount_currency
14+ if absl.amount_out > abs(imported_total_amount) or\
15+ absl.amount_in > abs(imported_total_amount):
16+ raise osv.except_osv(_('Warning'),
17+ _('You can not hard post with an amount greater'
18+ ' than total of imported invoices'))
19+
20 # Update analytic lines
21 if absl.account_id.is_analytic_addicted:
22 self.update_analytic_lines(cr, uid, absl)

Subscribers

People subscribed via source and target branches