You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

55 lines
1.7 KiB

# -*- coding: utf-8 -*-
# Copyright 2009-2018 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
import logging
_logger = logging.getLogger(__name__)
try:
from odoo.addons.report_xlsx_helper.report.abstract_report_xlsx \
import AbstractReportXlsx
_render = AbstractReportXlsx._render
except (ImportError, IOError) as err:
_logger.debug(err)
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
# Change list in custom module e.g. to add/drop columns or change order
@api.model
def _report_xlsx_fields(self):
return [
'move', 'name', 'date', 'journal', 'partner', 'account',
'date_maturity', 'debit', 'credit', 'balance',
'full_reconcile', 'reconcile_amount',
# 'analytic_account_name', 'analytic_account',
# 'ref', 'partner_ref',
# 'amount_residual', 'amount_currency', 'currency_name',
# 'company_currency', 'amount_residual_currency',
# 'product', 'product_ref', 'product_uom', 'quantity',
# 'statement', 'invoice', 'narration', 'blocked',
# 'id', 'matched_debit_ids', 'matched_credit_ids',
]
# Change/Add Template entries
@api.model
def _report_xlsx_template(self):
"""
Template updates, e.g.
my_change = {
'move': {
'header': {
'value': 'My Move Title',
},
'lines': {
'value': _render("line.move_id.name or ''"),
},
'width': 20,
},
}
return my_change
"""
return {}