Merge lp:~unifield-team/unifield-wm/UTP-303 into lp:unifield-wm

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~unifield-team/unifield-wm/UTP-303
Merge into: lp:unifield-wm
Diff against target: 46 lines (+11/-0)
2 files modified
financing_contract/report/project_expenses_xls.mako (+6/-0)
register_accounting/account_bank_statement.py (+5/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/UTP-303
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+221691@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

2169. By Sean Carroll <sean@sean-msf>

UTP-303: [IMP] added message for duplicate cheque

2168. By Sean Carroll <sean@sean-msf>

UTP-303: [IMP] added message for duplicate cheque

2167. By Sean Carroll <sean@sean-msf>

UTP-303:[IMP] blank cheque number when duplicated

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'financing_contract/report/project_expenses_xls.mako'
2--- financing_contract/report/project_expenses_xls.mako 2014-04-10 07:41:02 +0000
3+++ financing_contract/report/project_expenses_xls.mako 2014-06-02 09:35:33 +0000
4@@ -455,6 +455,9 @@
5 <Data ss:Type="String">${_('Financing contract line description')}</Data>
6 </Cell>
7 <Cell ss:StyleID="s31">
8+<Data ss:Type="String">${_('Third Party')}</Data>
9+</Cell>
10+<Cell ss:StyleID="s31">
11 <Data ss:Type="String">${_('General Account')}</Data>
12 </Cell>
13 <Cell ss:StyleID="s31">
14@@ -507,6 +510,9 @@
15 <Data ss:Type="String">${( line[2] or '')|x}</Data>
16 </Cell>
17 <Cell ss:StyleID="s36">
18+<Data ss:Type="String">${( line[0] and line[0].partner_txt or '')|x}</Data>
19+</Cell>
20+<Cell ss:StyleID="s36">
21 <Data ss:Type="String">${( getAccountName(line[0]) or '')|x}</Data>
22 </Cell>
23 <Cell ss:StyleID="s36">
24
25=== modified file 'register_accounting/account_bank_statement.py'
26--- register_accounting/account_bank_statement.py 2014-05-14 12:59:36 +0000
27+++ register_accounting/account_bank_statement.py 2014-06-02 09:35:33 +0000
28@@ -1770,6 +1770,10 @@
29 distrib_id = values.get('analytic_distribution_id')
30 if not distrib_id:
31 values = self._update_employee_analytic_distribution(cr, uid, values=values)
32+ if 'cheque_number' in values:
33+ cr.execute('''select id from account_bank_statement_line where cheque_number = '%s' ''' % (values['cheque_number']))
34+ for row in cr.dictfetchall():
35+ raise osv.except_osv(_('Info'),_('This cheque number has already been used'))
36 # Then create a new bank statement line
37 absl = super(account_bank_statement_line, self).create(cr, uid, values, context=context)
38 return absl
39@@ -2335,6 +2339,7 @@
40
41 default_vals = ({
42 'name': '(copy) ' + line.name,
43+ 'cheque_number': '',
44 })
45 self.copy(cr, uid, line.id, default_vals, context=context)
46 return True

Subscribers

People subscribed via source and target branches