[7.0] [account_check_writing] Amount in words and print check button are not shown in "Write Checks" form

Bug #1317455 reported by Mohammad Alhashash
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned
OpenERP Community Backports (Addons)
Status tracked in 7.0
7.0
New
Undecided
Unassigned

Bug Description

Install account_check_writing module and create/validate a supplier check from from Accounting > ?Write Checks"

The amount in words and print check buttons are not shown.

The attrs condition in the inherited view has incorrect condition.

    attrs="{'invisible':[('allow_check','!=',1)]}"

It should be

    attrs="{'invisible':[('allow_check','!=',True)]}"

Unlike python which has True==1, attrs expressions, which are evaluated client-side using undescore.js methods, True!=1.

I think web client should map boolean values to integers in instance.web.form.compute_domain() to maintain consistancy with python expressions.

To find if there are similar issues in other modules, I search using the regex:

    attrs\s*=\s*"[^"]*'!?=',\s*1\s*\)[^"]*"

Only the view sale.view_order_line_form2 has this issue but it is probably a dead view and not used anywhere.

Related branches

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.