Odoo Help


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

on 8/9/13, 8:24 PM 2,499 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
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

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. 

I am a skilled Communicator and I only take the serious things seriously!

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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


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