Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to add current date to product label report? [Closed]

on 8/9/13, 8:24 PM 1,934 views

The Question has been closed

Ray Carnes
on 08/15/2013 13:27:55

How do I add the current date to the product label report?


  • I have tried to alter the product_label.xml file by adding a line like this:
  <date type="eval" expr="datetime.datetime.now()"/>
  • But, then I get the following error when executing the print label action: > name 'datetime' is not defined (type 'exceptions.NameError', NameError("name 'datetime' is not defined",), traceback object at 0x7f6024a70fc8)

Any help would be appreciated. -Thx


Ray Carnes

--Ray Carnes--
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 8/14/13, 4:34 PM


<date type="function" name="today"/>

This will return the current date in the format DD/MM/YYYY

You can change this to other formats (for example MM/DD/YYYY) by doing something like this in your XSL:

<xsl:value-of select="concat(substring(date, 4, 3),
                             substring(date, 1, 3),substring(date, 7, 4))"/>`

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 8/9/13, 8:24 PM
Seen: 1934 times
Last updated: 3/16/15, 8:10 AM