i have a new field that is computed and want to pass it to the qweb report. according to the document, if i am not mistaken i can do that using:
from odoo import api, models
class ParticularReport (models.AbstractModel):
_name = 'report.module.report_name'
def _get_report_values (self,docids,data= None ):
# get the report action back as we will need its data
report = self.env['ir.actions.report']._get_report_from_name('module.report_name')
# get the records selected for this rendering of the report
obj = self.env[report.model].browse(docids)
# return a custom rendering context
return {
'lines': docids.get_lines()
}
but i'm not sure how is this called?
I wanted to add a custom data/field in the invoice report using the mentioned code above but when i tried logging something, it was not called.