configuration wizard :
* improvement on user configuration wizard * account journal for bank account wizard * remove comment on install module wizard on profile_service module bzr revid: hmo@tinyerp.com-75b7c5c0da946d8842171a692ba65c0ce0e55e89
This commit is contained in:
parent
9020c5e4db
commit
b6e1745b8a
|
@ -1552,7 +1552,7 @@ class account_config_fiscalyear(osv.osv_memory):
|
|||
}
|
||||
_defaults = {
|
||||
'date1': lambda *a: time.strftime('%Y-01-01'),
|
||||
'date2': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'date2': lambda *a: time.strftime('%Y-12-31'),
|
||||
}
|
||||
def action_create(self, cr, uid,ids, context=None):
|
||||
res=self.read(cr,uid,ids)[0]
|
||||
|
@ -1596,14 +1596,15 @@ class account_config_journal_bank_accounts(osv.osv_memory):
|
|||
if 'lines_id' in config_res and config_res['lines_id']:
|
||||
lines=line_obj.read(cr,uid,config_res['lines_id'])
|
||||
for res in lines:
|
||||
if 'name' in res and 'bank_account_id' in res and 'view_id' in res and 'sequence_id' in res:
|
||||
sequence_ids=self.pool.get('ir.sequence').search(cr,uid,[('name','=','Account Journal')])
|
||||
if 'name' in res and 'bank_account_id' in res and 'view_id' in res and sequence_ids and len(sequence_ids):
|
||||
vals={
|
||||
'name':res['name'],
|
||||
'type':'cash',
|
||||
'view_id':res['view_id'],
|
||||
'default_credit_account_id':res['bank_account_id'],
|
||||
'default_debit_account_id':res['bank_account_id'],
|
||||
'sequence_id':res['sequence_id']
|
||||
'sequence_id':sequence_ids[0]
|
||||
}
|
||||
res_obj.create(cr, uid, vals, context=context)
|
||||
return {
|
||||
|
@ -1627,10 +1628,7 @@ class account_config_journal_bank_accounts_line(osv.osv_memory):
|
|||
'name':fields.char('Journal Name', size=64,required=True),
|
||||
'bank_account_id':fields.many2one('account.account', 'Bank Account', required=True, domain=[('type','=','cash')]),
|
||||
'view_id':fields.selection(_journal_view_get, 'Journal View', required=True),
|
||||
'sequence_id':fields.many2one('ir.sequence', 'Sequence', required=True),
|
||||
'journal_id':fields.many2one('account.config.journal.bank.account', 'Journal', required=True),
|
||||
}
|
||||
|
||||
|
||||
account_config_journal_bank_accounts_line()
|
||||
|
||||
|
|
|
@ -1452,13 +1452,11 @@
|
|||
<field name="name"/>
|
||||
<field name="bank_account_id"/>
|
||||
<field name="view_id"/>
|
||||
<field name="sequence_id"/>
|
||||
</form>
|
||||
<tree editable="bottom" string="Account Journals">
|
||||
<field name="name"/>
|
||||
<field name="bank_account_id"/>
|
||||
<field name="view_id"/>
|
||||
<field name="sequence_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group col="4" colspan="4">
|
||||
|
|
|
@ -98,12 +98,12 @@ class config_install_extra_modules(osv.osv_memory):
|
|||
ids = mod_obj.search(cr, uid, [('name', '=', 'hr_timesheet')])
|
||||
mod_obj.download(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
#db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
if 'hr_holidays_module' in res and res['hr_holidays_module']:
|
||||
ids = mod_obj.search(cr, uid, [('name', '=', 'hr_holidays')])
|
||||
mod_obj.download(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
#db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
return {
|
||||
'view_type': 'form',
|
||||
"view_mode": 'form',
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
</tree>
|
||||
</field>-->
|
||||
<group col="4" colspan="4">
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button name="action_install" string="Install" type="object"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="action_install" string="Install" icon='gtk-ok' type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -38,12 +38,13 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!--<record model="ir.module.module.configuration.step"
|
||||
<record model="ir.module.module.configuration.step"
|
||||
id="config_install_module">
|
||||
<field name="name">Install Extra modules</field>
|
||||
<field name="note">Install Extra modules</field>
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
<field name="state">open</field>
|
||||
</record>-->
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue