diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml
index 513eb4c0ee2..2e89f85821d 100644
--- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml
+++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml
@@ -61,7 +61,7 @@
- No order to invoice, view
+ No order to invoice, create
-
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index f4c77177d0c..3cb98d81f43 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -141,11 +141,11 @@ class account_analytic_account(osv.osv):
'name': fields.char('Account/Contract Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, type='char', string='Full Account Name'),
'code': fields.char('Reference', size=24, select=True),
- 'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Project')], 'Type of Account', required=True,
+ 'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Contract')], 'Type of Account', required=True,
help="If you select the View Type, it means you won\'t allow to create journal entries using that account.\n"\
"The type 'Analytic account' stands for usual accounts that you only want to use in accounting.\n"\
"If you select Contract or Project, it offers you the possibility to manage the validity and the invoicing options for this account.\n"\
- "The special type 'Template of Project' allows you to define a template with default data that you can reuse easily."),
+ "The special type 'Template of Contract' allows you to define a template with default data that you can reuse easily."),
'template_id': fields.many2one('account.analytic.account', 'Template of Contract'),
'description': fields.text('Description'),
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py
index 9e5337492d9..216541501b1 100644
--- a/addons/hr_timesheet/hr_timesheet.py
+++ b/addons/hr_timesheet/hr_timesheet.py
@@ -195,7 +195,7 @@ class account_analytic_account(osv.osv):
_inherit = 'account.analytic.account'
_description = 'Analytic Account'
_columns = {
- 'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"),
+ 'use_timesheets': fields.boolean('Use Timesheets', help="Check this field if this project manages timesheets"),
}
def on_change_template(self, cr, uid, ids, template_id, context=None):
diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml
index 55c4680b6a1..ebdd05ed59c 100644
--- a/addons/hr_timesheet/hr_timesheet_view.xml
+++ b/addons/hr_timesheet/hr_timesheet_view.xml
@@ -85,6 +85,23 @@
account.analytic.accounttree,formform
+
+
+ No activity yet on this contract.
+
+ In OpenERP, contracts and projects are implemented using
+ analytic account. So, you can track costs and revenues to analyse
+ your margins easily.
+
+ Costs will be created automatically when you register supplier
+ invoices, expenses or timesheets.
+
+ Revenues will be created automatically when you create customer
+ invoices. Customer invoices can be created based on sale orders
+ (fixed price invoices), on timesheets (based on the work done) or
+ on expenses (e.g. reinvoicing of travel costs).
+
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index 462888e0b39..5c0bc6d702f 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -16,5 +16,10 @@
50%50.0
+
+ 80%
+ 80%
+ 20.0
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
index 95fa39a6eda..e58b33634f8 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py
index 4b98f7ec23f..2671cd1ab90 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py
@@ -36,14 +36,17 @@ class final_invoice_create(osv.osv_memory):
_description = 'Create invoice from timesheet final'
_columns = {
'date': fields.boolean('Date', help='Display date in the history of works'),
- 'time': fields.boolean('Time spent', help='Display time in the history of works'),
- 'name': fields.boolean('Name of entry', help='Display detail of work in the invoice line.'),
+ 'time': fields.boolean('Time Spent', help='Display time in the history of works'),
+ 'name': fields.boolean('Log of Activity', help='Display detail of work in the invoice line.'),
'price': fields.boolean('Cost', help='Display cost of the item you reinvoice'),
'product': fields.many2one('product.product', 'Product', help='The product that will be used to invoice the remaining amount'),
}
def do_create(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [], context=context)[0]
+ # hack for fixing small issue (context should not propagate implicitly between actions)
+ if 'default_type' in context:
+ del context['default_type']
ids = self.pool.get('account.analytic.line').search(cr, uid, [('invoice_id','=',False),('to_invoice','<>', False), ('account_id', 'in', context['active_ids'])], context=context)
invs = self.pool.get('account.analytic.line').invoice_cost_create(cr, uid, ids, data, context=context)
mod_obj = self.pool.get('ir.model.data')
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
index 5ec60c1ef52..1201cc7d4e5 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -169,7 +169,8 @@ class account_analytic_line(osv.osv):
details.append(line['name'])
note.append(u' - '.join(map(lambda x: unicode(x) or '',details)))
- curr_line['name'] += "\n".join(map(lambda x: unicode(x) or '',note))
+ if note:
+ curr_line['name'] += "\n" + ("\n".join(map(lambda x: unicode(x) or '',note)))
invoice_line_obj.create(cr, uid, curr_line, context=context)
cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s", (last_invoice, account.id, tuple(ids)))
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
index a0a0ceea2ac..d1c95212139 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
@@ -26,13 +26,19 @@
hr.timesheet.invoice.create.final