Merge lp:~openerp-dev/openobject-addons/7.0-staging-mat into lp:openobject-addons/7.0

Proposed by Martin Trigaux (OpenERP)
Status: Merged
Merged at revision: 9408
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-staging-mat
Merge into: lp:openobject-addons/7.0
Diff against target: 129 lines (+26/-8)
6 files modified
account/project/wizard/account_analytic_chart_view.xml (+5/-5)
account/report/account_financial_report.py (+1/-0)
account/report/account_financial_report.rml (+6/-1)
account/wizard/account_financial_report.py (+3/-2)
account/wizard/account_report_common.py (+1/-0)
project/project.py (+10/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-staging-mat
Reviewer Review Type Date Requested Status
Martin Trigaux (OpenERP) Pending
Review via email: mp+183575@code.launchpad.net
To post a comment you must log in.
9408. By Martin Trigaux (OpenERP)

[MERGE] various changes

account: move button on analytic chart wizard to bottom
account: use button Target Moves in financial report views (bug lp:1078146)
project: set duplicated task in default stage instead of current

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/project/wizard/account_analytic_chart_view.xml'
2--- account/project/wizard/account_analytic_chart_view.xml 2012-11-29 22:26:45 +0000
3+++ account/project/wizard/account_analytic_chart_view.xml 2013-09-03 09:28:13 +0000
4@@ -7,16 +7,16 @@
5 <field name="model">account.analytic.chart</field>
6 <field name="arch" type="xml">
7 <form string="Analytic Account Charts" version="7.0">
8- <header>
9- <button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/>
10- or
11- <button string="Cancel" class="oe_link" special="cancel"/>
12- </header>
13 <group string="Select the Period for Analysis" col="4">
14 <field name="from_date"/>
15 <field name="to_date"/>
16 <label string="(Keep empty to open the current situation)" colspan="4"/>
17 </group>
18+ <footer>
19+ <button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/>
20+ or
21+ <button string="Cancel" class="oe_link" special="cancel"/>
22+ </footer>
23 </form>
24 </field>
25 </record>
26
27=== modified file 'account/report/account_financial_report.py'
28--- account/report/account_financial_report.py 2013-04-19 11:39:43 +0000
29+++ account/report/account_financial_report.py 2013-09-03 09:28:13 +0000
30@@ -38,6 +38,7 @@
31 'get_filter': self._get_filter,
32 'get_start_date':self._get_start_date,
33 'get_end_date':self._get_end_date,
34+ 'get_target_move': self._get_target_move,
35 })
36 self.context = context
37
38
39=== modified file 'account/report/account_financial_report.rml'
40--- account/report/account_financial_report.rml 2013-06-14 21:36:02 +0000
41+++ account/report/account_financial_report.rml 2013-09-03 09:28:13 +0000
42@@ -166,11 +166,12 @@
43 <para style="Standard">
44 <font color="white"> </font>
45 </para>
46- <blockTable colWidths="163.0,163.0,163.0" style="Table2_header">
47+ <blockTable colWidths="122.0,122.0,122.0,122.0" style="Table2_header">
48 <tr>
49 <td><para style="terp_tblheader_General_Centre">Chart of Accounts</para></td>
50 <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
51 <td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filters' and get_filter(data) ]]</para></td>
52+ <td><para style="terp_tblheader_General_Centre">Target Moves</para></td>
53 </tr>
54 <tr>
55 <td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
56@@ -197,6 +198,10 @@
57 </tr>
58 </blockTable>
59 </td>
60+ <td>
61+ <para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para>
62+ </td>
63+
64 </tr>
65 </blockTable>
66 <para style="Standard">
67
68=== modified file 'account/wizard/account_financial_report.py'
69--- account/wizard/account_financial_report.py 2012-12-06 14:56:32 +0000
70+++ account/wizard/account_financial_report.py 2013-09-03 09:28:13 +0000
71@@ -54,7 +54,7 @@
72 'target_move': 'posted',
73 'account_report_id': _get_account_report,
74 }
75-
76+
77 def _build_comparison_context(self, cr, uid, ids, data, context=None):
78 if context is None:
79 context = {}
80@@ -62,6 +62,7 @@
81 result['fiscalyear'] = 'fiscalyear_id_cmp' in data['form'] and data['form']['fiscalyear_id_cmp'] or False
82 result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
83 result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
84+ result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
85 if data['form']['filter_cmp'] == 'filter_date':
86 result['date_from'] = data['form']['date_from_cmp']
87 result['date_to'] = data['form']['date_to_cmp']
88@@ -86,7 +87,7 @@
89 return res
90
91 def _print_report(self, cr, uid, ids, data, context=None):
92- data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter'], context=context)[0])
93+ data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter','target_move'], context=context)[0])
94 return {
95 'type': 'ir.actions.report.xml',
96 'report_name': 'account.financial.report',
97
98=== modified file 'account/wizard/account_report_common.py'
99--- account/wizard/account_report_common.py 2013-07-26 09:21:34 +0000
100+++ account/wizard/account_report_common.py 2013-09-03 09:28:13 +0000
101@@ -154,6 +154,7 @@
102 result['fiscalyear'] = 'fiscalyear_id' in data['form'] and data['form']['fiscalyear_id'] or False
103 result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
104 result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
105+ result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
106 if data['form']['filter'] == 'filter_date':
107 result['date_from'] = data['form']['date_from']
108 result['date_to'] = data['form']['date_to']
109
110=== modified file 'project/project.py'
111--- project/project.py 2013-08-28 14:11:23 +0000
112+++ project/project.py 2013-09-03 09:28:13 +0000
113@@ -736,6 +736,16 @@
114 new_name = _("%s (copy)") % (default.get('name', ''))
115 default.update({'name':new_name})
116 return super(task, self).copy_data(cr, uid, id, default, context)
117+
118+ def copy(self, cr, uid, id, default=None, context=None):
119+ if context is None:
120+ context = {}
121+ if default is None:
122+ default = {}
123+ stage = self._get_default_stage_id(cr, uid, context=context)
124+ if stage:
125+ default['stage_id'] = stage
126+ return super(task, self).copy(cr, uid, id, default, context)
127
128 def _is_template(self, cr, uid, ids, field_name, arg, context=None):
129 res = {}