~vauxoo/addons-vauxoo/8.0-import_tax_tariff-dev-yani-rev-2

« back to all changes in this revision

Viewing changes to ifrs_report/model/ifrs.py

  • Committer: jose at vauxoo
  • Date: 2013-07-25 20:54:29 UTC
  • mfrom: (543.7.110 vaddons-70)
  • Revision ID: jose@vauxoo.com-20130725205429-tcrhjjc3og02uc0g
 
[MERGE] Merge from 7 Series to add the new features

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
            'State', required=True),
68
68
        'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', help='Fiscal Year'),
69
69
        'do_compute': fields.boolean('Compute', help='Allows the amount field automatically run when is calculated'),
 
70
        'help': fields.boolean('Show Help', help='Allows you to show the help in the form'),
70
71
        'ifrs_ids': fields.many2many('ifrs.ifrs', 'ifrs_m2m_rel', 'parent_id', 'child_id', string='Other Reportes',)
71
72
    }
72
73
 
73
74
    _defaults = {
74
75
        'state': 'draft',
 
76
        'help': True,
75
77
        'company_id': lambda s, c, u, cx: s.pool.get('res.users').browse(
76
78
            c, u, u, context=cx).company_id.id,
77
79
        'fiscalyear_id': lambda s, c, u, cx: s.pool.get('account.fiscalyear').find(c, u),
613
615
        return res
614
616
 
615
617
    _columns = {
 
618
        'help': fields.related('ifrs_id','help', string='Show Help',type='boolean',help='Allows you to show the help in the form'),
616
619
        'sequence': fields.integer('Sequence', required=True, help='Indicates the order of the line in the report. The sequence must be unique and unrepeatable'),
617
620
        'name': fields.char('Name', 128, required=True, translate=True, help='Line name in the report. This name can be translatable, if there are multiple languages ​​loaded it can be translated'),
618
621
        'type': fields.selection(
640
643
                               ),
641
644
        'cons_ids': fields.many2many('account.account', 'ifrs_account_rel', 'ifrs_lines_id', 'account_id', string='Consolidated Accounts'),
642
645
        'analytic_ids': fields.many2many('account.analytic.account', 'ifrs_analytic_rel', 'ifrs_lines_id', 'analytic_id', string='Consolidated Analytic Accounts'),
643
 
        'parent_id': fields.many2one('ifrs.lines', 'Parent', select=True, ondelete='set null', domain="[('ifrs_id','=',parent.id), ('type','=','total'),('id','!=',id)]"),
 
646
        'parent_id': fields.many2one('ifrs.lines', 'Parent', select=True, ondelete='cascade', domain="[('ifrs_id','=',parent.id), ('type','=','total'),('id','!=',id)]"),
644
647
        'parent_abstract_id': fields.many2one('ifrs.lines', 'Parent Abstract', select=True, ondelete='set null', domain="[('ifrs_id','=',parent.id),('type','=','abstract'),('id','!=',id)]"),
645
648
        'parent_right': fields.integer('Parent Right', select=1),
646
649
        'parent_left': fields.integer('Parent Left', select=1),
648
651
                                 store={
649
652
                                 'ifrs.lines': (_get_children_and_total, ['parent_id'], 10),
650
653
                                 }),
651
 
        'operand_ids': fields.many2many('ifrs.lines', 'ifrs_operand_rel', 'ifrs_parent_id', 'ifrs_child_id', string='Operands'),
 
654
        'operand_ids': fields.many2many('ifrs.lines', 'ifrs_operand_rel', 'ifrs_parent_id', 'ifrs_child_id', string='Second Operand'),
652
655
        'operator': fields.selection([
653
656
            ('subtract', 'Subtraction'),
654
657
            ('percent', 'Percentage'),
655
658
            ('ratio', 'Ratio'),
656
659
            ('product', 'Product'),
657
 
            ('without', '')
 
660
            ('without', 'First Operand Only')
658
661
        ],
659
662
            'Operator', required=False,
660
663
            help='Leaving blank will not take into account Operands'),
668
671
        'acc_val': fields.selection([
669
672
            ('init', 'Initial Values'),
670
673
            ('var', 'Variation in Periods'),
671
 
            ('fy', ('FY All'))],
672
 
            'Accounting Spam', required=False,
 
674
            ('fy', ('Ending Values'))],
 
675
            'Accounting Span', required=False,
673
676
            help='Leaving blank means YTD'),
674
677
        'value': fields.selection([
675
678
            ('debit', 'Debit'),
677
680
            ('balance', 'Balance')],
678
681
            'Accounting Value', required=False,
679
682
            help='Leaving blank means Balance'),
680
 
        'total_ids': fields.many2many('ifrs.lines', 'ifrs_lines_rel', 'parent_id', 'child_id', string='Total'),
 
683
        'total_ids': fields.many2many('ifrs.lines', 'ifrs_lines_rel', 'parent_id', 'child_id', string='First Operand'),
681
684
        'inv_sign': fields.boolean('Change Sign to Amount', help='Allows a change of sign'),
682
685
        'invisible': fields.boolean('Invisible', help='Allows whether the line of the report is printed or not'),
683
686
        'comment': fields.text('Comments/Question', help='Comments or questions about this ifrs line'),
701
704
        'invisible': False,
702
705
        'acc_val': 'fy',
703
706
        'value': 'balance',
 
707
        'help': True,
704
708
        #'sequence': lambda obj, cr, uid, context: uid,
705
709
    }
706
710