← Back to team overview

openerp-india team mailing list archive

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

 

*** This bug is a duplicate of bug 1001260 ***
    https://bugs.launchpad.net/bugs/1001260

** This bug has been marked a duplicate of bug 1001260
   [Trunk/6.1] account.analytic.default - error: name 'datetime' is not defined

-- 
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):
  Incomplete

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


References