Merge lp:~openerp-dev/openobject-addons/trunk-improve-visibility-contract-analytic-bth into lp:openobject-addons

Proposed by Bhumi Thakkar (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-improve-visibility-contract-analytic-bth
Merge into: lp:openobject-addons
Diff against target: 227 lines (+38/-16)
13 files modified
account/account_analytic_line.py (+2/-1)
account/project/project_view.xml (+8/-3)
account/report/account_analytic_entries_report.py (+2/-2)
account/report/account_analytic_entries_report_view.xml (+2/-2)
account_analytic_analysis/account_analytic_analysis_view.xml (+15/-0)
hr_expense/hr_expense.py (+2/-0)
hr_expense/hr_expense_view.xml (+2/-2)
hr_expense/hr_expense_workflow.xml (+0/-1)
hr_timesheet_invoice/report/hr_timesheet_invoice_report.py (+1/-1)
hr_timesheet_sheet/report/hr_timesheet_report.py (+1/-1)
hr_timesheet_sheet/report/hr_timesheet_report_view.xml (+1/-1)
hr_timesheet_sheet/report/timesheet_report.py (+1/-1)
hr_timesheet_sheet/report/timesheet_report_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-improve-visibility-contract-analytic-bth
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+165965@code.launchpad.net

Description of the change

Hello,

   Improved analytic account:

=> Add button 'Time & Materials to Invoice' in contract form with groupby of analytic account.
=> Add filter on Partner in Accounting => Analytic Journal items
=> Costs&Revenues: Rename General Account column to Financial Account in listview.
=> If user is an accountant then user can generate accounting entries in hr expense.
=> In expense if no any expense line and try to submit manager then raise warning could not submit to manager without expense line.

Thanks.

To post a comment you must log in.
8710. By Bhumi Thakkar (Open ERP)

[IMP]can not to cannot in warning.

8711. By Bhumi Thakkar (Open ERP)

[IMP]Customer to Partner.

8712. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8713. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8714. By Bhumi Thakkar (Open ERP)

[REN]Rename account to analytic account in search view of reporting.

8715. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8716. By Bhumi Thakkar (Open ERP)

[REN]rename from account to analytic account in field name.

8717. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8718. By Bhumi Thakkar (Open ERP)

[IMP]Improved warning message.

8719. By Bhumi Thakkar (Open ERP)

[IMP]Search by product.

8720. By Amit Bhavsar (Open ERP)

[MERGE] merge with latest trunk

8721. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp;openobject-addons.

8722. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8723. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8724. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8725. By Bhumi Thakkar (Open ERP)

[MERGE]Merge trunk.

8726. By Bhumi Thakkar (Open ERP)

[IMP]Add partner field in list view and added domain for child of partner.

8727. By Bhumi Thakkar (Open ERP)

[MERGE]Merge trunk.

8728. By Chirag Dodiya(OpenERP)

[IMP] Improved search view such as when we search on parent analytic account will show child records

8729. By Chirag Dodiya(OpenERP)

[MERGE] Merge lp:openobject-addons

8730. By Bhumi Thakkar (Open ERP)

[IMP]Add partner_id into form.

8731. By Bhumi Thakkar (Open ERP)

[MERGE]Merge trunk.

Unmerged revisions

8731. By Bhumi Thakkar (Open ERP)

[MERGE]Merge trunk.

8730. By Bhumi Thakkar (Open ERP)

[IMP]Add partner_id into form.

8729. By Chirag Dodiya(OpenERP)

[MERGE] Merge lp:openobject-addons

8728. By Chirag Dodiya(OpenERP)

[IMP] Improved search view such as when we search on parent analytic account will show child records

8727. By Bhumi Thakkar (Open ERP)

[MERGE]Merge trunk.

8726. By Bhumi Thakkar (Open ERP)

[IMP]Add partner field in list view and added domain for child of partner.

8725. By Bhumi Thakkar (Open ERP)

[MERGE]Merge trunk.

8724. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8723. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

8722. By Bhumi Thakkar (Open ERP)

[MERGE]Merge lp:openobject-addons.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_analytic_line.py'
2--- account/account_analytic_line.py 2013-04-15 10:23:49 +0000
3+++ account/account_analytic_line.py 2013-11-11 13:48:32 +0000
4@@ -29,13 +29,14 @@
5 _columns = {
6 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
7 'product_id': fields.many2one('product.product', 'Product'),
8- 'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='restrict'),
9+ 'general_account_id': fields.many2one('account.account', 'Financial Account', required=True, ondelete='restrict'),
10 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True),
11 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True),
12 'code': fields.char('Code', size=8),
13 'ref': fields.char('Ref.', size=64),
14 'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account Currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),
15 'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount Currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
16+ 'partner_id': fields.related('account_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True),
17 }
18
19 _defaults = {
20
21=== modified file 'account/project/project_view.xml'
22--- account/project/project_view.xml 2013-09-04 14:11:22 +0000
23+++ account/project/project_view.xml 2013-11-11 13:48:32 +0000
24@@ -139,6 +139,7 @@
25 <field name="date"/>
26 <field name="ref"/>
27 <field name="company_id" groups="base.group_multi_company"/>
28+ <field name="partner_id"/>
29 </group>
30 <group string="Amount">
31 <field name="amount"/>
32@@ -173,6 +174,7 @@
33 <field name="ref" invisible="context.get('to_invoice', False)"/>
34 <field name="name"/>
35 <field name="user_id"/>
36+ <field name="partner_id"/>
37 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
38 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
39 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" invisible="not context.get('to_invoice', False)"/>
40@@ -189,21 +191,24 @@
41 <field name="model">account.analytic.line</field>
42 <field name="arch" type="xml">
43 <search string="Search Analytic Lines">
44- <field name="name" string="Analytic Line"/>
45+ <field name="name" string="Description"/>
46 <field name="date"/>
47+ <field name="product_id" string="Product"/>
48 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
49 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
50 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
51 <separator/>
52 <filter string="My Entries" domain="[('user_id','=',uid)]"/>
53- <field name="account_id"/>
54+ <field name="account_id" filter_domain="[('account_id','child_of',self)]"/>
55+ <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
56 <field name="user_id"/>
57 <group string="Group By..." expand="0">
58 <filter string="Analytic Account" context="{'group_by':'account_id'}"/>
59- <filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
60+ <filter string="Financial Account" context="{'group_by':'general_account_id'}"/>
61 <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
62 <separator/>
63 <filter string="Product" context="{'group_by':'product_id'}"/>
64+ <filter string="Partner" context="{'group_by':'partner_id'}"/>
65 <filter string="User" context="{'group_by':'user_id'}"/>
66 <separator/>
67 <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/>
68
69=== modified file 'account/report/account_analytic_entries_report.py'
70--- account/report/account_analytic_entries_report.py 2013-04-15 10:23:49 +0000
71+++ account/report/account_analytic_entries_report.py 2013-11-11 13:48:32 +0000
72@@ -38,8 +38,8 @@
73 'partner_id': fields.many2one('res.partner', 'Partner'),
74 'company_id': fields.many2one('res.company', 'Company', required=True),
75 'currency_id': fields.many2one('res.currency', 'Currency', required=True),
76- 'account_id': fields.many2one('account.analytic.account', 'Account', required=False),
77- 'general_account_id': fields.many2one('account.account', 'General Account', required=True),
78+ 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False),
79+ 'general_account_id': fields.many2one('account.account', 'Financial Account', required=True),
80 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
81 'move_id': fields.many2one('account.move.line', 'Move', required=True),
82 'product_id': fields.many2one('product.product', 'Product', required=True),
83
84=== modified file 'account/report/account_analytic_entries_report_view.xml'
85--- account/report/account_analytic_entries_report_view.xml 2012-11-29 22:26:45 +0000
86+++ account/report/account_analytic_entries_report_view.xml 2013-11-11 13:48:32 +0000
87@@ -41,8 +41,8 @@
88 <group expand="0" string="Group By...">
89 <filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
90 <filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
91- <filter string="Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
92- <filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
93+ <filter string="Analytic Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
94+ <filter string="Financial Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
95 <filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
96 <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
97 <filter string="Product Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
98
99=== modified file 'account_analytic_analysis/account_analytic_analysis_view.xml'
100--- account_analytic_analysis/account_analytic_analysis_view.xml 2013-09-04 14:10:53 +0000
101+++ account_analytic_analysis/account_analytic_analysis_view.xml 2013-11-11 13:48:32 +0000
102@@ -336,5 +336,20 @@
103 </record>
104 <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/>
105
106+ <record id="account_analytic_analysis_form_form" model="ir.ui.view">
107+ <field name="name">account.analytic.account.invoice.form.inherit</field>
108+ <field name="model">account.analytic.account</field>
109+ <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
110+ <field eval="20" name="priority"/>
111+ <field name="arch" type="xml">
112+ <xpath expr='//div[@name="buttons"]' position='inside'>
113+ <button string="Time &amp; Materials to Invoice"
114+ name="%(action_hr_tree_invoiced_all)d"
115+ type="action"
116+ context="{'search_default_account_id': [active_id], 'default_account_id': active_id}"/>
117+ </xpath>
118+ </field>
119+ </record>
120+
121 </data>
122 </openerp>
123
124=== modified file 'hr_expense/hr_expense.py'
125--- hr_expense/hr_expense.py 2013-09-10 12:48:03 +0000
126+++ hr_expense/hr_expense.py 2013-11-11 13:48:32 +0000
127@@ -141,6 +141,8 @@
128
129 def expense_confirm(self, cr, uid, ids, context=None):
130 for expense in self.browse(cr, uid, ids):
131+ if not expense.line_ids:
132+ raise osv.except_osv(_('Error!'),_('You cannot submit an expense that has no expense line to the manager.'))
133 if expense.employee_id and expense.employee_id.parent_id.user_id:
134 self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
135 return self.write(cr, uid, ids, {'state': 'confirm', 'date_confirm': time.strftime('%Y-%m-%d')}, context=context)
136
137=== modified file 'hr_expense/hr_expense_view.xml'
138--- hr_expense/hr_expense_view.xml 2013-09-04 14:11:22 +0000
139+++ hr_expense/hr_expense_view.xml 2013-11-11 13:48:32 +0000
140@@ -66,8 +66,8 @@
141 <button name="validate" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
142 <button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" groups="base.group_hr_user" />
143 <button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user" />
144- <button name="done" states="accepted" string="Generate Accounting Entries" type="workflow" groups="account.group_account_invoice" class="oe_highlight"/>
145- <button name="action_view_move" states="done" string="Open Accounting Entries" type="object" groups="account.group_account_invoice"/>
146+ <button name="done" states="accepted" string="Generate Accounting Entries" type="workflow" groups="account.group_account_invoice,account.group_account_user" class="oe_highlight"/>
147+ <button name="action_view_move" states="done" string="Open Accounting Entries" type="object" groups="account.group_account_invoice,account.group_account_user"/>
148 <field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,done,paid" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
149 </header>
150 <sheet>
151
152=== modified file 'hr_expense/hr_expense_workflow.xml'
153--- hr_expense/hr_expense_workflow.xml 2013-03-14 11:27:40 +0000
154+++ hr_expense/hr_expense_workflow.xml 2013-11-11 13:48:32 +0000
155@@ -84,7 +84,6 @@
156 <field name="act_from" ref="act_accepted"/>
157 <field name="act_to" ref="act_done"/>
158 <field name="signal">done</field>
159- <field name="group_id" ref="base.group_hr_user"/>
160 </record>
161
162 <record id="t10" model="workflow.transition">
163
164=== modified file 'hr_timesheet_invoice/report/hr_timesheet_invoice_report.py'
165--- hr_timesheet_invoice/report/hr_timesheet_invoice_report.py 2013-04-15 10:23:49 +0000
166+++ hr_timesheet_invoice/report/hr_timesheet_invoice_report.py 2013-11-11 13:48:32 +0000
167@@ -35,7 +35,7 @@
168 'cost': fields.float('Cost', readonly=True),
169 'product_id': fields.many2one('product.product', 'Product',readonly=True),
170 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
171- 'general_account_id': fields.many2one('account.account', 'General Account', readonly=True),
172+ 'general_account_id': fields.many2one('account.account', 'Financial Account', readonly=True),
173 'invoice_id': fields.many2one('account.invoice', 'Invoiced', readonly=True),
174 'month': fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
175 ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
176
177=== modified file 'hr_timesheet_sheet/report/hr_timesheet_report.py'
178--- hr_timesheet_sheet/report/hr_timesheet_report.py 2013-04-15 10:23:49 +0000
179+++ hr_timesheet_sheet/report/hr_timesheet_report.py 2013-11-11 13:48:32 +0000
180@@ -38,7 +38,7 @@
181 'name': fields.char('Description', size=64,readonly=True),
182 'product_id' : fields.many2one('product.product', 'Product',readonly=True),
183 'journal_id' : fields.many2one('account.analytic.journal', 'Journal',readonly=True),
184- 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
185+ 'general_account_id' : fields.many2one('account.account', 'Financial Account', readonly=True),
186 'user_id': fields.many2one('res.users', 'User',readonly=True),
187 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
188 'company_id': fields.many2one('res.company', 'Company',readonly=True),
189
190=== modified file 'hr_timesheet_sheet/report/hr_timesheet_report_view.xml'
191--- hr_timesheet_sheet/report/hr_timesheet_report_view.xml 2012-11-29 22:26:45 +0000
192+++ hr_timesheet_sheet/report/hr_timesheet_report_view.xml 2013-11-11 13:48:32 +0000
193@@ -49,7 +49,7 @@
194 <filter string="User" name="group_user_id" icon="terp-personal" context="{'group_by':'user_id'}"/>
195 <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
196 <filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
197- <filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
198+ <filter string="Financial Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
199 <filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
200 <filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by day of date"/>
201 <filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Group by month of date"/>
202
203=== modified file 'hr_timesheet_sheet/report/timesheet_report.py'
204--- hr_timesheet_sheet/report/timesheet_report.py 2013-04-15 10:23:49 +0000
205+++ hr_timesheet_sheet/report/timesheet_report.py 2013-11-11 13:48:32 +0000
206@@ -35,7 +35,7 @@
207 'date': fields.date('Date', readonly=True),
208 'name': fields.char('Description', size=64,readonly=True),
209 'product_id' : fields.many2one('product.product', 'Product'),
210- 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
211+ 'general_account_id' : fields.many2one('account.account', 'Financial Account', readonly=True),
212 'user_id': fields.many2one('res.users', 'User',readonly=True),
213 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing',readonly=True),
214 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
215
216=== modified file 'hr_timesheet_sheet/report/timesheet_report_view.xml'
217--- hr_timesheet_sheet/report/timesheet_report_view.xml 2013-03-13 07:00:29 +0000
218+++ hr_timesheet_sheet/report/timesheet_report_view.xml 2013-11-11 13:48:32 +0000
219@@ -65,7 +65,7 @@
220 <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
221 <filter string="Type of Invoicing" icon="terp-stock_symbol-selection" context="{'group_by':'to_invoice'}"/>
222 <filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
223- <filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
224+ <filter string="Financial Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
225 <filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
226 <filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
227 <filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by day of date"/>

Subscribers

People subscribed via source and target branches

to all changes: