تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4107 أدوات العرض

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...

الصورة الرمزية
إهمال
أفضل إجابة
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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
8
ديسمبر 23
52524
1
مارس 25
727
1
مايو 18
7269
0
مايو 15
3628
1
مارس 15
7141