Skip to Content
Menú
This question has been flagged
1 Respondre
4118 Vistes

I've been looking for information about the receipts and invoices, I found that receipts are a simpler way of invoice, those even below to the same model (account.move), but I can't figure out why can't we print receipts like printing invoices...

So, what's the purpose of a receipt beyond make a move simplier?

I'm working on V13, all that I found is usually related to older versions...

Avatar
Descartar
Best Answer
class AccountMove(models.Model):
_inherit = "account.move"
def _get_report_base_filename(self):
if any(not move.is_invoice(include_receipts=True) for move in self):
raise UserError(_("Only invoices could be printed."))
return self._get_move_display_name()

You need to replace function get_report_base_filename and add include_receipts = Trie inside is_invoice

Avatar
Descartar
Related Posts Respostes Vistes Activitat
8
de des. 23
52601
1
de març 25
773
1
de maig 18
7330
0
de maig 15
3638
1
de març 15
7177