[Trunk/6.1] account.analytic.default - error: name 'datetime' is not defined

Bug #1001260 reported by bruno bottacini
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Medium
OpenERP R&D Addons Team 3

Bug Description

install account.analytic.defaul module, create a new analytic default record. put an end date, save. return to the tree view and remove the current filter. now you get the error.

problem is in the file account_analytic_default_view.xml at row 9

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

i think client web don't accept the datetime object inside colors attribute

summary: - [6.1] account.analytic.default - error: name 'datetime' is not defined
+ [Trunk/6.1] account.analytic.default - error: name 'datetime' is not
+ defined
affects: openobject-addons → openobject-server
Changed in openobject-server:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
Revision history for this message
ajay javiya (OpenERP) (aja-openerp) wrote :

Hello
We have traced the issue and I think bruno bottacini is right on problem root that Client web do not accept the datetime object inside colors attribute.
Reason is Web client try to render the view it calls the fields_view_get and which return the expression exactly stored on db, where web try to evaluate the those colors expression, so it should me handled by web client.
So I am transferring this bug to the web client. Let me know if i am missing something.
Thank You

affects: openobject-server → openerp-web
Changed in openerp-web:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → nobody
Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

Hello.

As per Antony's decision, this feature (using datetime in colors expression) is not supported in the web client since 6.1. If there are still addons using that feature, it is considered as a bug in the addon and it should be removed. That's why I re-assign this bug to the addons teams to remove it.

affects: openerp-web → openobject-addons
Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

After consulting Quentin, I removed that line with the "colors" expression to quickly remove this bug. But it's not sufficient, this whole feature should be re-created using other techniques. That's why this bug stays open until someone do that.

Changed in openobject-addons:
assignee: OpenERP R&D Web Team (openerp-dev-web) → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Revision history for this message
Jalpesh Patel(OpenERP) (pja-openerp) wrote :

Hello,
i have tested it with lastest trunk
addons : 7467
server :4440
 client-web:3073
itcannot be reproducable more.
so i had put this bug invalid..

Changed in openobject-addons:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.