Merge lp:~stephane-codazzi/unifield-wm/us_101 into lp:unifield-wm

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~stephane-codazzi/unifield-wm/us_101
Merge into: lp:unifield-wm
Diff against target: 48 lines (+10/-6)
2 files modified
account_period_closing_level/account_period.py (+9/-5)
account_period_closing_level/account_period_closing_level_view.xml (+1/-1)
To merge this branch: bzr merge lp:~stephane-codazzi/unifield-wm/us_101
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+258456@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

2485. By Stephane Codazzi <email address hidden>

Fix bad call

2484. By Stephane Codazzi <email address hidden>

Add button action_close_field_reopen for replace the first button action close field

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_period_closing_level/account_period.py'
2--- account_period_closing_level/account_period.py 2015-03-05 08:25:30 +0000
3+++ account_period_closing_level/account_period.py 2015-05-07 07:17:11 +0000
4@@ -29,15 +29,16 @@
5 _name = "account.period"
6 _inherit = "account.period"
7
8- # To avoid issues with existing OpenERP code (account move line for example),
9+ # To avoid issues with existing OpenERP code (account move line for example)
10 # the state are:
11 # - 'created' for Draft
12 # - 'draft' for Open
13 # - 'done' for HQ-Closed
14- # 1 = state created as 'Draft' ('created') at HQ (update to state handled in create)
15- # 2 = state moves from 'Open' ('draft') -> any close at HQ (sync down)
16- # 3 =
17- # 3 = state reopened at HQ -> reopen at all levels
18+ # 1 = state created as 'Draft' ('created') at HQ (update to state handled
19+ # in create)
20+ # 2 = state moves from 'Open' ('draft') -> any close at HQ (sync down)
21+ # 3 =
22+ # 3 = state reopened at HQ -> reopen at all levels
23
24 def check_unposted_entries(self, cr, uid, period_id, context=None):
25 """
26@@ -328,6 +329,9 @@
27 context['state'] = 'draft'
28 return self.action_set_state(cr, uid, ids, context)
29
30+ def action_close_field_reopen(self, cr, uid, ids, context=None):
31+ return self.action_close_field(cr, uid, ids, context=context)
32+
33 def action_close_field(self, cr, uid, ids, context=None):
34 if context is None:
35 context = {}
36
37=== modified file 'account_period_closing_level/account_period_closing_level_view.xml'
38--- account_period_closing_level/account_period_closing_level_view.xml 2014-04-11 12:01:28 +0000
39+++ account_period_closing_level/account_period_closing_level_view.xml 2015-05-07 07:17:11 +0000
40@@ -49,7 +49,7 @@
41 <button name="action_close_mission" confirm="Are you sure you want to close this period?" string="Close period (Mission)" type="object" icon="gtk-go-forward" colspan="1"/>
42 </group>
43 <group colspan="4" col="2" attrs="{'invisible': [('state', '!=', 'mission-closed')]}">
44- <button name="action_close_field" confirm="Are you sure you want to re-open this period?" string="Re-open period (Mission)" type="object" icon="gtk-go-back" colspan="1"/>
45+ <button name="action_close_field_reopen" confirm="Are you sure you want to re-open this period?" string="Re-open period (Mission)" type="object" icon="gtk-go-back" colspan="1"/>
46 <button name="action_close_hq" confirm="Are you sure you want to close this period?" string="Close period (HQ)" type="object" icon="gtk-go-forward" colspan="1"/>
47 </group>
48 <newline/>

Subscribers

People subscribed via source and target branches