Merge lp:~unifield-team/unifield-wm/UF_2056 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 1771
Proposed branch: lp:~unifield-team/unifield-wm/UF_2056
Merge into: lp:unifield-wm
Diff against target: 65 lines (+22/-22)
2 files modified
account_corrections/account_wizard_view.xml (+0/-1)
account_corrections/wizard/journal_items_corrections.py (+22/-21)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/UF_2056
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+185066@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 'account_corrections/account_wizard_view.xml'
2--- account_corrections/account_wizard_view.xml 2013-06-10 09:19:10 +0000
3+++ account_corrections/account_wizard_view.xml 2013-09-11 14:35:26 +0000
4@@ -42,7 +42,6 @@
5 <group colspan="4" col="6">
6 <label string ="" colspan="1"/>
7 <button icon="gtk-cancel" special="cancel" string="Cancel"/>
8- <button icon="gtk-undo" string="Reverse" name="action_reverse" type="object" attrs="{'invisible': [('from_register', '=', True)]}"/>
9 <button icon="gtk-redo" string="Correct" name="action_confirm" type="object"/>
10 </group>
11 <field name="from_register" invisible="1"/>
12
13=== modified file 'account_corrections/wizard/journal_items_corrections.py'
14--- account_corrections/wizard/journal_items_corrections.py 2013-06-10 09:19:10 +0000
15+++ account_corrections/wizard/journal_items_corrections.py 2013-09-11 14:35:26 +0000
16@@ -266,27 +266,28 @@
17 res += 4
18 return res
19
20- def action_reverse(self, cr, uid, ids, context=None):
21- """
22- Do a reverse from the lines attached to this wizard
23- NB: The reverse is done on the first correction journal found (type = 'correction')
24- """
25- # Verifications
26- if not context:
27- context = {}
28- if isinstance(ids, (int, long)):
29- ids = [ids]
30- # Verify that date is superior to line's date
31- for wiz in self.browse(cr, uid, ids, context=context):
32- if wiz.move_line_id and wiz.move_line_id.date:
33- if not wiz.date >= wiz.move_line_id.date:
34- raise osv.except_osv(_('Warning'), _('Please insert a correction date from the entry date onwards.'))
35- # Retrieve values
36- wizard = self.browse(cr, uid, ids[0], context=context)
37- aml_obj = self.pool.get('account.move.line')
38- # Do reverse
39- res, move_ids = aml_obj.reverse_move(cr, uid, [wizard.move_line_id.id], wizard.date, context=context)
40- return {'type': 'ir.actions.act_window_close', 'success_move_line_ids': res}
41+ # UF-2056: Delete reverse button
42+# def action_reverse(self, cr, uid, ids, context=None):
43+# """
44+# Do a reverse from the lines attached to this wizard
45+# NB: The reverse is done on the first correction journal found (type = 'correction')
46+# """
47+# # Verifications
48+# if not context:
49+# context = {}
50+# if isinstance(ids, (int, long)):
51+# ids = [ids]
52+# # Verify that date is superior to line's date
53+# for wiz in self.browse(cr, uid, ids, context=context):
54+# if wiz.move_line_id and wiz.move_line_id.date:
55+# if not wiz.date >= wiz.move_line_id.date:
56+# raise osv.except_osv(_('Warning'), _('Please insert a correction date from the entry date onwards.'))
57+# # Retrieve values
58+# wizard = self.browse(cr, uid, ids[0], context=context)
59+# aml_obj = self.pool.get('account.move.line')
60+# # Do reverse
61+# res, move_ids = aml_obj.reverse_move(cr, uid, [wizard.move_line_id.id], wizard.date, context=context)
62+# return {'type': 'ir.actions.act_window_close', 'success_move_line_ids': res}
63
64 def action_confirm(self, cr, uid, ids, context=None, distrib_id=False):
65 """

Subscribers

People subscribed via source and target branches