Merge lp:~therp-nl/banking-addons/6.1-match_multiple_invoices_split into lp:banking-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 172
Proposed branch: lp:~therp-nl/banking-addons/6.1-match_multiple_invoices_split
Merge into: lp:banking-addons/6.1
Diff against target: 558 lines (+265/-90)
7 files modified
account_banking/__openerp__.py (+3/-0)
account_banking/account_banking_view.xml (+8/-2)
account_banking/banking_import_transaction.py (+73/-3)
account_banking/i18n/nl.po (+6/-6)
account_banking/static/src/js/account_banking.js (+51/-0)
account_banking/wizard/banking_transaction_wizard.py (+113/-57)
account_banking/wizard/banking_transaction_wizard.xml (+11/-22)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/6.1-match_multiple_invoices_split
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Approve
Stefan Rijnhart (Opener) testing, code review Approve
Review via email: mp+159348@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Unholding because what was claimed to be a problem is a works as designed: Invoices obviously only get paid after you confirm a match, that also applies to split matches.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) :
review: Approve (testing, code review)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve
170. By Stefan Rijnhart (Opener)

[FIX] Calculation of residual in the case of split transactions
[FIX] Transaction amount when credit amounts are split
[FIX] Restore bank account's partner when disabling match

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_banking/__openerp__.py'
--- account_banking/__openerp__.py 2012-05-07 11:49:08 +0000
+++ account_banking/__openerp__.py 2013-06-03 09:55:43 +0000
@@ -47,6 +47,9 @@
47 'wizard/banking_transaction_wizard.xml',47 'wizard/banking_transaction_wizard.xml',
48 'workflow/account_invoice.xml',48 'workflow/account_invoice.xml',
49 ],49 ],
50 'js': [
51 'static/src/js/account_banking.js',
52 ],
50 'demo_xml': [],53 'demo_xml': [],
51 'external_dependencies': {54 'external_dependencies': {
52 'python' : ['BeautifulSoup'],55 'python' : ['BeautifulSoup'],
5356
=== modified file 'account_banking/account_banking_view.xml'
--- account_banking/account_banking_view.xml 2013-04-25 08:15:21 +0000
+++ account_banking/account_banking_view.xml 2013-06-03 09:55:43 +0000
@@ -292,9 +292,12 @@
292 <xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='amount']" position="after">292 <xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='amount']" position="after">
293 <field name="match_type"/>293 <field name="match_type"/>
294 <field name="residual"/>294 <field name="residual"/>
295 <button name="match_wizard" states="draft"295 <field name="parent_id" invisible="1" />
296 <button name="match_wizard"
296 string="Match"297 string="Match"
297 icon="terp-gtk-jump-to-ltr"298 icon="terp-gtk-jump-to-ltr"
299 attrs="{'invisible': ['|', ('parent_id', '!=', False),
300 ('state', '!=', 'draft')]}"
298 type="object"/>301 type="object"/>
299 <field name="match_multi" invisible="1"/>302 <field name="match_multi" invisible="1"/>
300 <field name="duplicate" invisible="1"/>303 <field name="duplicate" invisible="1"/>
@@ -523,9 +526,12 @@
523 <field name="amount"/>526 <field name="amount"/>
524 <field name="match_type"/>527 <field name="match_type"/>
525 <field name="residual"/>528 <field name="residual"/>
526 <button name="match_wizard" states="draft"529 <field name="parent_id" invisible="1" />
530 <button name="match_wizard"
527 string="Match"531 string="Match"
528 icon="terp-gtk-jump-to-ltr"532 icon="terp-gtk-jump-to-ltr"
533 attrs="{'invisible': ['|', ('parent_id', '!=', False),
534 ('state', '!=', 'draft')]}"
529 type="object"/>535 type="object"/>
530 <field name="match_multi" invisible="1"/>536 <field name="match_multi" invisible="1"/>
531 <field name="duplicate" invisible="1"/>537 <field name="duplicate" invisible="1"/>
532538
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py 2013-05-20 08:07:48 +0000
+++ account_banking/banking_import_transaction.py 2013-06-03 09:55:43 +0000
@@ -1485,7 +1485,7 @@
1485 not(transaction.move_currency_amount is False)):1485 not(transaction.move_currency_amount is False)):
1486 res[transaction.id] = (1486 res[transaction.id] = (
1487 transaction.move_currency_amount -1487 transaction.move_currency_amount -
1488 transaction.transferred_amount1488 transaction.statement_line_id.amount
1489 )1489 )
1490 return res1490 return res
1491 1491
@@ -1572,6 +1572,22 @@
15721572
1573 return res1573 return res
15741574
1575 def unlink(self, cr, uid, ids, context=None):
1576 """
1577 Unsplit if this if a split transaction
1578 """
1579 for this in self.browse(cr, uid, ids, context):
1580 if this.parent_id:
1581 this.parent_id.write(
1582 {'transferred_amount':
1583 this.parent_id.transferred_amount + \
1584 this.transferred_amount,
1585 })
1586 this.parent_id.refresh()
1587 return super(banking_import_transaction, self).unlink(
1588 cr, uid, ids, context=context)
1589
1590
1575 column_map = {1591 column_map = {
1576 # used in bank_import.py, converting non-osv transactions1592 # used in bank_import.py, converting non-osv transactions
1577 'statement_id': 'statement',1593 'statement_id': 'statement',
@@ -1623,7 +1639,7 @@
1623 'duplicate': fields.boolean('duplicate'),1639 'duplicate': fields.boolean('duplicate'),
1624 'statement_line_id': fields.many2one(1640 'statement_line_id': fields.many2one(
1625 'account.bank.statement.line', 'Statement line',1641 'account.bank.statement.line', 'Statement line',
1626 ondelete='CASCADE'),1642 ondelete='cascade'),
1627 'statement_id': fields.many2one(1643 'statement_id': fields.many2one(
1628 'account.bank.statement', 'Statement'),1644 'account.bank.statement', 'Statement'),
1629 'parent_id': fields.many2one(1645 'parent_id': fields.many2one(
@@ -1694,7 +1710,7 @@
1694 _columns = {1710 _columns = {
1695 'import_transaction_id': fields.many2one(1711 'import_transaction_id': fields.many2one(
1696 'banking.import.transaction', 1712 'banking.import.transaction',
1697 'Import transaction', readonly=True, delete='cascade'),1713 'Import transaction', readonly=True, ondelete='cascade'),
1698 'match_multi': fields.related(1714 'match_multi': fields.related(
1699 'import_transaction_id', 'match_multi', type='boolean',1715 'import_transaction_id', 'match_multi', type='boolean',
1700 string='Multi match', readonly=True),1716 string='Multi match', readonly=True),
@@ -1715,6 +1731,8 @@
1715 'state': fields.selection(1731 'state': fields.selection(
1716 [('draft', 'Draft'), ('confirmed', 'Confirmed')], 'State',1732 [('draft', 'Draft'), ('confirmed', 'Confirmed')], 'State',
1717 readonly=True, required=True),1733 readonly=True, required=True),
1734 'parent_id': fields.many2one('account.bank.statement.line',
1735 'Parent'),
1718 }1736 }
17191737
1720 _defaults = {1738 _defaults = {
@@ -1857,6 +1875,8 @@
1857 def unlink(self, cr, uid, ids, context=None):1875 def unlink(self, cr, uid, ids, context=None):
1858 """1876 """
1859 Don't allow deletion of a confirmed statement line1877 Don't allow deletion of a confirmed statement line
1878 If this statement line comes from a split transaction, give the
1879 amount back
1860 """1880 """
1861 if type(ids) is int:1881 if type(ids) is int:
1862 ids = [ids]1882 ids = [ids]
@@ -1866,6 +1886,12 @@
1866 _('Confirmed Statement Line'),1886 _('Confirmed Statement Line'),
1867 _("You cannot delete a confirmed Statement Line"1887 _("You cannot delete a confirmed Statement Line"
1868 ": '%s'" % line.name))1888 ": '%s'" % line.name))
1889 if line.parent_id:
1890 line.parent_id.write(
1891 {
1892 'amount': line.parent_id.amount + line.amount,
1893 })
1894 line.parent_id.refresh()
1869 return super(account_bank_statement_line, self).unlink(1895 return super(account_bank_statement_line, self).unlink(
1870 cr, uid, ids, context=context)1896 cr, uid, ids, context=context)
18711897
@@ -1905,6 +1931,50 @@
1905 'import_transaction_id': res},1931 'import_transaction_id': res},
1906 context=context)1932 context=context)
19071933
1934 def split_off(self, cr, uid, ids, amount, context=None):
1935 """
1936 Create a child statement line with amount, deduce that from this line,
1937 change transactions accordingly
1938 """
1939 if context is None:
1940 context = {}
1941
1942 transaction_pool = self.pool.get('banking.import.transaction')
1943
1944 child_statement_ids = []
1945 for this in self.browse(cr, uid, ids, context):
1946 transaction_data = transaction_pool.copy_data(
1947 cr, uid, this.import_transaction_id.id)
1948 transaction_data['transferred_amount'] = amount
1949 transaction_data['message'] = (
1950 (transaction_data['message'] or '') + _(' (split)'))
1951 transaction_data['parent_id'] = this.import_transaction_id.id
1952 transaction_id = transaction_pool.create(
1953 cr,
1954 uid,
1955 transaction_data,
1956 context=dict(
1957 context, transaction_no_duplicate_search=True))
1958
1959 statement_line_data = self.copy_data(
1960 cr, uid, this.id)
1961 statement_line_data['amount'] = amount
1962 statement_line_data['name'] = (
1963 (statement_line_data['name'] or '') + _(' (split)'))
1964 statement_line_data['import_transaction_id'] = transaction_id
1965 statement_line_data['parent_id'] = this.id
1966 statement_line_id = self.create(
1967 cr, uid, statement_line_data, context=context)
1968
1969 child_statement_ids.append(statement_line_id)
1970 transaction_pool.write(
1971 cr, uid, transaction_id, {
1972 'statement_line_id': statement_line_id,
1973 }, context=context)
1974 this.write({'amount': this.amount - amount})
1975
1976 return child_statement_ids
1977
1908account_bank_statement_line()1978account_bank_statement_line()
19091979
1910class account_bank_statement(osv.osv):1980class account_bank_statement(osv.osv):
19111981
=== modified file 'account_banking/i18n/nl.po'
--- account_banking/i18n/nl.po 2012-05-02 15:09:49 +0000
+++ account_banking/i18n/nl.po 2013-06-03 09:55:43 +0000
@@ -139,9 +139,9 @@
139msgstr "remote_bank_bic"139msgstr "remote_bank_bic"
140140
141#. module: account_banking141#. module: account_banking
142#: field:banking.transaction.wizard,manual_invoice_id:0142#: field:banking.transaction.wizard,manual_invoice_ids:0
143msgid "Match this invoice"143msgid "Match one or more invoices"
144msgstr "Match deze factuur"144msgstr "Match een of meerdere facturen"
145145
146#. module: account_banking146#. module: account_banking
147#: field:banking.import.transaction,remote_bank_ibei:0147#: field:banking.import.transaction,remote_bank_ibei:0
@@ -1022,9 +1022,9 @@
1022msgstr "Herzien"1022msgstr "Herzien"
10231023
1024#. module: account_banking1024#. module: account_banking
1025#: field:banking.transaction.wizard,manual_move_line_id:01025#: field:banking.transaction.wizard,manual_move_line_ids:0
1026msgid "Or match this entry"1026msgid "Or match one or more entries"
1027msgstr "Of koppel deze boekingsregel"1027msgstr "Of koppel deze boekingsregel(s)"
10281028
1029#. module: account_banking1029#. module: account_banking
1030#: help:payment.mode.type,name:01030#: help:payment.mode.type,name:0
10311031
=== added directory 'account_banking/static'
=== added directory 'account_banking/static/src'
=== added directory 'account_banking/static/src/js'
=== added file 'account_banking/static/src/js/account_banking.js'
--- account_banking/static/src/js/account_banking.js 1970-01-01 00:00:00 +0000
+++ account_banking/static/src/js/account_banking.js 2013-06-03 09:55:43 +0000
@@ -0,0 +1,51 @@
1/*############################################################################
2#
3# Copyright (C) 2013 Therp BV (<http://therp.nl>).
4#
5# All other contributions are (C) by their respective contributors
6#
7# All Rights Reserved
8#
9# WARNING: This program as such is intended to be used by professional
10# programmers who take the whole responsability of assessing all potential
11# consequences resulting from its eventual inadequacies and bugs
12# End users who are looking for a ready-to-use solution with commercial
13# garantees and support are strongly adviced to contract EduSense BV
14#
15# This program is free software: you can redistribute it and/or modify
16# it under the terms of the GNU General Public License as published by
17# the Free Software Foundation, either version 3 of the License, or
18# (at your option) any later version.
19#
20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with this program. If not, see <http://www.gnu.org/licenses/>.
27#
28############################################################################*/
29
30openerp.account_banking = function(openerp)
31{
32 var _t = openerp.web._t;
33 openerp.web.Dialog.include(
34 {
35 on_close: function()
36 {
37 this._super.apply(this, arguments);
38 if(this.dialog_title == _t("Match transaction"))
39 {
40 if(this.widget_parent.widget_children[0].views.form.controller)
41 {
42 this.widget_parent.widget_children[0].views.form.controller.reload();
43 }
44 if(this.widget_parent.widget_children[0].views.page.controller)
45 {
46 this.widget_parent.widget_children[0].views.page.controller.reload();
47 }
48 }
49 },
50 });
51}
052
=== modified file 'account_banking/wizard/banking_transaction_wizard.py'
--- account_banking/wizard/banking_transaction_wizard.py 2012-12-01 18:31:34 +0000
+++ account_banking/wizard/banking_transaction_wizard.py 2013-06-03 09:55:43 +0000
@@ -94,8 +94,8 @@
94 # The following fields get never written94 # The following fields get never written
95 # they are just triggers for manual matching95 # they are just triggers for manual matching
96 # which populates regular fields on the transaction96 # which populates regular fields on the transaction
97 manual_invoice_id = vals.pop('manual_invoice_id', False)97 manual_invoice_ids = vals.pop('manual_invoice_ids', [])
98 manual_move_line_id = vals.pop('manual_move_line_id', False)98 manual_move_line_ids = vals.pop('manual_move_line_ids', [])
9999
100 # Support for writing fields.related is still flakey:100 # Support for writing fields.related is still flakey:
101 # https://bugs.launchpad.net/openobject-server/+bug/915975101 # https://bugs.launchpad.net/openobject-server/+bug/915975
@@ -167,55 +167,93 @@
167 _("No entry found for the selected invoice. " +167 _("No entry found for the selected invoice. " +
168 "Try manual reconciliation."))168 "Try manual reconciliation."))
169169
170 if manual_move_line_id or manual_invoice_id:170 if manual_move_line_ids or manual_invoice_ids:
171 move_line_obj = self.pool.get('account.move.line')171 move_line_obj = self.pool.get('account.move.line')
172 invoice_obj = self.pool.get('account.invoice')172 invoice_obj = self.pool.get('account.invoice')
173 statement_line_obj = self.pool.get('account.bank.statement.line')173 statement_line_obj = self.pool.get('account.bank.statement.line')
174 for wiz in self.browse(174 manual_invoice_ids = (
175 cr, uid, ids, context=context):175 [i[1] for i in manual_invoice_ids if i[0]==4] +
176 move_line_id = False176 [j for i in manual_invoice_ids if i[0]==6 for j in i[2]])
177 invoice_id = manual_invoice_id177 manual_move_line_ids = (
178 if invoice_id:178 [i[1] for i in manual_move_line_ids if i[0]==4] +
179 invoice = invoice_obj.browse(179 [j for i in manual_move_line_ids if i[0]==6 for j in i[2]])
180 cr, uid, manual_invoice_id, context=context)180 for wiz in self.browse(cr, uid, ids, context=context):
181 #write can be called multiple times for the same values
182 #that doesn't hurt above, but it does here
183 if wiz.match_type and (
184 len(manual_move_line_ids) > 1 or
185 len(manual_invoice_ids) > 1):
186 continue
187
188 todo = []
189
190 for invoice in invoice_obj.browse(
191 cr, uid, manual_invoice_ids, context=context):
192 found_move_line = False
181 if invoice.move_id:193 if invoice.move_id:
182 for line in invoice.move_id.line_id:194 for line in invoice.move_id.line_id:
183 if line.account_id.type in ('receivable', 'payable'):195 if line.account_id.type in ('receivable', 'payable'):
184 move_line_id = line.id196 todo.append((invoice.id, line.id))
197 found_move_line = True
185 break198 break
186 if not move_line_id:199 if not found_move_line:
187 osv.except_osv(200 raise osv.except_osv(
188 _("Cannot select for reconcilion"),201 _("Cannot select for reconcilion"),
189 _("No entry found for the selected invoice. "))202 _("No entry found for the selected invoice. "))
190 else:203 for move_line_id in manual_move_line_ids:
191 move_line_id = manual_move_line_id204 todo_entry = [False, move_line_id]
192 move_line = move_line_obj.read(205 move_line=move_line_obj.read(
193 cr, uid, move_line_id, ['invoice'], context=context)206 cr,
194 invoice_id = (move_line['invoice'] and207 uid,
195 move_line['invoice'][0])208 move_line_id,
196 vals = {209 ['invoice'],
197 'move_line_id': move_line_id,210 context=context)
198 'move_line_ids': [(6, 0, [move_line_id])],211 if move_line['invoice']:
199 'invoice_id': invoice_id,212 todo_entry[0] = move_line['invoice'][0]
200 'invoice_ids': [(6, 0, invoice_id and213 todo.append(todo_entry)
201 [invoice_id] or [])],214
202 'match_type': 'manual',215 while todo:
203 }216 todo_entry = todo.pop()
204 transaction_obj.clear_and_write(217 move_line = move_line_obj.browse(
205 cr, uid, wiz.import_transaction_id.id,218 cr, uid, todo_entry[1], context)
206 vals, context=context)219 transaction_id = wiz.import_transaction_id.id
207 st_line_vals = {220 statement_line_id = wiz.statement_line_id.id
208 'account_id': move_line_obj.read(221
209 cr, uid, move_line_id, 222 if len(todo) > 0:
210 ['account_id'], context=context)['account_id'][0],223 statement_line_id = wiz.statement_line_id.split_off(
211 }224 move_line.debit or -move_line.credit)[0]
212 if invoice_id:225 transaction_id = statement_line_obj.browse(
213 st_line_vals['partner_id'] = invoice_obj.read(226 cr,
214 cr, uid, invoice_id, 227 uid,
215 ['partner_id'], context=context)['partner_id'][0]228 statement_line_id,
216 statement_line_obj.write(229 context=context).import_transaction_id.id
217 cr, uid, wiz.import_transaction_id.statement_line_id.id,230
218 st_line_vals, context=context)231 vals = {
232 'move_line_id': todo_entry[1],
233 'move_line_ids': [(6, 0, [todo_entry[1]])],
234 'invoice_id': todo_entry[0],
235 'invoice_ids': [(6, 0,
236 [todo_entry[0]] if todo_entry[0] else [])],
237 'match_type': 'manual',
238 }
239
240 transaction_obj.clear_and_write(
241 cr, uid, transaction_id, vals, context=context)
242
243 st_line_vals = {
244 'account_id': move_line_obj.read(
245 cr, uid, todo_entry[1],
246 ['account_id'], context=context)['account_id'][0],
247 }
248
249 if todo_entry[0]:
250 st_line_vals['partner_id'] = invoice_obj.read(
251 cr, uid, todo_entry[0],
252 ['partner_id'], context=context)['partner_id'][0]
253
254 statement_line_obj.write(
255 cr, uid, statement_line_id,
256 st_line_vals, context=context)
219 return res257 return res
220258
221 def trigger_write(self, cr, uid, ids, context=None):259 def trigger_write(self, cr, uid, ids, context=None):
@@ -247,14 +285,26 @@
247 account_id = setting.default_debit_account_id and setting.default_debit_account_id.id285 account_id = setting.default_debit_account_id and setting.default_debit_account_id.id
248 statement_pool.write(cr, uid, wiz.statement_line_id.id, {'account_id':account_id})286 statement_pool.write(cr, uid, wiz.statement_line_id.id, {'account_id':account_id})
249 287
250 self.write(cr, uid, wiz.id, {'partner_id': False}, context=context)288 # Restore partner id from the bank account or else reset
251 289 partner_id = False
252 wizs = self.read(290 if (wiz.statement_line_id.partner_bank_id and
253 cr, uid, ids, ['import_transaction_id'], context=context)291 wiz.statement_line_id.partner_bank_id.partner_id):
254 trans_ids = [x['import_transaction_id'][0] for x in wizs292 partner_id = wiz.statement_line_id.partner_bank_id.partner_id.id
255 if x['import_transaction_id']]293 wiz.write({'partner_id': partner_id})
256 self.pool.get('banking.import.transaction').clear_and_write(294
257 cr, uid, trans_ids, context=context)295 if wiz.statement_line_id:
296 #delete splits causing an unsplit if this is a split
297 #transaction
298 statement_pool.unlink(cr, uid,
299 statement_pool.search(cr, uid,
300 [('parent_id', '=', wiz.statement_line_id.id)],
301 context=context),
302 context=context)
303
304 if wiz.import_transaction_id:
305 wiz.import_transaction_id.clear_and_write()
306
307
258 return True308 return True
259309
260 def reverse_duplicate(self, cr, uid, ids, context=None):310 def reverse_duplicate(self, cr, uid, ids, context=None):
@@ -281,7 +331,7 @@
281 return res331 return res
282332
283 def button_done(self, cr, uid, ids, context=None):333 def button_done(self, cr, uid, ids, context=None):
284 return {'nodestroy': False, 'type': 'ir.actions.act_window_close'} 334 return {'type': 'ir.actions.act_window_close'}
285335
286 _defaults = {336 _defaults = {
287# 'match_type': _get_default_match_type,337# 'match_type': _get_default_match_type,
@@ -305,6 +355,9 @@
305 'statement_line_id', 'partner_id',355 'statement_line_id', 'partner_id',
306 type='many2one', relation='res.partner',356 type='many2one', relation='res.partner',
307 string="Partner", readonly=True),357 string="Partner", readonly=True),
358 'statement_line_parent_id': fields.related(
359 'statement_line_id', 'parent_id', type='many2one',
360 relation='account.bank.statement.line', readonly=True),
308 'import_transaction_id': fields.related(361 'import_transaction_id': fields.related(
309 'statement_line_id', 'import_transaction_id', 362 'statement_line_id', 'import_transaction_id',
310 string="Import transaction",363 string="Import transaction",
@@ -350,14 +403,17 @@
350 'match_type': fields.related(403 'match_type': fields.related(
351 'import_transaction_id', 'match_type', 404 'import_transaction_id', 'match_type',
352 type="char", size=16, string='Match type', readonly=True),405 type="char", size=16, string='Match type', readonly=True),
353 'manual_invoice_id': fields.many2one(406 'manual_invoice_ids': fields.many2many(
354 'account.invoice', 'Match this invoice',407 'account.invoice',
408 'banking_transaction_wizard_account_invoice_rel',
409 'wizard_id', 'invoice_id', string='Match one or more invoices',
355 domain=[('reconciled', '=', False)]),410 domain=[('reconciled', '=', False)]),
356 'manual_move_line_id': fields.many2one(411 'manual_move_line_ids': fields.many2many(
357 'account.move.line', 'Or match this entry',412 'account.move.line',
413 'banking_transaction_wizard_account_move_line_rel',
414 'wizard_id', 'move_line_id', string='Or match one or more entries',
358 domain=[('account_id.reconcile', '=', True),415 domain=[('account_id.reconcile', '=', True),
359 ('reconcile_id', '=', False)],416 ('reconcile_id', '=', False)]),
360 ),
361 'payment_option': fields.related('import_transaction_id','payment_option', string='Payment Difference', type='selection', required=True,417 'payment_option': fields.related('import_transaction_id','payment_option', string='Payment Difference', type='selection', required=True,
362 selection=[('without_writeoff', 'Keep Open'),('with_writeoff', 'Reconcile Payment Balance')]),418 selection=[('without_writeoff', 'Keep Open'),('with_writeoff', 'Reconcile Payment Balance')]),
363 'writeoff_analytic_id': fields.related(419 'writeoff_analytic_id': fields.related(
364420
=== modified file 'account_banking/wizard/banking_transaction_wizard.xml'
--- account_banking/wizard/banking_transaction_wizard.xml 2013-01-13 14:11:44 +0000
+++ account_banking/wizard/banking_transaction_wizard.xml 2013-06-03 09:55:43 +0000
@@ -9,6 +9,7 @@
9 <form string="Match transaction">9 <form string="Match transaction">
10 <!-- fields used for form logic -->10 <!-- fields used for form logic -->
11 <field name="payment_order_ids" invisible="True"/>11 <field name="payment_order_ids" invisible="True"/>
12 <field name="statement_line_parent_id" invisible="True"/>
12 <field name="invoice_ids" invisible="True"/>13 <field name="invoice_ids" invisible="True"/>
13 <field name="move_line_ids" invisible="True"/>14 <field name="move_line_ids" invisible="True"/>
14 <field name="match_multi" invisible="True"/>15 <field name="match_multi" invisible="True"/>
@@ -89,30 +90,18 @@
89 name="trigger_match"90 name="trigger_match"
90 type="object"91 type="object"
91 string="Match again"/>92 string="Match again"/>
92 <!-- Manual selection -->
93 </page>93 </page>
94 <!-- Manual selection -->
94 <page string="Manual match">95 <page string="Manual match">
95 <field name="manual_invoice_id"/>96 <field name="manual_invoice_ids" colspan="4"
96 <!-- 97 context="{'search_default_partner_id': partner_id}"
97 Specify alternative tree_view_ref as a98 />
98 workaround for lp:1073521 in OpenERP 6.199 <field name="manual_move_line_ids" colspan="4"
99 Need to also define 'view_mode' to prevent100 context="{'search_default_partner_id': partner_id}"
100 an instant editable tree view101 />
101 reconstruction by account.move.line's102 <button name="trigger_write"
102 fields_view_get().
103 Both are not needed in OpenERP 6.0 or 7.0.
104 -->
105 <field name="manual_move_line_id"
106 context="{
107 'tree_view_ref': 'account.view_move_line_tax_tree',
108 'view_mode': 'yes'
109 }"
110 />
111 <newline/>
112 <button colspan="1"
113 name="trigger_write"
114 type="object"103 type="object"
115 string="Match"/>104 string="Match" />
116 </page>105 </page>
117 <page string="Write-Off" attrs="{'invisible': [('match_type', '=', False)]}">106 <page string="Write-Off" attrs="{'invisible': [('match_type', '=', False)]}">
118 <group colspan="2" col="2">107 <group colspan="2" col="2">
@@ -139,7 +128,7 @@
139 </notebook>128 </notebook>
140 <group colspan="2">129 <group colspan="2">
141 <separator/>130 <separator/>
142 <button icon="gtk-ok" string="Done" special="cancel"/>131 <button icon="gtk-ok" string="Close" special="cancel"/>
143 </group>132 </group>
144 </group>133 </group>
145 </form>134 </form>

Subscribers

People subscribed via source and target branches