Merge lp:~openerp-dev/openobject-addons/6.1-opw-577954-bth into lp:openobject-addons/6.1

Proposed by Bhumi Thakkar (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-577954-bth
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
account_analytic_default/account_analytic_default_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-577954-bth
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+119487@code.launchpad.net

Description of the change

Hello,

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

1. Accounting => Configuration => Analytic Accounting => Analytic Defaults
2. Create one record with start date and end date
3. Click on clear button.

Observed: ERROR: Uncaught Error: QWeb2 - template['ListView.rows']: Runtime Error: Error: QWeb2 - template['ListView.row']: Runtime Error: Error: NameError: name 'datetime' is not defined
Expected: Displayed All records.

In account_anaytic_default_view.xml file, in tree tag attribute colors has expression for current date datetime.date.today().strftime('%%Y-%%m-%%d') which could not be parsed by py.js library.
Have to use current_date keyword. Replaced expression by 'current_date' keyword. Defined value of current_date in color_for method, view_list.js in web client.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6944. By Bhumi Thakkar (Open ERP)

[FIX] Replaced datetime expression with current_date.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_analytic_default/account_analytic_default_view.xml'
2--- account_analytic_default/account_analytic_default_view.xml 2012-01-31 13:36:57 +0000
3+++ account_analytic_default/account_analytic_default_view.xml 2012-08-14 08:58:51 +0000
4@@ -6,7 +6,7 @@
5 <field name="model">account.analytic.default</field>
6 <field name="type">tree</field>
7 <field name="arch" type="xml">
8- <tree string="Analytic Defaults" colors="grey:date_stop and (date_stop &lt; datetime.date.today().strftime('%%Y-%%m-%%d'))" >
9+ <tree string="Analytic Defaults" colors="grey:date_stop and (date_stop &lt; current_date)" >
10 <field name="sequence"/>
11 <field name="analytic_id" required="0" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
12 <field name="product_id"/>