diff --git a/addons/account/account.py b/addons/account/account.py
index 208bf1d6f68..3dc5c36c889 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1162,32 +1162,36 @@ class account_move(osv.osv):
]
def post(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
invoice = context.get('invoice', False)
valid_moves = self.validate(cr, uid, ids, context)
- if valid_moves:
- for move in self.browse(cr, uid, valid_moves):
- if move.name =='/':
- new_name = False
- journal = move.journal_id
+
+ if not valid_moves:
+ raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry !\nMake sure you have configured Payment Term properly !\nIt should contain atleast one Payment Term Line with type "Balance" !'))
+
+ for move in self.browse(cr, uid, valid_moves):
+ if move.name =='/':
+ new_name = False
+ journal = move.journal_id
- if invoice and invoice.internal_number:
- new_name = invoice.internal_number
+ if invoice and invoice.internal_number:
+ new_name = invoice.internal_number
+ else:
+ if journal.sequence_id:
+ c = {'fiscalyear_id': move.period_id.fiscalyear_id.id}
+ new_name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id, context=c)
else:
- if journal.sequence_id:
- c = {'fiscalyear_id': move.period_id.fiscalyear_id.id}
- new_name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id, context=c)
- else:
- raise osv.except_osv(_('Error'), _('No sequence defined in the journal !'))
+ raise osv.except_osv(_('Error'), _('No sequence defined on the journal !'))
- if new_name:
- self.write(cr, uid, [move.id], {'name':new_name})
+ if new_name:
+ self.write(cr, uid, [move.id], {'name':new_name})
- cr.execute('UPDATE account_move '\
- 'SET state=%s '\
- 'WHERE id IN %s',
- ('posted', tuple(valid_moves),))
- else:
- raise osv.except_osv(_('Integrity Error !'), _('You can not validate a non-balanced entry !\nMake sure you have configured Payment Term properly !\nIt should contain atleast one Payment Term Line with type "Balance" !'))
+ cr.execute('UPDATE account_move '\
+ 'SET state=%s '\
+ 'WHERE id IN %s',
+ ('posted', tuple(valid_moves),))
+
return True
def button_validate(self, cursor, user, ids, context=None):
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 1aa4e30d95d..2e81c7b054f 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -650,18 +650,19 @@ class account_invoice(osv.osv):
return ok
def button_reset_taxes(self, cr, uid, ids, context=None):
- if not context:
+ if context is None:
context = {}
+ ctx = context.copy()
ait_obj = self.pool.get('account.invoice.tax')
for id in ids:
cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,))
- partner = self.browse(cr, uid, id, context=context).partner_id
+ partner = self.browse(cr, uid, id, context=ctx).partner_id
if partner.lang:
- context.update({'lang': partner.lang})
- for taxe in ait_obj.compute(cr, uid, id, context=context).values():
+ ctx.update({'lang': partner.lang})
+ for taxe in ait_obj.compute(cr, uid, id, context=ctx).values():
ait_obj.create(cr, uid, taxe)
# Update the stored value (fields.function), so we write to trigger recompute
- self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context)
+ self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=ctx)
return True
def button_compute(self, cr, uid, ids, context=None, set_total=False):
@@ -1621,6 +1622,7 @@ class account_invoice_tax(osv.osv):
tax_grouped[key]['tax_amount'] += val['tax_amount']
for t in tax_grouped.values():
+ t['base'] = cur_obj.round(cr, uid, cur, t['base'])
t['amount'] = cur_obj.round(cr, uid, cur, t['amount'])
t['base_amount'] = cur_obj.round(cr, uid, cur, t['base_amount'])
t['tax_amount'] = cur_obj.round(cr, uid, cur, t['tax_amount'])
diff --git a/addons/account/report/account_central_journal.rml b/addons/account/report/account_central_journal.rml
index 4bf23b3d4b6..d6e53c4f3c7 100644
--- a/addons/account/report/account_central_journal.rml
+++ b/addons/account/report/account_central_journal.rml
@@ -295,7 +295,7 @@
[[ display_currency(data) == False or removeParentNode('blockTable') ]]
- Total([[ company.currency_id.code]]) :
+ Total:
[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]]
[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]]
diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml
index 84a9ee6a780..61113212c2d 100644
--- a/addons/account/report/account_general_journal.rml
+++ b/addons/account/report/account_general_journal.rml
@@ -270,7 +270,7 @@
Balance
- Total:([[ company.currency_id.code]])
+ Total:
[[ formatLang(sum_debit()) ]]
[[ formatLang( sum_credit()) ]]
diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml
index 1321bdea750..9d23454fcbb 100644
--- a/addons/account/report/account_general_ledger_landscape.rml
+++ b/addons/account/report/account_general_ledger_landscape.rml
@@ -263,13 +263,13 @@
-
+
[[ '..'*(o.level-1) ]] [[ o.code ]] [[ o.name ]]
- [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]
- [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]
- [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
- [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]
+ [[ formatLang(sum_debit_account(o), dp='Account') ]]
+ [[ formatLang(sum_credit_account(o), dp='Account') ]]
+ [[ formatLang(sum_balance_account(o), dp='Account') ]] [[ company.currency_id.symbol ]]
+ [[ o.currency_id and formatLang(sum_currency_amount_account(o), dp='Account') + o.currency_id.code or '' ]]
@@ -292,9 +292,9 @@
[[ line['move'] ]]
[[ line['lname'] ]]
[[ strip_name(line['line_corresp'].replace(', ',','),40) ]]
- [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]
- [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]
- [[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(line['debit'], dp='Account') ]]
+ [[ formatLang(line['credit'], dp='Account') ]]
+ [[ formatLang(line['progress'], dp='Account') ]] [[ company.currency_id.symbol ]]
[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]]
@@ -327,9 +327,9 @@
@@ -116,7 +118,7 @@
Document: Customer account statement
Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]
- Customer Ref: [[ o.ref or '' ]]
+ Customer Ref: [[ o.ref or ' ']]
@@ -181,10 +183,10 @@
[[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]]
- [[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]]
+ [[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]]
- [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]
+ [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]
[[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]]
@@ -195,7 +197,7 @@
-
+
@@ -206,7 +208,7 @@
Sub-Total :
- [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]]
+ [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]]
[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]]
@@ -220,6 +222,8 @@
+
+
@@ -230,25 +234,21 @@
Balance :
- [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]].
diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py
index efce4bc4da4..f94082445da 100644
--- a/addons/account/wizard/account_automatic_reconcile.py
+++ b/addons/account/wizard/account_automatic_reconcile.py
@@ -200,7 +200,8 @@ class account_automatic_reconcile(osv.osv_memory):
"AND partner_id=%s " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " \
- "AND debit > 0",
+ "AND debit > 0 " \
+ "ORDER BY date_maturity",
(account_id, partner_id))
debits = cr.fetchall()
@@ -212,7 +213,8 @@ class account_automatic_reconcile(osv.osv_memory):
"AND partner_id=%s " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " \
- "AND credit > 0",
+ "AND credit > 0 " \
+ "ORDER BY date_maturity",
(account_id, partner_id))
credits = cr.fetchall()
diff --git a/addons/account_analytic_default/account_analytic_default.py b/addons/account_analytic_default/account_analytic_default.py
index d0405e1ff52..dce86597a4c 100644
--- a/addons/account_analytic_default/account_analytic_default.py
+++ b/addons/account_analytic_default/account_analytic_default.py
@@ -111,8 +111,9 @@ class sale_order_line(osv.osv):
sale_line = self.browse(cr, uid, ids[0], context)
inv_line_obj = self.pool.get('account.invoice.line')
anal_def_obj = self.pool.get('account.analytic.default')
+
for line in inv_line_obj.browse(cr, uid, create_ids, context):
- rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
+ rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, sale_line.order_id.user_id.id, time.strftime('%Y-%m-%d'), context)
if rec:
inv_line_obj.write(cr, uid, [line.id], {'account_analytic_id':rec.analytic_id.id}, context=context)
diff --git a/addons/account_analytic_default/account_analytic_default_view.xml b/addons/account_analytic_default/account_analytic_default_view.xml
index 95a39eb11e6..939d8474250 100644
--- a/addons/account_analytic_default/account_analytic_default_view.xml
+++ b/addons/account_analytic_default/account_analytic_default_view.xml
@@ -53,14 +53,14 @@
-
+
Analytic Defaults
account.analytic.default
form
tree,form
-
+
-
+
+
+
-
- 3
+
+ 3
+ always
diff --git a/addons/base_report_designer/base_report_designer_installer.xml b/addons/base_report_designer/base_report_designer_installer.xml
index 4ea4970d19a..2c0cf191e4e 100644
--- a/addons/base_report_designer/base_report_designer_installer.xml
+++ b/addons/base_report_designer/base_report_designer_installer.xml
@@ -19,7 +19,7 @@
This plug-in allows you to create/modify OpenERP Reports into OpenOffice Writer.
-
+
@@ -29,10 +29,10 @@
type="object" string="Skip" colspan="1" invisible="context.get('menu',False)"/>
-
- 15
-
-
+
+ 15
+
+
@@ -55,12 +55,11 @@
-
- 3
+
+ 3
+ always
-
-
OpenERP Report Designer
ir.actions.act_window
diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index 4245f3da206..041feb6d05c 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -54,6 +54,7 @@
2
+ always
diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml
index 8151442855b..56c205b16c9 100644
--- a/addons/base_setup/base_setup_todo.xml
+++ b/addons/base_setup/base_setup_todo.xml
@@ -67,7 +67,7 @@
3
- onskip
+ always
diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml
index ece3bae31ec..35ff5a0a7cc 100644
--- a/addons/crm/crm_installer_view.xml
+++ b/addons/crm/crm_installer_view.xml
@@ -25,24 +25,24 @@
Configure
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -59,9 +59,10 @@
-
- 3
-
+
+ 3
+ always
+
diff --git a/addons/document_ics/document_ics_config_wizard.xml b/addons/document_ics/document_ics_config_wizard.xml
index d19951deb38..e58f48cad4c 100644
--- a/addons/document_ics/document_ics_config_wizard.xml
+++ b/addons/document_ics/document_ics_config_wizard.xml
@@ -54,6 +54,7 @@
register configuration wizard
diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml
index 0f396e65a8b..5ccbaefa3f5 100644
--- a/addons/hr/hr_installer.xml
+++ b/addons/hr/hr_installer.xml
@@ -52,6 +52,7 @@
3
+ always
diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py
index 1465be81bc8..b0845422655 100644
--- a/addons/hr_attendance/report/timesheet.py
+++ b/addons/hr_attendance/report/timesheet.py
@@ -41,8 +41,8 @@ class report_custom(report_rml):
start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d')
- first_monday = start_date - relativedelta(days=start_date.day_of_week)
- last_monday = end_date + relativedelta(days=7 - end_date.day_of_week)
+ first_monday = start_date - relativedelta(days=start_date.date().weekday())
+ last_monday = end_date + relativedelta(days=7 - end_date.date().weekday())
if last_monday < first_monday:
first_monday, last_monday = last_monday, first_monday
@@ -82,7 +82,7 @@ class report_custom(report_rml):
for att in attendances:
dt = datetime.strptime(att['name'], '%Y-%m-%d %H:%M:%S')
if att['action'] == 'sign_out':
- week_wh[ldt.day_of_week] = week_wh.get(ldt.day_of_week, 0) + (dt - ldt).hours
+ week_wh[ldt.date().weekday()] = week_wh.get(ldt.date().weekday(), 0) + ((dt - ldt).seconds/3600)
ldt = dt
# Week xml representation
diff --git a/addons/hr_payroll/report/report_employees_detail.py b/addons/hr_payroll/report/report_employees_detail.py
index d36df160ad2..c3d90c4eac7 100644
--- a/addons/hr_payroll/report/report_employees_detail.py
+++ b/addons/hr_payroll/report/report_employees_detail.py
@@ -227,7 +227,7 @@ class employees_salary_report(rml_parse.rml_parse):
def get_monthly_total(self):
return self.month_total_list
-report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report,header=3)
+report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report,header='internal landscape')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_payroll/report/report_employees_detail.rml b/addons/hr_payroll/report/report_employees_detail.rml
index 1988d932ce2..28ebe20d007 100644
--- a/addons/hr_payroll/report/report_employees_detail.rml
+++ b/addons/hr_payroll/report/report_employees_detail.rml
@@ -86,33 +86,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -122,20 +108,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -144,20 +130,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -166,24 +152,38 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -292,10 +292,10 @@
[[ o.name ]]
- Other Id
+ PAN No.
- [[ o.otherid or '' ]]
+ [[ o.pan_no or ' ']]
Address
@@ -332,7 +332,7 @@
[[ repeatIn(get_periods(data['form']),'m') ]]
-
+
Title
@@ -378,13 +378,7 @@
-
-
-
-
-
-
@@ -393,56 +387,53 @@
- [[ repeatIn(get_allow(),'e1') ]]
-
+ [[ repeatIn(get_allow(),'e1') ]]
+
[[ e1[0] ]]
- [[ formatLang(e1[1]) ]]
+ [[ formatLang(e1[1]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[2]) ]]
+ [[ formatLang(e1[2]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[3]) ]]
+ [[ formatLang(e1[3]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[4]) ]]
+ [[ formatLang(e1[4]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[5]) ]]
+ [[ formatLang(e1[5]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[6]) ]]
+ [[ formatLang(e1[6]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[7]) ]]
+ [[ formatLang(e1[7]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[8]) ]]
+ [[ formatLang(e1[8]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[9]) ]]
+ [[ formatLang(e1[9]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[10]) ]]
+ [[ formatLang(e1[10]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[11]) ]]
+ [[ formatLang(e1[11]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[12]) ]]
+ [[ formatLang(e1[12]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e1[13]) ]]
+ [[ formatLang(e1[13]) ]] [[ company.currency_id.symbol ]]
-
-
-
@@ -452,56 +443,53 @@
- [[ repeatIn(get_deduct(),'e2') ]]
-
+ [[ repeatIn(get_deduct(),'e2') ]]
+
[[ e2[0] ]]
- [[ formatLang(e2[1]) ]]
+ [[ formatLang(e2[1]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[2]) ]]
+ [[ formatLang(e2[2]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[3]) ]]
+ [[ formatLang(e2[3]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[4]) ]]
+ [[ formatLang(e2[4]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[5]) ]]
+ [[ formatLang(e2[5]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[6]) ]]
+ [[ formatLang(e2[6]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[7]) ]]
+ [[ formatLang(e2[7]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[8]) ]]
+ [[ formatLang(e2[8]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[9]) ]]
+ [[ formatLang(e2[9]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[10]) ]]
+ [[ formatLang(e2[10]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[11]) ]]
+ [[ formatLang(e2[11]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[12]) ]]
+ [[ formatLang(e2[12]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e2[13]) ]]
+ [[ formatLang(e2[13]) ]] [[ company.currency_id.symbol ]]
-
-
-
@@ -511,107 +499,98 @@
- [[ repeatIn(get_other(),'e3') ]]
-
+ [[ repeatIn(get_other(),'e3') ]]
+
[[ e3[0] ]]
- [[ formatLang(e3[1]) ]]
+ [[ formatLang(e3[1]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[2]) ]]
+ [[ formatLang(e3[2]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[3]) ]]
+ [[ formatLang(e3[3]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[4]) ]]
+ [[ formatLang(e3[4]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[5]) ]]
+ [[ formatLang(e3[5]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[6]) ]]
+ [[ formatLang(e3[6]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[7]) ]]
+ [[ formatLang(e3[7]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[8]) ]]
+ [[ formatLang(e3[8]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[9]) ]]
+ [[ formatLang(e3[9]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[10]) ]]
+ [[ formatLang(e3[10]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[11]) ]]
+ [[ formatLang(e3[11]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[12]) ]]
+ [[ formatLang(e3[12]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(e3[13]) ]]
+ [[ formatLang(e3[13]) ]] [[ company.currency_id.symbol ]]
-
-
-
-
-
-
-
-
-
[[ get_monthly_total()[0] ]]
- [[ formatLang(get_monthly_total()[1]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[1]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[2]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[2]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[3]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[3]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[4]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[4]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[5]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[5]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[6]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[6]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[7]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[7]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[8]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[8]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[9]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[9]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[10]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[10]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[11]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[11]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_monthly_total()[12]) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_monthly_total()[12]) ]] [[ company.currency_id.symbol ]]
- [[ formatLang(get_total()) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_total()) ]] [[ company.currency_id.symbol ]]
@@ -619,11 +598,8 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/addons/hr_payroll/report/report_year_report.rml b/addons/hr_payroll/report/report_year_report.rml
index 4c32436955a..d103d35185f 100755
--- a/addons/hr_payroll/report/report_year_report.rml
+++ b/addons/hr_payroll/report/report_year_report.rml
@@ -63,11 +63,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -134,7 +147,7 @@
[[ repeatIn(get_periods(data['form']),'m') ]]
-
+
Name
@@ -176,7 +189,7 @@
[[ m[11] ]]
- Total([[company.currency_id.code]])
+ Total
@@ -185,7 +198,7 @@
[[ repeatIn(get_employee(data['form']),'e') ]]
-
+
[[ e[0] ]]
@@ -231,23 +244,14 @@
-
-
-
-
-
-
-
-
-
- [[ repeatIn(get_months_tol(),'t') ]]
-
+ [[ repeatIn(get_months_tol(),'t') ]]
+
- Total([[company.currency_id.code]])
+ Total
[[ formatLang(t[1]) ]] [[company.currency_id.symbol]]
@@ -298,4 +302,4 @@
-
+
\ No newline at end of file
diff --git a/addons/hr_payroll/report/report_year_salary.py b/addons/hr_payroll/report/report_year_salary.py
index a85d7328973..5e03e4710a6 100755
--- a/addons/hr_payroll/report/report_year_salary.py
+++ b/addons/hr_payroll/report/report_year_salary.py
@@ -105,7 +105,7 @@ class year_salary_report(rml_parse.rml_parse):
self.total += item[count]
return self.total
-report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report,header=3)
+report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report,header='internal landscape')
diff --git a/addons/hr_payroll/report/rml_parse.py b/addons/hr_payroll/report/rml_parse.py
index 2e3ca9dc019..7abb29711b6 100755
--- a/addons/hr_payroll/report/rml_parse.py
+++ b/addons/hr_payroll/report/rml_parse.py
@@ -151,10 +151,10 @@ class rml_parse(report_sxw.rml_parse):
print Stringer
return Stringer
- def _add_header(self, node, header=1):
- if header==2:
+ def _add_header(self, node, header='external'):
+ if header=='internal':
rml_head = self.rml_header2
- elif header==3:
+ elif header=='internal landscape':
rml_head = self.rml_header3
else:
rml_head = self.rml_header
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 55e25e4001c..ce074715888 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -178,6 +178,21 @@ class hr_timesheet_sheet(osv.osv):
def copy(self, cr, uid, ids, *args, **argv):
raise osv.except_osv(_('Error !'), _('You cannot duplicate a timesheet !'))
+ def create(self, cr, uid, vals, *args, **argv):
+ if 'employee_id' in vals:
+ if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id:
+ raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any user defined !'))
+ return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv)
+
+ def write(self, cr, uid, ids, vals, *args, **argv):
+ if 'employee_id' in vals:
+ new_user_id = self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id.id or False
+ if not new_user_id:
+ raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any user defined !'))
+ if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id):
+ raise osv.except_osv(_('Error !'), _('You can not have 2 timesheets that overlaps !\nPlease use the menu \'My Current Timesheet\' to avoid this problem.'))
+ return super(hr_timesheet_sheet, self).write(cr, uid, ids, vals, *args, **argv)
+
def button_confirm(self, cr, uid, ids, context=None):
if context is None:
context = {}
@@ -262,8 +277,8 @@ class hr_timesheet_sheet(osv.osv):
_columns = {
'name': fields.char('Description', size=64, select=1,
states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}),
- 'user_id': fields.many2one('res.users', 'User', required=True, select=1,
- states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}),
+ 'employee_id': fields.many2one('hr.employee', 'Employee', required=True),
+ 'user_id': fields.related('employee_id', 'user_id', type="many2one", relation="res.users", store=True, string="User", required=False, readonly=True),#fields.many2one('res.users', 'User', required=True, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}),
'date_from': fields.date('Date from', required=True, select=1, readonly=True, states={'new':[('readonly', False)]}),
'date_to': fields.date('Date to', required=True, select=1, readonly=True, states={'new':[('readonly', False)]}),
'date_current': fields.date('Current date', required=True),
@@ -320,24 +335,24 @@ class hr_timesheet_sheet(osv.osv):
return time.strftime('%Y-%m-%d')
_defaults = {
- 'user_id': lambda self,cr,uid,c: uid,
'date_from' : _default_date_from,
'date_current' : lambda *a: time.strftime('%Y-%m-%d'),
'date_to' : _default_date_to,
'state': 'new',
- 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr_timesheet_sheet.sheet', context=c)
+ 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr_timesheet_sheet.sheet', context=c)
}
- def _sheet_date(self, cr, uid, ids):
+ def _sheet_date(self, cr, uid, ids, forced_user_id=False):
for sheet in self.browse(cr, uid, ids):
- cr.execute('SELECT id \
+ new_user_id = forced_user_id or sheet.user_id and sheet.user_id.id
+ if new_user_id:
+ cr.execute('SELECT id \
FROM hr_timesheet_sheet_sheet \
WHERE (date_from < %s and %s < date_to) \
AND user_id=%s \
- AND id <> %s', (sheet.date_to, sheet.date_from,
- sheet.user_id.id, sheet.id))
- if cr.fetchall():
- return False
+ AND id <> %s',(sheet.date_to, sheet.date_from, new_user_id, sheet.id))
+ if cr.fetchall():
+ return False
return True
def _date_current_check(self, cr, uid, ids):
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml
index b22a88c5036..dedac8377a7 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml
@@ -4,6 +4,7 @@
Sheet 0
+
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index decf3b16b6b..231aba040e7 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -1,25 +1,6 @@
-
- hr.timesheet.sheet.tree
- hr_timesheet_sheet.sheet
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
hr.timesheet.sheet.graph
hr_timesheet_sheet.sheet
@@ -71,7 +52,7 @@
-
+
@@ -167,7 +148,7 @@
-
+
-
+
@@ -190,7 +171,7 @@
hr_timesheet_sheet.sheet
form
- {'search_default_my_timesheet':1, 'search_default_user_id':uid }
+ {'search_default_my_timesheet':1, }
Employees can encode their time spent on the different projects. A project is an analytic account and the time spent on a project generate costs on the analytic account.
@@ -312,18 +293,19 @@
src_model="hr_timesheet_sheet.sheet"/>
- hr.timesheet.sheet.tree.simplified
+ hr.timesheet.sheet.tree
hr_timesheet_sheet.sheet
tree
-
+
+
-
-
-
-
+
+
+
+
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index 08abc6db63b..a015ff933d2 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -34,11 +34,11 @@
+
+
+
-
-
-
diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
index bb5752d6c9e..808045eb677 100644
--- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
+++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
@@ -70,6 +70,7 @@
name: Week-22(2010)
state: new
user_id: base.user_root
+ employee_id: 'hr_employee_employee0'
-
Now , at the time of login, I create Attendances and perform "Sign In" action.
-
diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml
index 681bf2253d5..1fa6cab9865 100644
--- a/addons/knowledge/knowledge_installer.xml
+++ b/addons/knowledge/knowledge_installer.xml
@@ -53,6 +53,7 @@
3
+ always
diff --git a/addons/marketing/marketing_view.xml b/addons/marketing/marketing_view.xml
index 6cd35f3a533..9edd7689484 100644
--- a/addons/marketing/marketing_view.xml
+++ b/addons/marketing/marketing_view.xml
@@ -50,6 +50,7 @@
3
+ always
diff --git a/addons/mrp/mrp_installer.xml b/addons/mrp/mrp_installer.xml
index d317cf6face..ff0c01f8e18 100644
--- a/addons/mrp/mrp_installer.xml
+++ b/addons/mrp/mrp_installer.xml
@@ -48,6 +48,7 @@
3
+ always
diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml
index bc445e7818f..b59f95ab908 100644
--- a/addons/profile_tools/misc_tools_installer.xml
+++ b/addons/profile_tools/misc_tools_installer.xml
@@ -46,6 +46,7 @@
+ always
3
diff --git a/addons/project/board_project_manager_view.xml b/addons/project/board_project_manager_view.xml
index 12559b0629b..d92592a9f38 100644
--- a/addons/project/board_project_manager_view.xml
+++ b/addons/project/board_project_manager_view.xml
@@ -10,43 +10,12 @@
Board for project managers
-->
+ domain="[('manager', '=', uid)]"
+ id="act_my_project" name="My projects"
+ res_model="project.project" view_mode="tree,form"
+ view_type="form"/>
-
- board.project.manager.form
- board.board
- form
-
-
-
-
-
-
- Project Manager Dashboard
- board.board
- form
- form
- menu
-
-
-
-
-
diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml
index 2b46cc0ab5f..32b235e4691 100644
--- a/addons/project/project_installer.xml
+++ b/addons/project/project_installer.xml
@@ -49,8 +49,9 @@
-
- 3
+
+ always
+ 3
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index 2caf36766b0..0c31c485753 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -92,7 +92,7 @@ class project_phase(osv.osv):
model_data_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
return model_data_obj.read(cr, uid, [model_data_id], ['res_id'])[0]['res_id']
- def _compute(self, cr, uid, ids, context=None):
+ def _compute(self, cr, uid, ids,field_name, arg, context=None):
res = {}
if not ids:
return res
@@ -100,9 +100,7 @@ class project_phase(osv.osv):
tot = 0.0
for task in phase.task_ids:
tot += task.planned_hours
- res[phase.id] = {
- 'total_hours' : tot
- }
+ res[phase.id] = tot
return res
_columns = {
diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml
index 3412ba7ca08..fa645af4127 100644
--- a/addons/project_long_term/project_long_term_view.xml
+++ b/addons/project_long_term/project_long_term_view.xml
@@ -110,22 +110,23 @@
form
-
+
-
+
Make Invoices
ir.actions.act_window
sale.order.line.make.invoice
@@ -34,4 +34,4 @@
sale.order.line
-
\ No newline at end of file
+
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index 6907f4ed3d5..92fb4559345 100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
@@ -43,8 +43,8 @@ class report_stock_move(osv.osv):
'location_id': fields.many2one('stock.location', 'Source Location', readonly=True, select=True, help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', readonly=True, select=True, help="Location where the system will stock the finished products."),
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True),
- 'product_qty_in':fields.integer('In Qty',readonly=True),
- 'product_qty_out':fields.integer('Out Qty',readonly=True),
+ 'product_qty_in':fields.float('In Qty',readonly=True),
+ 'product_qty_out':fields.float('Out Qty',readonly=True),
'value' : fields.float('Total Value', required=True, digits_compute=dp.get_precision('Sale Price')),
'day_diff2':fields.float('Delay (Days)',readonly=True, digits=(16,2), group_operator="avg"),
'day_diff1':fields.float('Planned (Days)',readonly=True, digits=(16,2), group_operator="avg"),
diff --git a/addons/survey/report/survey_analysis_report.py b/addons/survey/report/survey_analysis_report.py
index 4aa4b099c57..0d866368bf2 100644
--- a/addons/survey/report/survey_analysis_report.py
+++ b/addons/survey/report/survey_analysis_report.py
@@ -29,7 +29,6 @@ from report import report_sxw
class survey_analysis(report_rml):
def create(self, cr, uid, ids, datas, context):
-
surv_obj = pooler.get_pool(cr.dbname).get('survey')
user_obj = pooler.get_pool(cr.dbname).get('res.users')
rml_obj=report_sxw.rml_parse(cr, uid, surv_obj._name,context)
@@ -423,7 +422,7 @@ class survey_analysis(report_rml):
rml += """"""
report_type = datas.get('report_type', 'pdf')
create_doc = self.generators[report_type]
- self.pageCount=True
+ self.internal_header=True
pdf = create_doc(rml, title=self.title)
return (pdf, report_type)
diff --git a/addons/survey/report/survey_browse_response.py b/addons/survey/report/survey_browse_response.py
index d024e410d0e..2cdb98622a9 100644
--- a/addons/survey/report/survey_browse_response.py
+++ b/addons/survey/report/survey_browse_response.py
@@ -520,9 +520,7 @@ class survey_browse_response(report_rml):
rml += """"""
report_type = datas.get('report_type', 'pdf')
create_doc = self.generators[report_type]
- self.pageCount=False
pdf = create_doc(rml, title=self.title)
-
return (pdf, report_type)
survey_browse_response('report.survey.browse.response', 'survey','','')
diff --git a/addons/survey/report/survey_form.py b/addons/survey/report/survey_form.py
index 5836be2d399..1a623db4211 100644
--- a/addons/survey/report/survey_form.py
+++ b/addons/survey/report/survey_form.py
@@ -389,7 +389,6 @@ class survey_form(report_rml):
rml += """"""
report_type = datas.get('report_type', 'pdf')
create_doc = self.generators[report_type]
- self.pageCount=False
pdf = create_doc(rml, title=self.title)
return (pdf, report_type)
diff --git a/addons/thunderbird/thunderbird_installer.xml b/addons/thunderbird/thunderbird_installer.xml
index 0c8b431a82f..0059cdfd8ab 100644
--- a/addons/thunderbird/thunderbird_installer.xml
+++ b/addons/thunderbird/thunderbird_installer.xml
@@ -60,8 +60,9 @@
-
- 3
+
+ always
+ 3