commit
24aa8ec5ee
|
|
@ -35,7 +35,7 @@ class Transaction(models.Model):
|
|||
|
||||
binary_barcode = fields.Binary(string='Barcode', attachment=True)
|
||||
|
||||
@api.constrains('ean13', 'name', 'transaction_date', 'type')
|
||||
@api.constrains('ean13', 'name', 'transaction_date', 'type','subject')
|
||||
def binary_compute_constraint(self):
|
||||
font_path = os.path.join(os.path.dirname(__file__), 'img', 'amiri-regular.ttf')
|
||||
font_size = 22
|
||||
|
|
@ -61,6 +61,7 @@ class Transaction(models.Model):
|
|||
# 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.subject 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'), (120, 140), font)
|
||||
|
|
|
|||
Loading…
Reference in New Issue