diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py
index 7a66dd4f175..bb13f1a5776 100644
--- a/addons/account/account_analytic_line.py
+++ b/addons/account/account_analytic_line.py
@@ -75,6 +75,9 @@ class account_analytic_line(osv.osv):
unit=False, journal_id=False, context=None):
if context==None:
context={}
+ if not journal_id:
+ j_ids = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=','purchase')])
+ j_id = j_ids and j_ids[0] or False
if not journal_id or not prod_id:
return {}
product_obj = self.pool.get('product.product')
@@ -86,7 +89,7 @@ class account_analytic_line(osv.osv):
result = 0.0
is_purchase = False
- if j_id.type == 'purchase':
+ if j_id.type <> 'sale':
a = prod.product_tmpl_id.property_account_expense.id
if not a:
a = prod.categ_id.property_account_expense_categ.id
diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py
index 7c4645199c2..75ad6101e11 100644
--- a/addons/hr_timesheet/hr_timesheet.py
+++ b/addons/hr_timesheet/hr_timesheet.py
@@ -57,14 +57,14 @@ class hr_analytic_timesheet(osv.osv):
return super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context)
- def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, company_id, unit, context=None):
+ def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, company_id, unit=False, journal_id=False, context=None):
if context is None:
context = {}
res = {'value':{}}
if prod_id and unit_amount:
# find company
company_id = self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=context)
- res.update(self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, context=context))
+ res.update(self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, journal_id, context=context))
# update unit of measurement
if prod_id:
uom = self.pool.get('product.product').browse(cr, uid, prod_id, context=context)
diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml
index e80bfbb7593..a47fbf24685 100644
--- a/addons/hr_timesheet/hr_timesheet_view.xml
+++ b/addons/hr_timesheet/hr_timesheet_view.xml
@@ -14,14 +14,15 @@
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -40,9 +41,9 @@
-
-
-
+
+
+
@@ -67,7 +68,7 @@
-
+
@@ -81,32 +82,20 @@
-
-
+
+
-
- My Working Hours
- ir.actions.act_window
- hr.analytic.timesheet
- form
- tree,form
- [('user_id','=',uid)]
-
- {"search_default_user_id":uid, "search_default_my": 1}
-
-
-
Working Hours
ir.actions.act_window
hr.analytic.timesheet
form
tree,form
- {"search_default_user_id":uid}
+ {"search_default_user_id":uid, "search_default_today":1}
This functionality gives you a list of work done by user, product and analytic account (or project). A search tool allows you to make fine-grained analysis.
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 4e1926fe069..1bb7765b372 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -38,7 +38,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
'accounts': fields.many2many('account.analytic.account', 'invoice_id', 'account_id', 'Analytic Accounts', required=True),
'date': fields.boolean('Date', help='The real date of each work will be displayed on the invoice'),
'time': fields.boolean('Time spent', help='The time of each work done will be displayed on the invoice'),
- 'name': fields.boolean('Name of entry', help='The detail of each work done will be displayed on the invoice'),
+ 'name': fields.boolean('Description', help='The detail of each work done will be displayed on the invoice'),
'price': fields.boolean('Cost', help='The cost of each work done will be displayed on the invoice. You probably don\'t want to check this'),
'product': fields.many2one('product.product', 'Product', help='Complete this field only if you want to force to use a specific product. Keep empty to use the real product that comes from the cost.'),
}
@@ -59,8 +59,10 @@ class hr_timesheet_invoice_create(osv.osv_memory):
return [x[0] for x in account_ids]
_defaults = {
- 'accounts': _get_accounts
- }
+ 'accounts': _get_accounts,
+ 'date': lambda *args: 1,
+ 'name': lambda *args: 1
+ }
def do_create(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
index d71b385c1f8..fc6d6da911e 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
@@ -2,37 +2,33 @@
-
+
hr.timesheet.invoice.create.form
hr.timesheet.invoice.create
form
-
+
@@ -45,7 +41,7 @@
new
-
+
Invoice analytic lines
@@ -55,5 +51,5 @@
account.analytic.line
-
-
\ No newline at end of file
+
+
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index 807f9a60409..decf3b16b6b 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -104,11 +104,11 @@
-
+
-
-
+
+
@@ -117,11 +117,11 @@
-
+
-
-
+
+
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index c54412cb01b..2222ef12ea5 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -13,13 +13,13 @@
-
+
-
+