Update barcode.py

This commit is contained in:
zainab2097 2024-07-22 13:24:11 +03:00 committed by GitHub
parent 6e5463dc8e
commit 701ed04292
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -60,10 +60,10 @@ class Transaction(models.Model):
# draw_text(draw,(str(self.transaction_date) if self.transaction_date else '').replace('-', '/')+"تاريخ المعاملة الميلادي: ", (10, 100), font)
# draw_text(draw,(str(self.attachment_num) if self.attachment_num else '0')+ "رتبة المعاملة: " , (10, 140), font)
#
draw_text(draw, " : رقم المعاملة " + (self.name or ''), (10, 20), font)
draw_text(draw, " : تاريخ المعاملة الهجري " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 60), font)
draw_text(draw, ": تاريخ المعاملة الميلادي" + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 100), font)
draw_text(draw, ": رتبة المعاملة " + (str(self.attachment_num) if self.attachment_num else '0'), (10, 140), font)
draw_text(draw, " رقم المعاملة : " + (self.name or ''), (10, 20), font)
draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 60), font)
draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 100), font)
draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (10, 140), font)
# Generate barcode
barcode = self.env['ir.actions.report'].barcode('Code11', self.name, width=250, height=100, humanreadable=0)