Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to move an override of the ir.actions.report_xml.create() method in Odoo-9?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 379
    Comment on it

    If you want to move an override of the ir.actions.report_xml.create() method. Then you have to follow the following code in your .py file.

    # -*- coding: utf-8 -*-
    
    import time
    import math
    
    from openerp.osv import expression
    from openerp.tools.float_utils import float_round as round
    from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
    from openerp.exceptions import UserError, ValidationError
    from openerp import api, fields, models, _
    
    
    class AccountAccountType(models.Model):
        _name = "account.account.type"
        _description = "Account Type"
    
        name = fields.Char(string='Account Type', required=True, translate=True)
        include_initial_balance = fields.Boolean(string="Bring Accounts Balance Forward", help="Used in reports to know if we should consider journal items from the beginning of time instead of from the fiscal year only. Account types that should be reset to zero at each new fiscal year (like expenses, revenue..) should not have this option set.")
        type = fields.Selection([
            ('other', 'Regular'),
            ('receivable', 'Receivable'),
            ('payable', 'Payable'),
            ('liquidity', 'Liquidity'),
        ], required=True, default='other',
            help="The 'Internal Type' is used for features available on "\
            "different types of accounts: liquidity type is for cash or bank accounts"\
            ", payable/receivable is for vendor/customer accounts.")
        note = fields.Text(string='Description')
    
    
    class AccountAccountTag(models.Model):
        _name = 'account.account.tag'
        _description = 'Account Tag'
    
        name = fields.Char(required=True)
        applicability = fields.Selection([('accounts', 'Accounts'), ('taxes', 'Taxes')], required=True, default='accounts')
        color = fields.Integer('Color Index')
    

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: