~unifield-team/unifield-wm/us-671-homere

« back to all changes in this revision

Viewing changes to msf_profile/account_installer.py

UF-359 [ADD] Account override module integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
 
3
 
from osv import fields, osv
4
 
import tools
5
 
 
6
 
class account_installer(osv.osv_memory):
7
 
    _name = 'account.installer'
8
 
    _inherit = 'account.installer'
9
 
 
10
 
    _columns = {
11
 
        'charts': fields.selection([('msf_chart_of_account', 'MSF Chart Of Account'), ('None', 'None')], 'Chart of Accounts',
12
 
            required=True,
13
 
            help="Installs localized accounting charts to match as closely as "
14
 
                "possible the accounting needs of your company based on your "
15
 
                "country."),
16
 
    }
17
 
 
18
 
    def _get_default_charts(self, cr, uid, context=None):
19
 
        if tools.config.options.get('additional_xml'):
20
 
            return 'msf_chart_of_account'
21
 
        return 'None'
22
 
 
23
 
    _defaults = {
24
 
        'charts': _get_default_charts
25
 
    }
26
 
 
27
 
    def execute(self, cr, uid, ids, context=None):
28
 
        return super(account_installer, self).execute(cr, uid, ids, context)
29
 
 
30
 
account_installer()
31