Review: Needs Fixing

One thing is deeply and fundamentally wrong in listview widget: the name of the 
field is hardcoded when getting the valuem that's broken, it means the widget 
can only ever used on a field called ``voucher_id``

Also, some things could be improved/simplified:

* ``this.icon`` isn't actually needed, could just pass a boolean flag to the 
template indicating whether the field is filled or not
* the test on widget.icon is useless anyway as widget.icon is always filled 
(unless something quantic happened)
* and t-attf-src can be used to make paths more readable e.g.

    t-attf-src="#{_s}/web/static/src/img/icons/gtk-#{has_value ? 'yes' : 
'no'}.png"

  if _format passes a flag "has_value" to the template rendering (with value 
!!row_data[this.id].value)
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-improve_bank_statements-vta/+merge/132894
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-improve_bank_statements-vta.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to