Add date and created by in purchase order printout


Can you please help me? How can I add the Current Date (now or the date when will the PO be printed) and the Created By (the user who logs in) in the Print out of the Purchase Order.

Thank You.

This provides the jinja value required for name

And date is probably similar (doc.posting_date or something), I’m on mobile right now otherwise I’d check the name of the field


Hi @superlack Thank you! the ‘created by’ works. But for the Date, i want the current date to show not the posting date . for example the posting date is March 31, 2017 but I will print it today the date must be April 7, 2107. I tried using HTML, below is the script,

document.getElementById("date").innerHTML = Date();

and the result is : Fri Apr 07 2017 12:12:41 GMT+0800 (Taipei Standard Time)

But i only need April 07, 2107. Please heeeeeeeeeelp. Thank you

1 Like
1 Like

@ossphinc: if you like to stay with pure HTML and JS implementation, you may want to adjust your JavaScript code a little. Something like this could work,

var dt = new Date(); var n = dt.toDateString(); document.getElementById("date").innerHTML = n;

@superlack Thank you sooooooooooo much.