diff --git a/addons/account/account.py b/addons/account/account.py
index c965d2cd0e5..0241cbe5ffa 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -2390,10 +2390,14 @@ class account_bank_accounts_wizard(osv.osv_memory):
_name='account.bank.accounts.wizard'
_columns = {
- 'acc_no':fields.many2one('res.partner.bank','Account No.',required=True),
+ 'acc_name':fields.char('Account Name.', size=64, required=True),
'bank_account_id':fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id':fields.many2one('res.currency', 'Currency'),
+ 'account_type':fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
}
+ _defaults = {
+ 'currency_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
+ }
account_bank_accounts_wizard()
diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml
index 5eec07067ef..89921af9790 100644
--- a/addons/account/account_installer.xml
+++ b/addons/account/account_installer.xml
@@ -17,7 +17,7 @@
- You can enhance OpenERP's basic accounting support with a few additional OpenERP applications
+ You can enhance OpenERP's basic accounting support with a few additional OpenERP applications. Select one of the country specific chart of account or select 'configurable chart of account' to configure your own chart of account.
150
@@ -36,11 +36,24 @@
-
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
@@ -66,6 +79,20 @@
3
+ onskip
+
+
+ ir.actions.todo
+ account_installer_action_replace
+ tree
+
+
+
+
+
+
+
+
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 515049bba15..cf9069f9be4 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1719,11 +1719,13 @@
-
+
+
diff --git a/addons/account/installer.py b/addons/account/installer.py
index ca62f758788..e10bbae21b7 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -37,9 +37,20 @@ class account_installer(osv.osv_memory):
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids)),
key=itemgetter(1)))
- charts.insert(0,('',''))
+ charts.insert(0,('configurable','Configurable Chart of Account'))
return charts
+# def default_get(self, cr, uid, fields_list=None, context=None):
+# ''' set default accounts'''
+# defaults = super(account_installer, self)\
+# .default_get(cr, uid, fields_list=fields_list, context=context)
+# account = self.pool.get('account.bank.accounts.wizard')
+# ids = []
+# for acc in ('Current','Deposit'):
+# ids.append(account.create(cr, uid, {'acc_name':acc,'account_type':'cash','bank_account_id':self}))
+# defaults.update({'bank_accounts_id':[(6,0,ids)]})
+# return defaults
+
_columns = {
# Accounting
'charts':fields.selection(_get_charts, 'Chart of Accounts',
@@ -64,15 +75,16 @@ class account_installer(osv.osv_memory):
'date_stop': fields.date('End Date', required=True),
'period':fields.selection([('month','Monthly'), ('3months','3 Monthly')],
'Periods', required=True),
- 'account_name':fields.char('Name', size=128),
- 'account_type':fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
- 'account_currency':fields.many2one('res.currency', 'Currency')
+ 'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts',required=True),
+ 'sale_tax':fields.float('Sale Tax(%)'),
+ 'purchase_tax':fields.float('Purchase Tax(%)')
}
_defaults = {
'date_start': lambda *a: time.strftime('%Y-01-01'),
'date_stop': lambda *a: time.strftime('%Y-12-31'),
'period':lambda *a:'month',
- 'account_currency': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
+ 'sale_tax':lambda *a:0.0,
+ 'purchase_tax':lambda *a:0.0,
}
def on_change_start_date(self, cr, uid, id, start_date):
@@ -84,9 +96,43 @@ class account_installer(osv.osv_memory):
def execute(self, cr, uid, ids, context=None):
super(account_installer, self).execute(cr, uid, ids, context=context)
+ record = self.browse(cr, uid, ids, context=context)[0]
for res in self.read(cr,uid,ids):
+ if record.charts == 'configurable':
+ obj_acc = self.pool.get('account.account')
+ obj_tax = self.pool.get('account.tax')
+ user_type = self.pool.get('account.account.type')
+ obj_product = self.pool.get('product.product')
+ ir_values = self.pool.get('ir.values')
+ u_type_id = user_type.search(cr, uid,[('name','ilike','view')])[0]
+ company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id
+ vals = {'name': company.name or '',
+ 'currency_id': company.currency_id.id or False,
+ 'code': 0 or '',
+ 'type': 'view',
+ 'user_type': u_type_id,
+ 'company_id': company.id }
+ main_account = obj_acc.create(cr, uid, vals)
+ for val in record.bank_accounts_id:
+ vals = {'name': val.acc_name or '',
+ 'currency_id': val.currency_id.id or False,
+ 'code': val.acc_name or '',
+ 'type': 'view',
+ 'user_type': u_type_id,
+ 'parent_id':main_account,
+ 'company_id': company.id }
+ obj_acc.create(cr, uid, vals)
+
+ sales_tax = obj_tax.create(cr, uid,{'name':'sale Tax','amount':res.get('sale_tax',0.0)})
+ purchase_tax = obj_tax.create(cr, uid,{'name':'purchase Tax','amount':res.get('purchase_tax',0.0)})
+ product_ids = obj_product.search(cr,uid, [])
+ for product in obj_product.browse(cr, uid, product_ids):
+ obj_product.write(cr, uid, product.id, {'taxes_id':[(6,0,[sales_tax])],'supplier_taxes_id':[(6,0,[purchase_tax])]})
+ for name, value in [('taxes_id',sales_tax),('supplier_taxes_id',purchase_tax)]:
+ ir_values.set(cr, uid, key='default', key2=False, name=name, models =[('product.product',False)], value=[value])
+
if 'date_start' in res and 'date_stop' in res:
- name = res['date_start'][:4]
+ name = code = res['date_start'][:4]
if int(name) != int(res['date_stop'][:4]):
name = res['date_start'][:4] +'-'+ res['date_stop'][:4]
code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4]
@@ -114,3 +160,18 @@ class account_installer(osv.osv_memory):
account_installer()
+
+class account_bank_accounts_wizard(osv.osv_memory):
+ _name='account.bank.accounts.wizard'
+
+ _columns = {
+ 'acc_name':fields.char('Account Name.', size=64, required=True),
+ 'bank_account_id':fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
+ 'currency_id':fields.many2one('res.currency', 'Currency'),
+ 'account_type':fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
+ }
+ _defaults = {
+ 'currency_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
+ }
+
+account_bank_accounts_wizard()
diff --git a/addons/association/profile_association.xml b/addons/association/profile_association.xml
index 827cdb42d18..0d0a65b3644 100644
--- a/addons/association/profile_association.xml
+++ b/addons/association/profile_association.xml
@@ -48,5 +48,16 @@
3
+
+ ir.actions.todo
+ association_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/base_setup/__init__.py b/addons/base_setup/__init__.py
index ef4f321942d..cda3e40111b 100644
--- a/addons/base_setup/__init__.py
+++ b/addons/base_setup/__init__.py
@@ -21,6 +21,7 @@
import installer
import todo
+import gtk_contact_form
import wizard
from osv import fields, osv
diff --git a/addons/base_setup/__openerp__.py b/addons/base_setup/__openerp__.py
index c6dd64d7bcc..ee0cc6a8f56 100644
--- a/addons/base_setup/__openerp__.py
+++ b/addons/base_setup/__openerp__.py
@@ -43,7 +43,7 @@
'init_xml': ['base_setup_data.xml'],
'update_xml': ['security/ir.model.access.csv',
'base_setup_installer.xml',
- 'base_setup_todo.xml',],
+ 'base_setup_todo.xml','gtk_contact_form.xml'],
'demo_xml': ['base_setup_demo.xml'],
'installable': True,
'active': True,
diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index f1c3f0c0b3d..cc5afdd6f25 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -13,7 +13,7 @@
Now that OpenERP is installed, we have selected applications commonly useful to users which you can install directly, as well as sets of applications for more specific types or groups of businesses (the vertical modules).
+ >Now that OpenERP is installed, We have selected applications commonly useful to users which you can install directly, as well as sets of applications for more specific types or groups of businesses (the vertical modules).
If you don't think you need any of these right now, you can easily install them later on.
@@ -56,5 +56,16 @@ If you don't think you need any of these right now, you can easily install them
2
+
+ ir.actions.todo
+ base_setup_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml
index 07600ae204a..a19476e1f19 100644
--- a/addons/hr/hr_installer.xml
+++ b/addons/hr/hr_installer.xml
@@ -52,5 +52,16 @@
3
+
+ ir.actions.todo
+ hr_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml
index a3c9437dae1..30ac565addb 100644
--- a/addons/knowledge/knowledge_installer.xml
+++ b/addons/knowledge/knowledge_installer.xml
@@ -53,5 +53,17 @@
3
+
+
+ ir.actions.todo
+ knowledge_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/mrp/mrp_installer.xml b/addons/mrp/mrp_installer.xml
index d36093c8dfb..d40eb453570 100644
--- a/addons/mrp/mrp_installer.xml
+++ b/addons/mrp/mrp_installer.xml
@@ -48,5 +48,17 @@
3
+
+
+ ir.actions.todo
+ mrp_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/profile_accounting/profile_accounting.xml b/addons/profile_accounting/profile_accounting.xml
index bf1ba9fdf24..d54aaaf1e5b 100644
--- a/addons/profile_accounting/profile_accounting.xml
+++ b/addons/profile_accounting/profile_accounting.xml
@@ -48,5 +48,16 @@
3
+
+ ir.actions.todo
+ accounting_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/profile_manufacturing/profile_manufacturing.xml b/addons/profile_manufacturing/profile_manufacturing.xml
index df8c56c77cb..bbbc64af57a 100644
--- a/addons/profile_manufacturing/profile_manufacturing.xml
+++ b/addons/profile_manufacturing/profile_manufacturing.xml
@@ -55,5 +55,16 @@
3
+
+ ir.actions.todo
+ manufacturing_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml
index 307b5b90a8c..277ec90b81c 100644
--- a/addons/profile_tools/misc_tools_installer.xml
+++ b/addons/profile_tools/misc_tools_installer.xml
@@ -47,5 +47,16 @@
3
+
+ ir.actions.todo
+ misc_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml
index d8a503e00fa..cbdd18ae29f 100644
--- a/addons/project/project_installer.xml
+++ b/addons/project/project_installer.xml
@@ -53,5 +53,16 @@
3
+
+ ir.actions.todo
+ project_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/purchase/wizard/purchase_installer.xml b/addons/purchase/wizard/purchase_installer.xml
index 5725907da28..0916977e62a 100644
--- a/addons/purchase/wizard/purchase_installer.xml
+++ b/addons/purchase/wizard/purchase_installer.xml
@@ -46,5 +46,16 @@
3
+
+ ir.actions.todo
+ purchase_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/report_designer/report_designer_installer.xml b/addons/report_designer/report_designer_installer.xml
index 76adb3eddf1..89d655de0b2 100644
--- a/addons/report_designer/report_designer_installer.xml
+++ b/addons/report_designer/report_designer_installer.xml
@@ -46,5 +46,16 @@
3
+
+ ir.actions.todo
+ report_designer_installer_action_replace
+ tree
+
+
+
+
+
+
+
diff --git a/addons/service/service_installer.xml b/addons/service/service_installer.xml
index 07d9e839376..98b1eab4bce 100644
--- a/addons/service/service_installer.xml
+++ b/addons/service/service_installer.xml
@@ -60,5 +60,16 @@
3
+
+ ir.actions.todo
+ service_installer_action_replace
+ tree
+
+
+
+
+
+
+