Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
2
Respostas
12858
Visualizações
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'
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
3
set. 23
|
20915 | ||
|
1
mar. 21
|
4800 | ||
|
0
mai. 17
|
2386 | ||
|
0
mai. 22
|
2067 | ||
|
1
abr. 22
|
9290 |