~openerp-dev/openobject-addons/new_account_menu_structure

« back to all changes in this revision

Viewing changes to l10n_be/wizard/l10n_be_vat_intra.py

  • Committer: pap(openerp)
  • Date: 2010-06-16 13:35:15 UTC
  • mfrom: (3604.1.29 trunk-dev-addons3)
  • Revision ID: pap@tinyerp.co.in-20100616133515-j2t05tg2m350t0ub
[Merge]

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    '''
52
52
    ),
53
53
        'period_ids': fields.many2many('account.period', 'account_period_rel', 'acc_id', 'period_id', 'Period (s)', help = 'Select here the period(s) you want to include in your intracom declaration'),
54
 
        'tax_code_id': fields.many2one('account.tax.code', 'Tax Code'),
 
54
        'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', domain=[('parent_id', '=', False)]),
55
55
        'test_xml': fields.boolean('Test XML file', help="Sets the XML output as test file"),
56
56
        'mand_id' : fields.char('MandataireId', size=14, required=True,  help="This identifies the representative of the sending company. This is a string of 14 characters"),
57
57
        'msg': fields.text('File created', size=14, readonly=True),
80
80
 
81
81
        if context is None:
82
82
            context = {}
83
 
        if self.browse(cursor, user, ids[0]).tax_code_id:
84
 
            data_cmpny = self.browse(cursor, user, ids[0]).tax_code_id.company_id
 
83
        data_tax = self.browse(cursor, user, ids[0], context=context)
 
84
        if data_tax.tax_code_id:
 
85
            data_cmpny = data_tax.tax_code_id.company_id
85
86
        else:
86
87
            data_cmpny = obj_user.browse(cursor, user, user).company_id
87
88
        data  = self.read(cursor, user, ids)[0]