diff --git a/addons/account/account.py b/addons/account/account.py
index 0c4218a3ef5..31ad948360e 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1716,21 +1716,28 @@ account_subscription_line()
class account_config_wizard(osv.osv_memory):
_name = 'account.config.wizard'
+ _inherit = 'res.config'
def _get_charts(self, cr, uid, context):
module_obj=self.pool.get('ir.module.module')
- ids=module_obj.search(cr, uid, [('category_id', '=', 'Account Charts'), ('state', '<>', 'installed')])
+ ids=module_obj.search(cr, uid, [('category_id', '=', 'Account Charts'),
+ ('state', '<>', 'installed')])
res=[(m.id, m.shortdesc) for m in module_obj.browse(cr, uid, ids)]
res.append((-1, 'None'))
res.sort(key=lambda x: x[1])
return res
_columns = {
- 'name':fields.char('Name', required=True, size=64, help="Name of the fiscal year as displayed on screens."),
- 'code':fields.char('Code', required=True, size=64, help="Name of the fiscal year as displayed in reports."),
+ 'name':fields.char(
+ 'Name', required=True, size=64,
+ help="Name of the fiscal year as displayed on screens."),
+ 'code':fields.char(
+ 'Code', required=True, size=64,
+ help="Name of the fiscal year as displayed in reports."),
'date1': fields.date('Start Date', required=True),
'date2': fields.date('End Date', required=True),
- 'period':fields.selection([('month','Month'),('3months','3 Months')], 'Periods', required=True),
+ 'period':fields.selection([('month','Month'), ('3months','3 Months')],
+ 'Periods', required=True),
'charts' : fields.selection(_get_charts, 'Charts of Account',required=True)
}
_defaults = {
@@ -1740,15 +1747,6 @@ class account_config_wizard(osv.osv_memory):
'date2': lambda *a: time.strftime('%Y-12-31'),
'period':lambda *a:'month',
}
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
def install_account_chart(self, cr, uid, ids, context=None):
for res in self.read(cr,uid,ids):
chart_id = res['charts']
@@ -1758,7 +1756,7 @@ class account_config_wizard(osv.osv_memory):
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
- def action_create(self, cr, uid,ids, context=None):
+ def execute(self, cr, uid, ids, context=None):
for res in self.read(cr,uid,ids):
if 'date1' in res and 'date2' in res:
res_obj = self.pool.get('account.fiscalyear')
@@ -1777,16 +1775,6 @@ class account_config_wizard(osv.osv_memory):
elif res['period']=='3months':
res_obj.create_period3(cr,uid,[new_id])
self.install_account_chart(cr,uid,ids)
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
-
-
account_config_wizard()
@@ -2125,6 +2113,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
* generates all accounting properties and assigns them correctly
"""
_name='wizard.multi.charts.accounts'
+ _inherit = 'res.config'
_columns = {
'company_id':fields.many2one('res.company','Company',required=True),
@@ -2145,7 +2134,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'code_digits': lambda *a:6,
}
- def action_create(self, cr, uid, ids, context=None):
+ def execute(self, cr, uid, ids, context=None):
obj_multi = self.browse(cr,uid,ids[0])
obj_acc = self.pool.get('account.account')
obj_acc_tax = self.pool.get('account.tax')
@@ -2408,24 +2397,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'position_id' : new_fp,
}
obj_ac_fp.create(cr, uid, vals_acc)
-
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
-
wizard_multi_charts_accounts()
class account_bank_accounts_wizard(osv.osv_memory):
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index c3df794dc1b..8bfa2882afd 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1447,8 +1447,13 @@
Account Configure wizardaccount.config.wizardform
+
-
+
+
+
@@ -1471,11 +1472,16 @@
Account Configure Wizard ir.actions.act_windowaccount.config.wizard
+ formformnew
+
+
+
+ Account Add wizard
@@ -1500,16 +1506,6 @@
src_model="account.account.template"
view_type="form" view_mode="form"/>
-
-
-
- Account Configure Wizard
- Define Fiscal Years and Select Charts of Account
-
-
-
-
-
@@ -1764,6 +1767,7 @@
Generate Chart of Accounts from a Chart Templateir.actions.act_windowwizard.multi.charts.accounts
+ formformnew
diff --git a/addons/account/company.py b/addons/account/company.py
index 91f4c76241c..e3a1979daf2 100644
--- a/addons/account/company.py
+++ b/addons/account/company.py
@@ -42,10 +42,10 @@ class company_setup(osv.osv_memory):
* Insert a suitable message for Overdue Payment Report.
"""
_name='wizard.company.setup'
+ _inherit = 'res.config'
_columns = {
'company_id':fields.many2one('res.company','Company',required=True),
- 'partner_id':fields.many2one('res.partner','Partner'),
'overdue_msg': fields.text('Overdue Payment Message'),
}
def get_message(self,cr,uid,context={}):
@@ -57,42 +57,28 @@ class company_setup(osv.osv_memory):
_defaults = {
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr,uid,[uid],c)[0].company_id.id,
- 'partner_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr,uid,[uid],c)[0].company_id.partner_id.id,
'overdue_msg': get_message,
}
def onchange_company_id(self, cr, uid, ids, company, context=None):
- res = {}
if not company:
return {}
comp_obj = self.pool.get('res.company').browse(cr,uid,company)
- res['partner_id'] = comp_obj.partner_id.id
- phone = comp_obj.partner_id.address and (comp_obj.partner_id.address[0].phone and ' at ' + str(comp_obj.partner_id.address[0].phone) + '.' or '.') or '.'
- res['overdue_msg'] = comp_obj.overdue_msg + str(phone)
-
- return {'value': res }
+ partner_address = comp_obj.partner_id.address
+ if partner_address and partner_address[0].phone:
+ msg_tail = ' at %s.'%(partner_address[0].phone)
+ else:
+ msg_tail = '.'
- def action_create(self, cr, uid, ids, context=None):
- content_wiz = self.pool.get('wizard.company.setup').read(cr,uid,ids,['company_id','overdue_msg'])
+ return {'value': {'overdue_msg': comp_obj.overdue_msg + msg_tail } }
+
+ def execute(self, cr, uid, ids, context=None):
+ content_wiz = self.pool.get('wizard.company.setup')\
+ .read(cr,uid,ids,['company_id','overdue_msg'])
if content_wiz:
wiz_data = content_wiz[0]
- self.pool.get('res.company').write(cr, uid, [wiz_data['company_id']], {'overdue_msg':wiz_data['overdue_msg']})
-
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
+ self.pool.get('res.company').write(
+ cr, uid,
+ [wiz_data['company_id']],
+ {'overdue_msg':wiz_data['overdue_msg']})
company_setup()
diff --git a/addons/account/company_view.xml b/addons/account/company_view.xml
index 1d4571e0d4f..31f8e03a6b3 100644
--- a/addons/account/company_view.xml
+++ b/addons/account/company_view.xml
@@ -22,17 +22,21 @@
wizard.company.setup.formwizard.company.setupform
+
-
-
-
+
+
+ Overdue Payment Report Message
+
+
+
-
-
-
-
-
+
+
+
@@ -40,6 +44,7 @@
Overdue Payment Report Messageir.actions.act_windowwizard.company.setup
+ formformnew
@@ -48,8 +53,6 @@
- Overdue Payment Report Message
- Specify The Message for the Overdue Payment Report.
diff --git a/addons/base_setup/wizard/wizard_base_setup.py b/addons/base_setup/wizard/wizard_base_setup.py
index eeca36fa5da..0dd9175129d 100644
--- a/addons/base_setup/wizard/wizard_base_setup.py
+++ b/addons/base_setup/wizard/wizard_base_setup.py
@@ -241,8 +241,9 @@ class wizard_base_setup(wizard.interface):
return 'charts'
def _config(self, cr, uid, data, context=None):
- users_obj=pooler.get_pool(cr.dbname).get('res.users')
- action_obj=pooler.get_pool(cr.dbname).get('ir.actions.act_window')
+ pool = pooler.get_pool(cr.dbname)
+ users_obj=pool.get('res.users')
+ action_obj=pool.get('ir.actions.act_window')
ids=action_obj.search(cr, uid, [('name', '=', 'Menu')])
menu=action_obj.browse(cr, uid, ids)[0]
@@ -251,14 +252,8 @@ class wizard_base_setup(wizard.interface):
users_obj.write(cr, uid, ids, {'action_id': menu.id})
ids=users_obj.search(cr, uid, [('menu_id', '=', 'Setup')])
users_obj.write(cr, uid, ids, {'menu_id': menu.id})
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'context':{'menu':True},
- 'target':'new',
- }
+
+ return pool.get('res.config').next(cr, uid, [], context=context)
fields={
'profile':{
diff --git a/addons/crm/crm_config.py b/addons/crm/crm_config.py
index 5fea8dcd343..60a73df3a33 100644
--- a/addons/crm/crm_config.py
+++ b/addons/crm/crm_config.py
@@ -118,18 +118,33 @@ crm_cases()
class crm_menu_config_wizard(osv.osv_memory):
_name = 'crm.menu.config_wizard'
+ _inherit = 'res.config'
+
_columns = {
'name': fields.char('Name', size=64),
- 'meeting': fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."),
- 'lead': fields.boolean('Leads', help="Allows you to track and manage leads which are pre-sales requests or contacts, the very first contact with a customer request."),
- 'opportunity': fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."),
- 'jobs': fields.boolean('Jobs Hiring Process', help="Helps you to organise the jobs hiring process: evaluation, meetings, email integration..."),
- 'document_ics': fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."),
- 'bugs': fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on software"),
- 'helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
- 'fund': fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."),
- 'claims': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."),
- 'phonecall': fields.boolean('Phone Calls', help="Helps you to encode the result of a phone call or to plan a list of phone calls to process."),
+ 'meeting': fields.boolean('Meetings Calendar',
+ help="Manages each user's meetings calendar"),
+ 'lead': fields.boolean('Leads', help="Tracks and manages leads"),
+ 'opportunity': fields.boolean('Business Opportunities',
+ help="Tracks identified business opportunities"),
+ 'jobs': fields.boolean('Jobs Hiring Process',
+ help="Helps you organise your hiring process (evaluation, "\
+ "meetings, email integration...)"),
+ 'document_ics': fields.boolean('Shared Calendar',
+ help="Lets you use your OpenERP calendars in third-party systems "\
+ "(smartphones, Microsoft Outlook, iCal, Google Calendar..."),
+ 'bugs': fields.boolean('Bug Tracking',
+ help="Track bugs and support requests on software"),
+ 'helpdesk': fields.boolean('Helpdesk',
+ help="Manages an Helpdesk service."),
+ 'fund': fields.boolean('Fund Raising Operations',
+ help="Provides processing and tracking for fund raisings"),
+ 'claims': fields.boolean('Claims',
+ help="Manages supplier and customers claims, including "\
+ "corrective or preventive actions"),
+ 'phonecall': fields.boolean('Phone Calls',
+ help="Lets users encode phone call outcomes or phone calls to "\
+ "perform"),
}
_defaults = {
'meeting': lambda *args: True,
@@ -137,29 +152,28 @@ class crm_menu_config_wizard(osv.osv_memory):
'phonecall': lambda *args: True,
}
- def action_create(self, cr, uid, ids, context=None):
- module_proxy = self.pool.get('ir.module.module')
- modid = module_proxy.search(cr, uid, [('name', '=', 'crm')])
- moddemo = module_proxy.browse(cr, uid, modid[0]).demo
+ def execute(self, cr, uid, ids, context=None):
+ modobj = self.pool.get('ir.module.module')
+ modids = modobj.search(cr, uid, [('name', '=', 'crm')])
+ moddemo = modobj.browse(cr, uid, modids[0]).demo
lst = ('data', 'menu')
if moddemo:
lst = ('data', 'menu', 'demo')
res = self.read(cr, uid, ids)[0]
- idref = {}
for section in ['meeting', 'lead', 'opportunity', 'jobs', 'bugs', 'fund', 'helpdesk', 'claims', 'phonecall']:
if (not res[section]):
continue
for fname in lst:
- file_name = 'crm_' + section + '_' + fname + '.xml'
+ file_name = 'crm_%s_%s.xml'%(section, fname)
try:
- fp = tools.file_open(os.path.join('crm', file_name))
- except IOError, e:
- fp = None
- if fp:
- tools.convert_xml_import(cr, 'crm', fp, idref, 'init', noupdate=True)
+ tools.convert_xml_import(
+ cr, 'crm',
+ tools.file_open(os.path.join('crm', file_name)),
+ {}, 'init', noupdate=True)
+ except IOError:
+ pass
+
cr.commit()
- modobj = self.pool.get('ir.module.module')
- modids = modobj.search(cr, uid, [('name', '=', 'crm')])
modobj.update_translations(cr, 1, modids, None)
if res['document_ics']:
@@ -167,24 +181,6 @@ class crm_menu_config_wizard(osv.osv_memory):
module_proxy.button_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
-
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
- def action_cancel(self, cr, uid, ids, context=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
crm_menu_config_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_ftp/doc_conf_wizard.py b/addons/document_ftp/doc_conf_wizard.py
index 5ef7f828c30..72011c39759 100644
--- a/addons/document_ftp/doc_conf_wizard.py
+++ b/addons/document_ftp/doc_conf_wizard.py
@@ -28,11 +28,14 @@ import urlparse
import os
class document_configuration_wizard(osv.osv_memory):
+
_name='document.configuration.wizard'
- _rec_name = 'Auto Directory configuration'
+ _description = 'Auto Directory configuration'
+ _inherit = 'res.config'
+ _rec_name = 'host'
_columns = {
- 'host': fields.char('Server Address', size=64, help="Put here the server address or IP. " \
- "Keep localhost if you don't know what to write.", required=True)
+ 'host': fields.char('Address', size=64,
+ help="Server address or IP.", required=True),
}
def detect_ip_addr(self, cr, uid, context=None):
@@ -73,16 +76,7 @@ class document_configuration_wizard(osv.osv_memory):
'host': detect_ip_addr,
}
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
- def action_config(self, cr, uid, ids, context=None):
+ def execute(self, cr, uid, ids, context=None):
conf = self.browse(cr, uid, ids[0], context)
obj=self.pool.get('document.directory')
objid=self.pool.get('ir.model.data')
@@ -152,12 +146,4 @@ class document_configuration_wizard(osv.osv_memory):
aid = objid._get_id(cr, uid, 'document_ftp', 'action_document_browse')
aid = objid.browse(cr, uid, aid, context=context).res_id
self.pool.get('ir.actions.url').write(cr, uid, [aid], {'url': 'ftp://'+(conf.host or 'localhost')+':8021/'})
-
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
document_configuration_wizard()
diff --git a/addons/document_ftp/document_ftp_view.xml b/addons/document_ftp/document_ftp_view.xml
index 793dbfb7dea..0968b2651d5 100644
--- a/addons/document_ftp/document_ftp_view.xml
+++ b/addons/document_ftp/document_ftp_view.xml
@@ -1,5 +1,5 @@
-
+
Browse Filesftp://localhost:8021/
@@ -12,25 +12,26 @@
icon="STOCK_EXECUTE"
parent="document.menu_document"/>
-
-
-
Auto Configure Directorydocument.configuration.wizardform
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Auto Configure
+
+
+
+
+
+
+
+
+
@@ -38,19 +39,15 @@
Auto Configure Directoryir.actions.act_windowdocument.configuration.wizard
+ formformnew
- Auto Configure Directory
- This wizard will configure the URL of the server of the document management system.
-
-
-
-
+
diff --git a/addons/document_ics/document_ics_config_wizard.py b/addons/document_ics/document_ics_config_wizard.py
index 6d7cf665dbc..8c35b973c1c 100644
--- a/addons/document_ics/document_ics_config_wizard.py
+++ b/addons/document_ics/document_ics_config_wizard.py
@@ -50,6 +50,8 @@ ICS_TAGS = {
class document_ics_crm_wizard(osv.osv_memory):
_name='document.ics.crm.wizard'
+ _inherit = 'res.config'
+
_columns = {
'name':fields.char('Name', size=64),
'meeting' : fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."),
@@ -69,7 +71,7 @@ class document_ics_crm_wizard(osv.osv_memory):
'phonecall': lambda *args: True,
}
- def action_create(self, cr, uid, ids, context=None):
+ def execute(self, cr, uid, ids, context=None):
data=self.read(cr, uid, ids, [])[0]
dir_obj = self.pool.get('document.directory')
dir_cont_obj = self.pool.get('document.directory.content')
@@ -79,16 +81,12 @@ class document_ics_crm_wizard(osv.osv_memory):
else:
dir_id = dir_obj.create(cr, uid, {'name': 'Calendars' ,'user_id' : uid, 'type': 'directory'})
for section in ['meeting', 'lead', 'opportunity', 'jobs', 'bugs', 'fund', 'helpdesk', 'claims', 'phonecall']:
- if (not data[section]):
- continue
- else:
+ if data[section]:
section_id=self.pool.get('crm.case.section').search(cr, uid, [('name', '=', SECTION_NAME[section])])
- if not section_id:
- continue
- else:
+ if section_id:
object_id=self.pool.get('ir.model').search(cr, uid, [('name', '=', 'Case')])[0]
- vals_cont={
+ vals_cont = {
'name': SECTION_NAME[section],
'sequence': 1,
'directory_id': dir_id,
@@ -104,29 +102,12 @@ class document_ics_crm_wizard(osv.osv_memory):
ics_obj=self.pool.get('document.directory.ics.fields')
for tag in ['description', 'url', 'summary', 'dtstart', 'dtend', 'uid']:
field_id = self.pool.get('ir.model.fields').search(cr, uid, [('model_id.name', '=', 'Case'), ('field_description', '=', ICS_TAGS[tag])])[0]
- vals_ics={
- 'field_id': field_id ,
- 'name': tag ,
- 'content_id': content_id ,
- }
+ vals_ics = {
+ 'field_id': field_id ,
+ 'name': tag ,
+ 'content_id': content_id ,
+ }
ics_obj.create(cr, uid, vals_ics)
-
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
- def action_cancel(self, cr, uid, ids, conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
document_ics_crm_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_ics/document_ics_config_wizard.xml b/addons/document_ics/document_ics_config_wizard.xml
index 9c2132bc89d..2f25ccce5db 100644
--- a/addons/document_ics/document_ics_config_wizard.xml
+++ b/addons/document_ics/document_ics_config_wizard.xml
@@ -1,30 +1,36 @@
-
-
+ Configure Calendars for Sectionsdocument.ics.crm.wizardform
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Configure Calendars for CRM Sections
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -32,19 +38,16 @@
Configure Calendars for Sections ir.actions.act_windowdocument.ics.crm.wizard
+ formformnew
-
+
- Create Calendars for CRM Case Section
- This Configuration step use to create Calendars in document for all Case Sections
-
-
-
+
-
+
diff --git a/addons/l10n_be/l10n_be_wizard.xml b/addons/l10n_be/l10n_be_wizard.xml
index b170bc93f4d..c20f1c62420 100644
--- a/addons/l10n_be/l10n_be_wizard.xml
+++ b/addons/l10n_be/l10n_be_wizard.xml
@@ -49,9 +49,6 @@
id="partner_intra_vat_menu"/>
- Generate Chart of Accounts from a Chart Template
- Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
-This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.
diff --git a/addons/l10n_ch/account_journal_view.xml b/addons/l10n_ch/account_journal_view.xml
index cfe3db3573d..120bb1565ea 100755
--- a/addons/l10n_ch/account_journal_view.xml
+++ b/addons/l10n_ch/account_journal_view.xml
@@ -4,41 +4,45 @@
account.journal.todo.formaccount.journal.todoform
+
-
+
+
+
+
+
+
+
+
+
+
-
- Configure Journal
+
+ Finalize your tax configurationir.actions.act_windowaccount.tax.template.todoformform
-
+ new
-
-
- Finalize your tax configuration
- Set account on financial taxes defined by
- Camptocamp l10n_ch_c2c_pcg module5
diff --git a/addons/l10n_ch_chart_c2c_pcg/wizard/config.py b/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
index 9503bb03ecd..07ee7a6efe0 100755
--- a/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
+++ b/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.3
+#!/usr/bin/env python
#
# config.py
#
@@ -7,54 +7,36 @@
#
from osv import fields, osv
-
-class Tax_template(osv.osv):
- """Creat account.journal.todo class in order
+class Tax_template(osv.osv_memory):
+ """Creat account.journal.todo class in order
to add configuration wizzard"""
-
_name ="account.tax.template.todo"
-
-
-
- def _get_tax(self, cr, uid, ctx):
- if not self.__dict__.has_key('_inner_steps') :
+ _inherit = 'res.config'
+
+ def _ensure_step(self):
+ if getattr(self, '_inner_steps', None) is None:
self._inner_steps = 0
+
+ def _current_tax_template(self, cr, uid):
ids = self.pool.get('account.tax.template').search(cr,uid,[])
- if self._inner_steps == 'done' :
- return False
- return ids[self._inner_steps]
-
+ return self.pool.get('account.tax.template').browse(
+ cr, uid, ids[self._inner_steps]
+ )
+
+ def _get_tax(self, cr, uid, ctx):
+ self._ensure_step()
+ return self.pool.get('account.tax.template')\
+ .search(cr,uid,[])[self._inner_steps]
def _get_collected(self, cr, uid, ctx):
- if not self.__dict__.has_key('_inner_steps') :
- self._inner_steps = 0
- if self._inner_steps == 'done' :
- return False
- ids = self.pool.get('account.tax.template').search(cr,uid,[])
- id = self.pool.get('account.tax.template').browse(
- cr,
- uid,
- ids[self._inner_steps]
- ).account_collected_id.id
-
- return id
-
+ self._ensure_step()
+ return self._current_tax_template(cr, uid).account_collected_id.id
+
def _get_paid(self, cr, uid, ctx):
- if not self.__dict__.has_key('_inner_steps') :
- self._inner_steps = 0
- if self._inner_steps == 'done' :
- return False
- ids = self.pool.get('account.tax.template').search(cr,uid,[])
- id = self.pool.get('account.tax.template').browse(
- cr,
- uid,
- ids[self._inner_steps]
- ).account_paid_id.id
-
- return id
-
-
- _columns={
+ self._ensure_step()
+ return self._current_tax_template(cr, uid).account_paid_id.id
+
+ _columns = {
'name': fields.many2one(
'account.tax.template',
'Tax to set',
@@ -62,84 +44,50 @@ class Tax_template(osv.osv):
help="The tax template you are currently editing"
),
'account_collected_id':fields.many2one(
- 'account.account.template',
- 'Invoice Tax Account',
- help="You can set \
- here the invoice tax account"
- ),
+ 'account.account.template',
+ 'Invoice Tax Account',
+ help="You can set here the invoice tax account"
+ ),
'account_paid_id':fields.many2one(
- 'account.account.template',
- 'Refund Tax Account',
- help="You can set \
- here the refund tax account"
- ),
-
- }
+ 'account.account.template',
+ 'Refund Tax Account',
+ help="You can set here the refund tax account"
+ ),
+ }
_defaults = {
'name': _get_tax,
- 'account_collected_id':_get_collected,
- 'account_paid_id':_get_paid,
+ 'account_collected_id': _get_collected,
+ 'account_paid_id': _get_paid,
}
-
- def on_change_collected(self, cr, uid, id, tax, account) :
- if account :
+
+ def _on_change(self, cr, uid, id, tax, vals):
+ if account:
self.pool.get('account.tax.template').write(
- cr,
- uid,
- tax,
- vals={
- 'account_collected_id': account,
- }
- )
-
-
-
- return {}
-
- def on_change_paid(self, cr, uid, id, tax, account) :
- if account :
- self.pool.get('account.tax.template').write(
- cr,
- uid,
- tax,
- vals={
- 'account_paid_id': account,
- }
- )
+ cr, uid, tax, vals=vals)
return {}
+ def on_change_collected(self, cr, uid, id, tax, account):
+ return self._on_change(
+ cr, uid, ids, tax, vals={'account_collected_id': account})
+ def on_change_paid(self, cr, uid, id, tax, account):
+ return self._on_change(
+ cr, uid, ids, tax, vals={'account_paid_id': account})
- def action_cancel(self,cr,uid,ids,context=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
- def action_new(self,cr,uid,ids,context={}):
+ def execute(self,cr,uid,ids,context={}):
jids = self.pool.get('account.tax.template').search(cr, uid, [])
if self._inner_steps < len(jids)-1 :
self._inner_steps += 1
- else :
- self._inner_steps = 'done'
- return {
+ return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'account.tax.template.todo',
'view_id':self.pool.get('ir.ui.view').search(
- cr,
- uid,
- [('name','=','view_account_journal_form_todo')]
- ),
+ cr, uid, [('name','=','account.tax.template.todo')]),
'type': 'ir.actions.act_window',
'target':'new',
- }
-
-
+ }
Tax_template()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_lu/l10n_lu_wizard.xml b/addons/l10n_lu/l10n_lu_wizard.xml
index 6987cf931f5..cbbf76975c4 100644
--- a/addons/l10n_lu/l10n_lu_wizard.xml
+++ b/addons/l10n_lu/l10n_lu_wizard.xml
@@ -3,9 +3,6 @@
- Generate Chart of Accounts from a Chart Template
- Generate Chart of Accounts from a Chart Template. You will be asked to select the company, the chart template, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
-This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.
diff --git a/addons/profile_accounting/profile_accounting.py b/addons/profile_accounting/profile_accounting.py
index 031cc43a74d..b067beea049 100644
--- a/addons/profile_accounting/profile_accounting.py
+++ b/addons/profile_accounting/profile_accounting.py
@@ -24,6 +24,8 @@ import pooler
class profile_accounting_config_install_modules_wizard(osv.osv_memory):
_name='profile.accounting.config.install_modules_wizard'
+ _inherit = 'res.config'
+
_columns = {
'name':fields.char('Name', size=64),
'account_analytic_analysis':fields.boolean('Analytic Accounting'),
@@ -33,38 +35,18 @@ class profile_accounting_config_install_modules_wizard(osv.osv_memory):
'hr_timesheet_invoice':fields.boolean('Invoice on Analytic Entries'),
'account_budget':fields.boolean('Budgets', help="Helps you to manage financial and analytic budgets."),
'board_document':fields.boolean('Document Management',help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
-
-
}
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
- def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ def execute(self, cr, uid, ids, context=None):
+ result = self.read(cr, uid, ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
- if r<>'id' and res[r]:
+ if r != 'id' and res[r]:
ids += mod_obj.search(cr, uid, [('name', '=', r)])
mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
- db, pool = pooler.restart_pool(cr.dbname,update_module=True)
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
-
-
+ db, pool = pooler.restart_pool(cr.dbname, update_module=True)
profile_accounting_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_accounting/profile_accounting.xml b/addons/profile_accounting/profile_accounting.xml
index ab82f8a69c6..e3d3c973405 100644
--- a/addons/profile_accounting/profile_accounting.xml
+++ b/addons/profile_accounting/profile_accounting.xml
@@ -5,25 +5,29 @@
Accounting Profile : Install extra modulesprofile.accounting.config.install_modules_wizardform
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Install Extra Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -31,16 +35,15 @@
Accounting Profile : Install Extra Modulesir.actions.act_windowprofile.accounting.config.install_modules_wizard
+ formformnew
-
- Accounting Profile : Install Extra modules
- Install more modules. A few modules are proposed according to the Account Profile you selected. You will be able to install them based on our requirements.
-
+
+
diff --git a/addons/profile_association/profile_association.py b/addons/profile_association/profile_association.py
index e8b637dfec9..013052222e7 100644
--- a/addons/profile_association/profile_association.py
+++ b/addons/profile_association/profile_association.py
@@ -25,6 +25,8 @@ import pooler
class profile_association_config_install_modules_wizard(osv.osv_memory):
_name='profile.association.config.install_modules_wizard'
+ _inherit = 'res.config'
+
_columns = {
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
'project':fields.boolean('Project Management'),
@@ -36,30 +38,15 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
'wiki': fields.boolean('Wiki',
help="An integrated wiki content management system. This is really usefull to manage FAQ, quality manuals, etc.")
}
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
- def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ def execute(self, cr, uid, ids, context=None):
+ result = self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
- if r<>'id' and res[r]:
+ if r != 'id' and res[r]:
ids = mod_obj.search(cr, uid, [('name', '=', r)])
mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
profile_association_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_association/profile_association.xml b/addons/profile_association/profile_association.xml
index 6640f2a9f14..e23af3fdbe5 100644
--- a/addons/profile_association/profile_association.xml
+++ b/addons/profile_association/profile_association.xml
@@ -5,24 +5,27 @@
Association Profile : Install extra modulesprofile.association.config.install_modules_wizardform
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Install Extra Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -30,6 +33,7 @@
Association Profile : Install Extra Modulesir.actions.act_windowprofile.association.config.install_modules_wizard
+ formformnew
@@ -37,8 +41,6 @@
- Association Profile : Install Extra modules
- Install more modules. A few modules are proposed according to the association profile you selected. You will be able to install them based on our requirements.
diff --git a/addons/profile_manufacturing/profile_manufacturing.py b/addons/profile_manufacturing/profile_manufacturing.py
index 16351e1c276..11276af8c96 100644
--- a/addons/profile_manufacturing/profile_manufacturing.py
+++ b/addons/profile_manufacturing/profile_manufacturing.py
@@ -25,6 +25,8 @@ import pooler
class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
_name='profile.manufacturing.config.install_modules_wizard'
+ _inherit = 'res.config'
+
_columns = {
'mrp_jit':fields.boolean('Just in Time Scheduling',
help="The JIT module allows you to not run the scheduler "\
@@ -76,31 +78,16 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
help="Allows to manage product repairs. Handle the guarantee limit date and the invoicing of products and services."),
}
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
- def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ def execute(self, cr, uid, ids, context=None):
+ result = self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
- if r<>'id' and res[r]:
+ if r != 'id' and res[r]:
ids = mod_obj.search(cr, uid, [('name', '=', r)])
mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
- db, pool = pooler.restart_pool(cr.dbname,update_module=True)
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
+ db, pool = pooler.restart_pool(cr.dbname, update_module=True)
profile_manufacturing_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_manufacturing/profile_manufacturing.xml b/addons/profile_manufacturing/profile_manufacturing.xml
index b20d9fdfe96..b69203f83e3 100644
--- a/addons/profile_manufacturing/profile_manufacturing.xml
+++ b/addons/profile_manufacturing/profile_manufacturing.xml
@@ -5,46 +5,50 @@
Manufacturing Profile: Install Extra Modulesprofile.manufacturing.config.install_modules_wizardform
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Manufacturing Profile: Install Extra Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
Manufacturing Profile: Install Extra Modulesir.actions.act_windowprofile.manufacturing.config.install_modules_wizard
+ formformnew
-
- Manufacturing Profile: Install Extra modules
- Install more modules. A few modules are proposed according to the manufacturing profile you selected. You will be able to install them based on our requirements.
diff --git a/addons/profile_service/profile_service.py b/addons/profile_service/profile_service.py
index 5eb581b7184..5aee039bc09 100644
--- a/addons/profile_service/profile_service.py
+++ b/addons/profile_service/profile_service.py
@@ -24,6 +24,7 @@ import pooler
class profile_service_config_install_modules_wizard(osv.osv_memory):
_name='profile.service.config.install_modules_wizard'
+ _inherit = 'res.config'
_rec_name = 'crm_configuration'
_columns = {
'crm_configuration':fields.boolean('CRM & Calendars', help="This installs the customer relationship features like: leads and opportunities tracking, shared calendar, jobs tracking, bug tracker, and so on."),
@@ -46,31 +47,16 @@ class profile_service_config_install_modules_wizard(osv.osv_memory):
help="An integrated wiki content management system. This is really "\
"useful to manage FAQ, quality manuals, etc.")
}
- def action_cancel(self,cr,uid,ids,conect=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
- def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ def execute(self, cr, uid, ids, context=None):
+ result = self.read(cr, uid, ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
- if r<>'id' and res[r]:
+ if r != 'id' and res[r]:
ids = mod_obj.search(cr, uid, [('name', '=', r)])
- mod_obj.button_install(cr,uid,ids,context=context)
+ mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
profile_service_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_service/profile_service.xml b/addons/profile_service/profile_service.xml
index e1533ead011..94a967d1840 100644
--- a/addons/profile_service/profile_service.xml
+++ b/addons/profile_service/profile_service.xml
@@ -5,32 +5,37 @@
Service Profile : Install extra modulesprofile.service.config.install_modules_wizardform
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Install Extra Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -38,6 +43,7 @@
Service Profile : Install Extra Modulesir.actions.act_windowprofile.service.config.install_modules_wizard
+ formformnew
@@ -45,8 +51,6 @@
- Service Profile : Install Extra modules
- A few modules are proposed according to the 'service profile' you selected. You will be able to install them or more modules later through the Administration menu.
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 9103fe1de9f..8643b0775b9 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -1062,6 +1062,8 @@ sale_order_line()
class sale_config_picking_policy(osv.osv_memory):
_name = 'sale.config.picking_policy'
+ _inherit = 'res.config'
+
_columns = {
'name': fields.char('Name', size=64),
'picking_policy': fields.selection([
@@ -1087,7 +1089,7 @@ class sale_config_picking_policy(osv.osv_memory):
'step': lambda *a: 'one'
}
- def set_default(self, cr, uid, ids, context=None):
+ def execute(self, cr, uid, ids, context=None):
for o in self.browse(cr, uid, ids, context=context):
ir_values_obj = self.pool.get('ir.values')
ir_values_obj.set(cr, uid, 'default', False, 'picking_policy', ['sale.order'], o.picking_policy)
@@ -1104,23 +1106,5 @@ class sale_config_picking_policy(osv.osv_memory):
location_id = md._get_id(cr, uid, 'stock', 'stock_location_output')
location_id = md.browse(cr, uid, location_id, context).res_id
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
-
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
- def action_cancel(self, cr, uid, ids, context=None):
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.actions.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
sale_config_picking_policy()
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 1ca092441ad..95738bb706d 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -448,21 +448,27 @@
Configure Picking Policy for Sale Order sale.config.picking_policyform
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Sales Configuration
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -470,6 +476,7 @@
Configure Picking Policy for Sale Orderir.actions.act_windowsale.config.picking_policy
+ formformnew
@@ -477,8 +484,6 @@
- Select the default picking policy for Sale Order
- This Configuration step use to set default picking policy when make sale order