diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
index acf15ce53c1..5d9062dff7a 100644
--- a/addons/account/report/account_entries_report.py
+++ b/addons/account/report/account_entries_report.py
@@ -21,6 +21,7 @@
import tools
from osv import fields,osv
+import decimal_precision as dp
class account_entries_report(osv.osv):
_name = "account.entries.report"
@@ -39,6 +40,8 @@ class account_entries_report(osv.osv):
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'date': fields.date('Date', size=128, readonly=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
+ 'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Account'), readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
@@ -68,6 +71,7 @@ class account_entries_report(osv.osv):
"partners accounts (for debit/credit computations), closed for depreciated accounts."),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
}
+
_order = 'date desc'
def search(self, cr, uid, args, offset=0, limit=None, order=None,
@@ -133,6 +137,8 @@ class account_entries_report(osv.osv):
a.user_type as user_type,
1 as nbr,
l.quantity as quantity,
+ l.currency_id as currency_id,
+ l.amount_currency as amount_currency,
l.debit as debit,
l.credit as credit,
l.debit-l.credit as balance
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index 046eb8852d7..2d87f6a4f06 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -13,6 +13,8 @@
+
+
@@ -77,20 +79,18 @@
+
-
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
diff --git a/addons/account_voucher/security/account_voucher_security.xml b/addons/account_voucher/security/account_voucher_security.xml
index ea753edcf6c..df4e58484b5 100644
--- a/addons/account_voucher/security/account_voucher_security.xml
+++ b/addons/account_voucher/security/account_voucher_security.xml
@@ -7,5 +7,11 @@
['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+
+ Voucher Line multi-company
+
+
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index f59bd738cae..57b74d948d8 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -86,18 +86,12 @@ class account_voucher(osv.osv):
def _get_currency(self, cr, uid, context):
journal_pool = self.pool.get('account.journal')
journal_id = context.get('journal_id', False)
- if not journal_id:
- ttype = context.get('type', 'bank')
- res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
- if not res:
- return False
- journal_id = res[0]
-
- journal = journal_pool.browse(cr, uid, journal_id)
- currency_id = journal.company_id.currency_id.id
- if journal.currency:
- currency_id = journal.currency.id
- return
+ if journal_id:
+ journal = journal_pool.browse(cr, uid, journal_id)
+ currency_id = journal.company_id.currency_id.id
+ if journal.currency:
+ currency_id = journal.currency.id
+ return False
def _get_partner(self, cr, uid, context={}):
return context.get('partner_id', False)
@@ -553,9 +547,6 @@ class account_voucher(osv.osv):
if inv.move_id:
continue
- if not inv.line_ids:
- raise osv.except_osv(_('Error !'), _('You can not validate a voucher without lines !'))
-
if inv.journal_id.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id)
else:
@@ -743,8 +734,7 @@ class account_voucher_line(osv.osv):
'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Originial Amount', store=True),
'amount_unreconciled': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Open Balance', store=True),
-
-# 'amount_unreconciled': fields.related('move_line_id','amount_unreconciled', type='float', relation='account.move.line', string='Open Balance', store=True, readonly="1"),
+ 'company_id': fields.related('voucher_id','company_id', relation='res.company', string='Company', store=True),
}
_defaults = {
'name': lambda *a: ''
diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml
index 60af74e9359..e494db325e5 100644
--- a/addons/crm/crm_data.xml
+++ b/addons/crm/crm_data.xml
@@ -1,6 +1,6 @@
-
+
Sales Department
Sales
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index 41eeb529154..566976c1d52 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/addons/crm/crm_opportunity_data.xml b/addons/crm/crm_opportunity_data.xml
index fd4d76d5865..59e0828d0ee 100644
--- a/addons/crm/crm_opportunity_data.xml
+++ b/addons/crm/crm_opportunity_data.xml
@@ -1,6 +1,6 @@
-
+
Existing Customer
diff --git a/addons/crm/crm_phonecall_data.xml b/addons/crm/crm_phonecall_data.xml
index 723cfeaca26..097540bada4 100644
--- a/addons/crm/crm_phonecall_data.xml
+++ b/addons/crm/crm_phonecall_data.xml
@@ -1,8 +1,6 @@
-->
-
diff --git a/addons/hr_holidays/test/test_hr_holiday.yml b/addons/hr_holidays/test/test_hr_holiday.yml
index f5a3b21c7a3..f32afa737b2 100644
--- a/addons/hr_holidays/test/test_hr_holiday.yml
+++ b/addons/hr_holidays/test/test_hr_holiday.yml
@@ -47,8 +47,8 @@
holiday_status_id: hr_holidays_status_sick0
name: Sick Leaves for Phil Graves
number_of_days_temp: 12.0
- date_from: '05/20/2010 13:59:00'
- date_to: '05/22/2010 13:59:00'
+ date_from: '2010-05-20 13:59:00'
+ date_to: '2010-05-22 13:59:00'
type: add
-
I confirmed the allocation by clicking on "Confirm" button.
diff --git a/addons/hr_recruitment/test/test_hr_recruitment.yml b/addons/hr_recruitment/test/test_hr_recruitment.yml
index f5689b67787..32f49ca4ad5 100644
--- a/addons/hr_recruitment/test/test_hr_recruitment.yml
+++ b/addons/hr_recruitment/test/test_hr_recruitment.yml
@@ -63,7 +63,7 @@
-
!record {model: hr.recruitment.job2phonecall, id: hr_recruitment_forinterview0}:
user_id: base.user_root
- deadline: '05/28/2010 11:51:00'
+ deadline: '2010-05-28 11:51:00'
note: 'For interview.'
category_id: 'crm_case_categ_employee0'
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 d75968f5f16..bb5752d6c9e 100644
--- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
+++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
@@ -93,7 +93,7 @@
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
timesheet_ids:
- account_id: account.analytic_sednacom
- date: '05/26/2010'
+ date: '2010-05-26'
name: 'Develop yaml for hr module'
unit_amount: 3.00
amount: -90.00
@@ -124,7 +124,7 @@
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
timesheet_ids:
- account_id: account.analytic_sednacom
- date: '05/26/2010'
+ date: '2010-05-26'
name: 'Develop yaml for hr module'
unit_amount: 2.0
amount: -90.00
diff --git a/addons/idea/test/test_idea.yml b/addons/idea/test/test_idea.yml
index bdf66af961e..4f6ea4bd568 100644
--- a/addons/idea/test/test_idea.yml
+++ b/addons/idea/test/test_idea.yml
@@ -11,7 +11,7 @@
-
!record {model: idea.idea, id: idea_idea_0}:
category_id: idea_category_technical0
- created_date: '05/13/2010 19:16:26'
+ created_date: '2010-05-13 19:16:26'
description: I want that Technical presentation are arranged for 1 hours in every
day.\nso, on that presentation, we can know all things what improvement and development
are done in our company.\n\n\n\n\n
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 4fd4fda5253..bdfe825781c 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -223,7 +223,8 @@ class marketing_campaign_segment(osv.osv):
'name': fields.char('Name', size=64,required=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign', required=True, select=1, ondelete="cascade"),
'object_id': fields.related('campaign_id','object_id', type='many2one', relation='ir.model', string='Resource'),
- 'ir_filter_id': fields.many2one('ir.filters', 'Filter', help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource. If no filter is set, all records are selected without filtering. The synchronization mode may also add a criterion to the filter."),
+ 'ir_filter_id': fields.many2one('ir.filters', 'Filter', ondelete="restrict",
+ help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource. If no filter is set, all records are selected without filtering. The synchronization mode may also add a criterion to the filter."),
'sync_last_date': fields.datetime('Last Synchronization', help="Date on which this segment was synchronized last time (automatically or manually)"),
'sync_mode': fields.selection([('create_date', 'Only records created after last sync'),
('write_date', 'Only records modified after last sync (no duplicates)'),
diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml
index 178c361a10c..23cfc43c821 100644
--- a/addons/stock_planning/test/stock_planning.yml
+++ b/addons/stock_planning/test/stock_planning.yml
@@ -8,35 +8,35 @@
-
!record {model: stock.period, id: stock_period_01}:
date_start: '2010-07-01 00:00:00'
- date_stop: '2010/07/06 23:59:00'
+ date_stop: '2010-07-06 23:59:00'
name: 2010, week 27
-
I create stock period for the second week of July.
-
!record {model: stock.period, id: stock_period_02}:
- date_start: '2010/07/07 00:00:00'
- date_stop: '2010/07/12 23:59:00'
+ date_start: '2010-07-07 00:00:00'
+ date_stop: '2010-07-12 23:59:00'
name: 2010, week 28
-
I create stock period for the third week of July.
-
!record {model: stock.period, id: stock_period_03}:
- date_start: '2010/07/15 00:00:00'
- date_stop: '2010/07/20 23:59:00'
+ date_start: '2010-07-15 00:00:00'
+ date_stop: '2010-07-20 23:59:00'
name: 2010, week 29
-
I create stock period for the fourth week of July.
-
!record {model: stock.period, id: stock_period_04}:
- date_start: '2010/07/22 00:00:00'
- date_stop: '2010/07/27 23:59:00'
+ date_start: '2010-07-22 00:00:00'
+ date_stop: '2010-07-27 23:59:00'
name: 2010, week 30
-
I create stock period for the fifth week of July.
-
!record {model: stock.period, id: stock_period_05}:
- date_start: '2010/07/29 00:00:00'
- date_stop: '2010/07/31 23:59:00'
+ date_start: '2010-07-29 00:00:00'
+ date_stop: '2010-07-31 23:59:00'
name: 2010, week 31
-
Now I create the forecast for this period for all PCs.