Această întrebare a fost marcată
2
Răspunsuri
15184
Vizualizări
Hi,
In Odoo v10 use _get_report_from_name instead report_action.
e.g:
@api.model
def render_html(self, docids, data=None):
report_obj = self.env['report']
report = report_obj._get_report_from_name('de_partner_statement.partner_ledger_pdf')
docargs = {
'doc_ids': docids,
'doc_model': report.model,
'docs': self,
'result': {...}
}
return report_obj.render('de_partner_statement.partner_ledger_pdf', docargs)
Best regards!
I have the same problem. I am using odoo 13, but when I trying this solution give this error;
report_type = self.report_type.lower().replace('-', '_')
AttributeError: 'bool' object has no attribute 'lower'Îți place discuția? Nu doar citi, alătură-te!
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
|
3
sept. 23
|
23713 | ||
|
|
1
mar. 21
|
6862 | ||
|
|
0
mai 17
|
4029 | ||
|
|
0
mai 22
|
4042 | ||
|
|
1
apr. 22
|
11822 |