← Back to team overview

openerp-india team mailing list archive

[Bug 1085221] [NEW] NameError: name 'datetime' is not defined

 

Public bug reported:

When you enter  to Accounting/Configuration/Analytic in the webclient

THIS ERROR appears

Uncaught Error: QWeb2 - template['ListView.rows']: Runtime Error: Error:
QWeb2 - template['ListView.row']: Runtime Error: Error: NameError: name
'datetime' is not defined

The error appears in module "account_analytic_default",
xml field "account_analytic_default_view.xml" line "9"

Incorrect line
<tree string="Analytic Defaults" colors="grey:date_stop and (date_stop &lt; (datetime.date.today().strftime('%%Y-%%m-%%d)))">

SOLUTION:

The colors structure is wrong and you have to change that with :

<tree string="Analytic Defaults"
colors="grey:'date_stop','and',('date_stop','&lt;',(datetime.date.today().strftime('%%Y-%%m-%%d')))">

Solved by David Romero and Andrea Garcia
TREScloud
www.trescloud.com

** Affects: openobject-addons
     Importance: Undecided
         Status: New

** Description changed:

  When you enter  to Accounting/Configuration/Analytic in the webclient
  
  THIS ERROR appears
  
  Uncaught Error: QWeb2 - template['ListView.rows']: Runtime Error: Error:
  QWeb2 - template['ListView.row']: Runtime Error: Error: NameError: name
  'datetime' is not defined
  
- The error appears in module "account_analytic_default",  
+ The error appears in module "account_analytic_default",
  xml field "account_analytic_default_view.xml" line "9"
  
  Incorrect line
  <tree string="Analytic Defaults" colors="grey:date_stop and (date_stop &lt; (datetime.date.today().strftime('%%Y-%%m-%%d)))">
  
  SOLUTION:
  
  The colors structure is wrong and you have to change that with :
  
  <tree string="Analytic Defaults"
  colors="grey:'date_stop','and',('date_stop','&lt;',(datetime.date.today().strftime('%%Y-%%m-%%d')))">
  
  Solved by David Romero and Andrea Garcia
  TREScloud
- <hr>www.trescloud.com</hr>
+ <a>www.trescloud.com</a>

** Description changed:

  When you enter  to Accounting/Configuration/Analytic in the webclient
  
  THIS ERROR appears
  
  Uncaught Error: QWeb2 - template['ListView.rows']: Runtime Error: Error:
  QWeb2 - template['ListView.row']: Runtime Error: Error: NameError: name
  'datetime' is not defined
  
  The error appears in module "account_analytic_default",
  xml field "account_analytic_default_view.xml" line "9"
  
  Incorrect line
  <tree string="Analytic Defaults" colors="grey:date_stop and (date_stop &lt; (datetime.date.today().strftime('%%Y-%%m-%%d)))">
  
  SOLUTION:
  
  The colors structure is wrong and you have to change that with :
  
  <tree string="Analytic Defaults"
  colors="grey:'date_stop','and',('date_stop','&lt;',(datetime.date.today().strftime('%%Y-%%m-%%d')))">
  
  Solved by David Romero and Andrea Garcia
  TREScloud
- <a>www.trescloud.com</a>
+ <url>www.trescloud.com</url>

** Description changed:

  When you enter  to Accounting/Configuration/Analytic in the webclient
  
  THIS ERROR appears
  
  Uncaught Error: QWeb2 - template['ListView.rows']: Runtime Error: Error:
  QWeb2 - template['ListView.row']: Runtime Error: Error: NameError: name
  'datetime' is not defined
  
  The error appears in module "account_analytic_default",
  xml field "account_analytic_default_view.xml" line "9"
  
  Incorrect line
  <tree string="Analytic Defaults" colors="grey:date_stop and (date_stop &lt; (datetime.date.today().strftime('%%Y-%%m-%%d)))">
  
  SOLUTION:
  
  The colors structure is wrong and you have to change that with :
  
  <tree string="Analytic Defaults"
  colors="grey:'date_stop','and',('date_stop','&lt;',(datetime.date.today().strftime('%%Y-%%m-%%d')))">
  
  Solved by David Romero and Andrea Garcia
  TREScloud
- <url>www.trescloud.com</url>
+ www.trescloud.com

** Information type changed from Private Security to Public

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1085221

Title:
  NameError: name 'datetime' is not defined

Status in OpenERP Addons (modules):
  New

Bug description:
  When you enter  to Accounting/Configuration/Analytic in the webclient

  THIS ERROR appears

  Uncaught Error: QWeb2 - template['ListView.rows']: Runtime Error:
  Error: QWeb2 - template['ListView.row']: Runtime Error: Error:
  NameError: name 'datetime' is not defined

  The error appears in module "account_analytic_default",
  xml field "account_analytic_default_view.xml" line "9"

  Incorrect line
  <tree string="Analytic Defaults" colors="grey:date_stop and (date_stop &lt; (datetime.date.today().strftime('%%Y-%%m-%%d)))">

  SOLUTION:

  The colors structure is wrong and you have to change that with :

  <tree string="Analytic Defaults"
  colors="grey:'date_stop','and',('date_stop','&lt;',(datetime.date.today().strftime('%%Y-%%m-%%d')))">

  Solved by David Romero and Andrea Garcia
  TREScloud
  www.trescloud.com

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1085221/+subscriptions


Follow ups

References