Hi Jorge,
Usually in this case you should have one model from where you print the report, let us say it is account.invoice. If you then want to access data from two other models you should have a link to these models to easily access the data. Let us say you have account.invoice.one and account.ionvoice.two.
The account.invoice.one model is linked to the account.invoice with a field named invoice_one_id and the account.invoice.two model is linked to the account.invoice with a field named invoice_two_id. You could then do this in the code:
<span t-field="o.invoice_one_id.field1"/>
<span t-field="o.invoice_two_id.field2"/>
If this is not the case you could call a Python function from the QWeb report like this:
<t t-set="record_collection" t-value="doc.get_data()"/>
And in the Python code you can then call this function and do whatever you want:
@api.multi
def get_data(self):
record_collection = []
# Do your browse, search, calculations, .. here and then return the data (which you can then use in the QWeb)
record_collection = self.env['account.invoice.two'].search([('name', '=', 'Example')])
return record_collection
Regards,
Yenthe