diff --git a/addons/account/account.py b/addons/account/account.py
index 45f798f7487..ffb7b4b2166 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -2414,6 +2414,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
obj_acc_template = self.pool.get('account.account.template')
obj_fiscal_position_template = self.pool.get('account.fiscal.position.template')
obj_fiscal_position = self.pool.get('account.fiscal.position')
+ data_pool = self.pool.get('ir.model.data')
# Creating Account
obj_acc_root = obj_multi.chart_template_id.account_root_id
@@ -2524,7 +2525,10 @@ class wizard_multi_charts_accounts(osv.osv_memory):
# Creating Journals
vals_journal={}
- view_id = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Journal View')])[0]
+ data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_view')])
+ data = data_pool.browse(cr, uid, data_id[0])
+ view_id = data.res_id
+
seq_id = obj_sequence.search(cr, uid, [('name','=','Account Journal')])[0]
if obj_multi.seq_journal:
@@ -2561,8 +2565,15 @@ class wizard_multi_charts_accounts(osv.osv_memory):
obj_journal.create(cr,uid,vals_journal)
# Bank Journals
- view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal View')])[0] #TOFIX: why put fix name
- view_id_cur = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #TOFIX: why put fix name
+ data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view')])
+ data = data_pool.browse(cr, uid, data_id[0])
+ view_id_cash = data.res_id
+ #view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal View')])[0] #TOFIX: why put fix name
+
+ data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view_multi')])
+ data = data_pool.browse(cr, uid, data_id[0])
+ ref_acc_bank = data.res_id
+ #ref_acc_bank = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #TOFIX: why put fix name
ref_acc_bank = obj_multi.chart_template_id.bank_account_view_id
current_num = 1
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 56d83debe4c..e0ac10abb50 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index daae3043a41..80fb20e1fad 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -358,14 +358,11 @@
-
-
-
@@ -1130,10 +1127,6 @@
-
-
-
-
@@ -1179,15 +1172,21 @@
src_model="account.move"/>
- Journal Entries to Review
+ Journal Entries
ir.actions.act_window
account.move
form
- [('to_check','=',True)]
+ [('to_check','=',True), ('state','=','draft')]
-
+
+
+
@@ -1553,7 +1552,7 @@
-
+
@@ -1842,17 +1841,17 @@
search
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
@@ -1878,7 +1877,7 @@
form
@@ -93,24 +93,24 @@
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
+
+
+
diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py
index 41baac36f89..6a19dc988df 100644
--- a/addons/account/wizard/account_invoice_refund.py
+++ b/addons/account/wizard/account_invoice_refund.py
@@ -61,7 +61,8 @@ class account_invoice_refund(osv.osv_memory):
date = False
period = False
description = False
- for inv in inv_obj.browse(cr, uid, context['active_ids'], context=context):
+ company = self.pool.get('res.users').browse(cr, uid, uid).company_id
+ for inv in inv_obj.browse(cr, uid, context.get('active_ids'), context=context):
if inv.state in ['draft', 'proforma2', 'cancel']:
raise osv.except_osv(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode))
if form['period'] :
@@ -77,11 +78,8 @@ class account_invoice_refund(osv.osv_memory):
and name = 'company_id'")
result_query = cr.fetchone()
if result_query:
- cr.execute("""SELECT id
- from account_period where date(%s)
- between date_start AND date_stop \
- and company_id = %s limit 1 """,
- (date, self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id,))
+ cr.execute("""select p.id from account_fiscalyear y, account_period p where y.id=p.fiscalyear_id \
+ and date(%s) between p.date_start AND p.date_stop and y.company_id = %s limit 1""", (date, company.id,))
else:
cr.execute("""SELECT id
from account_period where date(%s)
@@ -154,7 +152,7 @@ class account_invoice_refund(osv.osv_memory):
'tax_line': tax_lines,
'period_id': period,
'name': description
- })
+ })
for field in ('address_contact_id', 'address_invoice_id', 'partner_id',
'account_id', 'currency_id', 'payment_term', 'journal_id'):
@@ -192,4 +190,4 @@ class account_invoice_refund(osv.osv_memory):
account_invoice_refund()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_budget/crossovered_budget_demo.xml b/addons/account_budget/crossovered_budget_demo.xml
index 8e9ba6a9493..7c4c6e3ea15 100644
--- a/addons/account_budget/crossovered_budget_demo.xml
+++ b/addons/account_budget/crossovered_budget_demo.xml
@@ -2,337 +2,337 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account_followup/account_followup_view.xml b/addons/account_followup/account_followup_view.xml
index 50c1cb5df34..82e3450163a 100644
--- a/addons/account_followup/account_followup_view.xml
+++ b/addons/account_followup/account_followup_view.xml
@@ -153,8 +153,8 @@
form
-
+
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 00d12f8063b..13df5a496fc 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -212,9 +212,21 @@ class account_voucher(osv.osv):
self.write(cr, uid, ids, {'state':'posted'})
return True
- def action_cancel_draft(self, cr, uid, ids, *args):
+ def action_cancel_draft(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'draft'})
return True
+
+ def audit_pass(self, cr, uid, ids, context={}):
+ move_pool = self.pool.get('account.move')
+ result = True
+ audit_pass = []
+ for voucher in self.browse(cr, uid, ids):
+ if voucher.move_id and voucher.move_id.state == 'draft':
+ result = result and move_pool.button_validate(cr, uid, [voucher.move_id.id])
+ audit_pass += [voucher.id]
+
+ self.write(cr, uid, audit_pass, {'state':'audit'})
+ return result
def cancel_voucher(self, cr, uid, ids, context={}):
move_pool = self.pool.get('account.move')
@@ -258,7 +270,6 @@ class account_voucher(osv.osv):
company_currency = inv.company_id.currency_id.id
diff_currency_p = inv.currency_id.id <> company_currency
- ref = inv.reference
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
if journal.sequence_id:
@@ -289,7 +300,7 @@ class account_voucher(osv.osv):
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': False,
- 'ref': ref,
+ 'ref': inv.reference,
'date': inv.date
}
if diff_currency_p:
@@ -318,7 +329,7 @@ class account_voucher(osv.osv):
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': line.partner_id.id or False,
- 'ref': ref,
+ 'ref': line.ref,
'date': inv.date,
'analytic_account_id': False
}
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 1d9d1e6a8d0..658b8f8429b 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -199,12 +199,28 @@
+
+
+ Vouchers Entries
+ account.voucher
+ form
+ tree,form
+
+ [('state','=','posted')]
+ {'state':'posted'}
+
+
+
+
diff --git a/addons/account_voucher/voucher_workflow.xml b/addons/account_voucher/voucher_workflow.xml
index 091e84cfd88..f1444761c48 100644
--- a/addons/account_voucher/voucher_workflow.xml
+++ b/addons/account_voucher/voucher_workflow.xml
@@ -18,16 +18,14 @@
proforma
- write({'state':'proforma'})
- open_voucher()
+ open_voucher()
function
done
- write({'state':'posted'})
- proforma_voucher()
+ proforma_voucher()
function
@@ -48,7 +46,7 @@
audit
- write({'state':'audit'})
+ audit_pass()
True
function
diff --git a/addons/account_voucher_payment/account_voucher_payment.py b/addons/account_voucher_payment/account_voucher_payment.py
index 39c67787157..f2c6507181c 100755
--- a/addons/account_voucher_payment/account_voucher_payment.py
+++ b/addons/account_voucher_payment/account_voucher_payment.py
@@ -53,8 +53,7 @@ class account_voucher(osv.osv):
company_currency = inv.company_id.currency_id.id
diff_currency_p = inv.currency_id.id <> company_currency
- ref = inv.reference
-
+
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
if journal.sequence_id:
name = sequence_pool.get_id(cr, uid, journal.sequence_id.id)
@@ -84,7 +83,7 @@ class account_voucher(osv.osv):
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': False,
- 'ref': ref,
+ 'ref': inv.reference,
'date': inv.date
}
if diff_currency_p:
@@ -113,7 +112,7 @@ class account_voucher(osv.osv):
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': line.partner_id.id or False,
- 'ref': ref,
+ 'ref': line.ref,
'date': inv.date,
'analytic_account_id': False
}
@@ -198,7 +197,8 @@ class account_voucher_line(osv.osv):
res.update({
'amount': residual,
- 'account_id': invoice.account_id.id
+ 'account_id': invoice.account_id.id,
+ 'ref':invoice.number
})
return {
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index 2b47140e396..41eeb529154 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -1,81 +1,105 @@
-
+
-
-
- New
-
-
-
-
- Assigned
-
-
-
-
- In Process
-
-
-
-
- Converted
-
-
-
-
- Recycled
-
-
-
-
- Dead
-
-
-
+
+
+ New
+
+
+
+
+
-
-
- Telesales
-
-
-
-
- Mail
-
-
-
-
- Email
-
-
-
-
- Print
-
-
-
-
- Web
-
-
-
-
- Radio
-
-
-
-
- Television
-
-
-
-
- Newsletter
-
-
-
+
+ Qualification
+
+
+
+
+
-
+
+ Proposition
+
+
+
+
+
+
+
+ Negotiation
+
+
+
+
+
+
+
+ Win
+
+
+
+
+
+
+
+ Lost
+
+
+
+
+
+
+
+
+ Telesales
+
+
+
+
+
+ Mail
+
+
+
+
+
+ Email
+
+
+
+
+
+ Print
+
+
+
+
+
+ Web
+
+
+
+
+
+ Radio
+
+
+
+
+
+ Television
+
+
+
+
+
+ Newsletter
+
+
+
+
+
diff --git a/addons/crm/crm_opportunity_data.xml b/addons/crm/crm_opportunity_data.xml
index a7cfd2d46ca..fd4d76d5865 100644
--- a/addons/crm/crm_opportunity_data.xml
+++ b/addons/crm/crm_opportunity_data.xml
@@ -1,6 +1,6 @@
-
+
Existing Customer
@@ -42,43 +42,6 @@
-
-
- Prospecting
-
-
-
-
- Needs Analysis
-
-
-
-
- Value Proposition
-
-
-
-
- Proposal/Price Quote
-
-
-
-
- Negotiation/Review
-
-
-
-
- Closed Won
-
-
-
-
- Closed Lost
-
-
-
-
Existing Business
diff --git a/addons/crm/crm_opportunity_demo.xml b/addons/crm/crm_opportunity_demo.xml
index 3c06d16dc19..48812b17cf0 100644
--- a/addons/crm/crm_opportunity_demo.xml
+++ b/addons/crm/crm_opportunity_demo.xml
@@ -20,7 +20,7 @@
-
+
@@ -36,7 +36,7 @@
-
+
@@ -53,7 +53,7 @@
-
+
@@ -70,7 +70,7 @@
-
+
@@ -86,7 +86,7 @@
-
+
diff --git a/addons/crm/test/test_crm_opportunity.yml b/addons/crm/test/test_crm_opportunity.yml
index e3a4f28cb5e..48a71de1dce 100644
--- a/addons/crm/test/test_crm_opportunity.yml
+++ b/addons/crm/test/test_crm_opportunity.yml
@@ -8,7 +8,7 @@
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
probability: 1.0
- stage_id: crm.stage_oppor1
+ stage_id: crm.stage_lead1
categ_id: crm.categ_oppor2
section_id: crm.section_sales_department
diff --git a/addons/crm/wizard/crm_lead_to_partner_view.xml b/addons/crm/wizard/crm_lead_to_partner_view.xml
index 2f7f8540e7f..8b9c0d1fee9 100644
--- a/addons/crm/wizard/crm_lead_to_partner_view.xml
+++ b/addons/crm/wizard/crm_lead_to_partner_view.xml
@@ -1,25 +1,6 @@
-
-
-
- crm.lead2partner.view.create
- crm.lead2partner
- form
-
-
-
-
-
@@ -28,6 +9,9 @@
form
diff --git a/addons/crm/wizard/crm_phonecall_to_phonecall.py b/addons/crm/wizard/crm_phonecall_to_phonecall.py
index d22e70303d7..f288fd2d5b7 100644
--- a/addons/crm/wizard/crm_phonecall_to_phonecall.py
+++ b/addons/crm/wizard/crm_phonecall_to_phonecall.py
@@ -73,8 +73,8 @@ class crm_phonecall2phonecall(osv.osv_memory):
values = {
'name': this.name,
'user_id': this.user_id and this.user_id.id,
- 'categ_id': phonecall.categ_id and phonecall.categ_id.id or False,
- 'section_id': phonecall.section_id and phonecall.section_id.id,
+ 'categ_id': this.categ_id.id,
+ 'section_id': this.section_id.id or (phonecall.section_id and phonecall.section_id.id),
'description': phonecall.description or '',
'partner_id': phonecall.partner_id.id,
'partner_address_id': phonecall.partner_address_id.id,
@@ -94,7 +94,7 @@ class crm_phonecall2phonecall(osv.osv_memory):
'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
'res_id': phonecall_id,
- 'domain': [('id', 'in', [int(phonecall_id)])],
+ 'domain': [('id', '=', phonecall_id)],
'search_view_id': res['res_id']
}
return res
@@ -102,7 +102,10 @@ class crm_phonecall2phonecall(osv.osv_memory):
_columns = {
'name' : fields.char('Call summary', size=64, required=True, select=1),
'user_id' : fields.many2one('res.users',"Assign To"),
- 'date': fields.datetime('Date'),
+ 'categ_id': fields.many2one('crm.case.categ', 'Category', required=True, \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.phonecall')]"),
+ 'date': fields.datetime('Date', required=True),
'section_id':fields.many2one('crm.case.section','Sales Team'),
}
@@ -119,10 +122,16 @@ class crm_phonecall2phonecall(osv.osv_memory):
"""
res = super(crm_phonecall2phonecall, self).default_get(cr, uid, fields, context=context)
record_id = context and context.get('active_id', False) or False
-
+
if record_id:
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, record_id, context=context)
+ categ_id = False
+ data_obj = self.pool.get('ir.model.data')
+ res_id = data_obj._get_id(cr, uid, 'crm', 'categ_phone2')
+ if res_id:
+ categ_id = data_obj.browse(cr, uid, res_id, context=context).res_id
+
if 'name' in fields:
res.update({'name': phonecall.name})
if 'user_id' in fields:
@@ -131,7 +140,8 @@ class crm_phonecall2phonecall(osv.osv_memory):
res.update({'date': phonecall.date})
if 'section_id' in fields:
res.update({'section_id': phonecall.section_id and phonecall.section_id.id or False})
-
+ if 'categ_id' in fields:
+ res.update({'categ_id': categ_id})
return res
crm_phonecall2phonecall()
diff --git a/addons/crm/wizard/crm_phonecall_to_phonecall_view.xml b/addons/crm/wizard/crm_phonecall_to_phonecall_view.xml
index cdc673d0e65..34a0d2c158e 100644
--- a/addons/crm/wizard/crm_phonecall_to_phonecall_view.xml
+++ b/addons/crm/wizard/crm_phonecall_to_phonecall_view.xml
@@ -10,16 +10,18 @@
form
@@ -36,4 +38,4 @@
-
\ No newline at end of file
+
diff --git a/addons/l10n_ch/demo/vaudtax_data_demo.xml b/addons/l10n_ch/demo/vaudtax_data_demo.xml
index 1da57c59ff4..cf00001a81b 100644
--- a/addons/l10n_ch/demo/vaudtax_data_demo.xml
+++ b/addons/l10n_ch/demo/vaudtax_data_demo.xml
@@ -1,88 +1,84 @@
-
- My bank !
- banq
- Banque
-
-
-
- +41 31 622 13 00
- Marc Dufour
- 1015
- Lausanne
-
-
- M.
- tinyerp@bank.com
- +41 24 620 10 12
- PSE-C
- 1
- default
-
+
+ My bank !
+ banq
+ Banque
+
+
+
+ +41 31 622 13 00
+ Marc Dufour
+ 1015
+ Lausanne
+
+
+ tinyerp@bank.com
+ +41 24 620 10 12
+ PSE-C
+ 1
+ default
+
-
- Very good company!
- They provides a very high quality service.
- ProL
- http://camptocamp.com
- ProLibre
-
-
+
+ Very good company!
+ They provides a very high quality service.
+ ProL
+ http://camptocamp.com
+ ProLibre
+
+
-
- Very good company!
- They provides a very high quality service.
- c2c
- http://camptocamp.com
- camptocamp SA
-
-
-
+
+ Very good company!
+ They provides a very high quality service.
+ c2c
+ http://camptocamp.com
+ camptocamp SA
+
+
+
-
- +41 21 619 10 00
- Luc Maurer
- 1015
- Lausanne
-
-
- M.
- tinyerp@camptocamp.com
- +41 21 619 10 12
- PSE-A, EPFL
- 1
- default
-
-
- Gilbert Robert
- 1227
- Carouge
-
-
- M.
- info@prolibre.com
- +41 22 3015383
- 18, rue des Moraines
- 1
- default
-
-
- +41 21 619 10 00
- Claude Philipona
- 1015
- Lausanne
-
-
- M.
- tinyerp@camptocamp.com
- +41 21 619 10 12
- PSE-A, EPFL
- 1
- default
-
-
+
+ +41 21 619 10 00
+ Luc Maurer
+ 1015
+ Lausanne
+
+
+ tinyerp@camptocamp.com
+ +41 21 619 10 12
+ PSE-A, EPFL
+ 1
+ default
+
+
+ Gilbert Robert
+ 1227
+ Carouge
+
+
+ info@prolibre.com
+ +41 22 3015383
+ 18, rue des Moraines
+ 1
+ default
+
+
+ +41 21 619 10 00
+ Claude Philipona
+ 1015
+ Lausanne
+
+
+ tinyerp@camptocamp.com
+ +41 21 619 10 12
+ PSE-A, EPFL
+ 1
+ default
+
+