diff --git a/reports/account.py b/reports/account.py
index 6bff874..2ca50e8 100644
--- a/reports/account.py
+++ b/reports/account.py
@@ -1,27 +1,19 @@
from odoo import models, api, fields
-import datetime
from datetime import date
class AccountMove(models.Model):
_inherit = "account.move"
txn_id = fields.Char("Transaction ID")
- signed_by = fields.Char("signed by", compute='compute_signature')
+ signed_by = fields.Char("Printed by", compute='compute_signature')
print_date = fields.Date("Print date", compute='compute_print_date')
+ note = fields.Text("Note")
def compute_print_date(self):
for rec in self:
- if rec.invoice_origin:
- sale_id = self.env['sale.order'].sudo().search([('name', '=', rec.invoice_origin)])
- for doc in sale_id:
- rec.print_date = doc.signed_on
- else:
- rec.print_date = date.today()
+ rec.print_date = date.today()
def compute_signature(self):
for rec in self:
- if rec.invoice_origin:
- sale_id = self.env['sale.order'].sudo().search([('name', '=', rec.invoice_origin)])
- for doc in sale_id:
- rec.signed_by = doc.signed_by
+ rec.signed_by = self.env.user.name
diff --git a/reports/views/invoice_report.xml b/reports/views/invoice_report.xml
index 0927ada..3bf86ff 100644
--- a/reports/views/invoice_report.xml
+++ b/reports/views/invoice_report.xml
@@ -9,6 +9,9 @@
+
+
+
@@ -25,10 +28,18 @@
Sale Code:
+
+ NOTE:
+
+
+
+ S.No |
+ Code |
+
E & OE
Print Date:
- Signed by:
+ Printed by:
@@ -48,7 +59,7 @@
E & OE
Print Date:
- Signed by:
+ Printed by:
@@ -68,7 +79,7 @@
E & OE
Print Date:
- Signed by:
+ Printed by:
@@ -88,7 +99,7 @@
E & OE
Print Date:
- Signed by:
+ Printed by:
\ No newline at end of file